Oddbean new post about | logout
 Ever since Cashu-Address went live for testing I have gotten requests from people that want to use it without a NIP-07 provider...

coming to a terminal near you soon 💜

🥜 Claim your Nuts from your command line
🔐 encrypted nsec stored locally

https://video.nostr.build/5185cb07aab94f3333b8d2c3b05c81a7efeafad14af3e480eca6b609c7601ece.mp4 
 I would like to give users signing up with nsec.app an address to receive zaps. Could cashu-address be used for that? 
 Yes absolutely. Every npub has a cashu-address by default. Nuts will be collected by the server (and locked to the users pubkey once P2PK is fully supported) and can be claimed using NIP-98 
 Ok cool reading the docs  
 Oops not much docs there... Ok so I set npub@cashu.. as my ln address and can receive zaps. How do I withdraw to my ln wallet? 
 Yeah sorry... Trying to keep up with everything. I'll get the docs updated by tomorrow!

You send a NIP-98 authenticated request to the server's claim endpoint. The server will respond with your eCash proofs. You can then spend those proofs at the mint to pay an invoice (simply said, withdraw to LN).

You can play around with the reference implementation on https://app.cashu-address.com using NIP-07. If you look at the network tab, its pretty obvious what is happening behind the scenes. 
 Ok thanks! 
 https://docs.cashu-address.com/cashu-address-protocol/endpoints/claim

Will add more details over the course of the day. 
 Thanks, looking at it 
 So after I do /claim I have to go to the mint and ask them to withdraw to my ln address? 
 Claim gives you all collected eCash proofs.

It depends on what you want to do with the eCash. You can claim it inside your own eCash wallet or use it to pay a Lightning invoice. On https://app.cashu-address.com I built flows for both cases 
 Ok thanks, need to learn more about eCash now. 
 No problem. Happy to answer questions at any time. I can also recommend joining the Cashu dev channels (either telegram or discord) 
 Will I send some http request with nip98 asking to withdraw to some ln invoice? 
 👀
nostr:nevent1qqsvnngef2uvuzegkxd5q43sadu98dlfsmqsdawrzar7wqydtzj0awcpz3mhxue69uhhyetvv9ujuerpd46hxtnfdupzph0s8t9gtt0q88n8gt2mau7lx5klrxws6v0z9wv93eld4pwt8wa7qvzqqqqqqy9y93zc 
 Looking forward to this 🙏🏼 
 Isn't it?!

If you are looking to write stuff for hardcore users, then this will probably disappoint you, but it is written in NodeJS using the prompts framework, because thats what I can move the fastest in.

Once v0.1 is done, I wouldn't mind porting this to rust though, as building standalone executables in node is a pain... 
 Sounds great