Cashu-ts and ndk-wallet yeah, you can interact with the mint client side no problem since it has an HTTP API (and some websockets too).
Discussion
For now I just need to be able to do this client side:
- Generate a mint quote lightning invoice
- Confirm when it’s been paid
- Generate a cashu token from the proof
How do I do this with the Mint HTTP API?
I know the python integration, Nutshell, has the mint API for localhost, but how would I use the API for minibits, for example
All mints have the same API defined in the cashu spec, the cashu-ts library has all you need! https://github.com/cashubtc/cashu-ts
nostr:nprofile1qyv8wumn8ghj7enfd36x2u3wdehhxarj9emkjmn99uq3wamnwvaz7tmxwfjkuuewdehhxarjxyhxxmmd9uqzqla9dawkjc4trc7dgf88trpsq2uxvhmmpkxua607nc5g6a634sv56rwqxt I'm checking these libraries, why do you need both?
Cashu-ts implements cashu, ndk-wallet implements NIP-60
got it, nip 60 is "the nostr db", cashu-ts is the engine
I'm using cashu-ts to encode/decode ecash tokens, get mint keysets and info and more. as nostr:npub1l2vyh47mk2p0qlsku7hg0vn29faehy9hy34ygaclpn66ukqp3afqutajft mentioned the NDK NIP-60 wallet uses cashu-ts under the hood https://github.com/search?q=repo%3Apurrgrammer%2Fchachi%20cashu-ts&type=code