I've built a proof of concept. Pay for API access with ecash. Server doesn't know who you are.

- Server: a HTTP middleware with a Cashu mint and requires ecash in the HTTP header

- Client: HTTP client that puts ecash into header

It took me a couple hours. Mint and wallet are imported as libraries. It can't get simpler than this.

#[0]

Reply to this note

Please Login to reply.

Discussion

This is πŸ”₯ πŸ”₯ πŸ”₯

I can’t wait for ecash to catch on as the L3 of cyber money πŸ’ͺπŸ’ͺ

(Dumb qn) How does that work for sending the right payment amount? If you send an ecash it has a fixed amount right, so do you get a new one back as change?

Or when initially paying the LN invoice do you get a ton of worth-one-request ecash tokens back?

This is exactly the right question. I've just added the ability to mint a bunch of fixed-amount tokens with the python wallet: https://github.com/cashubtc/cashu/pull/121