Typescript rewrite in Go! Great news π₯
Egge
egge@npub.cash
npub1mhcr...c226
Building https://npub.cash π₯ Working on awesome nostr, cashu and Lightning stuff πβ‘οΈ
Two new Cashu-TS docs pages added:
- How to generate deterministic secrets from a seed: https://cashubtc.github.io/cashu-ts-docs/docs/Guides/deterministic
- How to restore proofs from a seed: https://cashubtc.github.io/cashu-ts-docs/docs/Guides/restore
I want to start a blog series where I built small Cashu projects using Cashu-TS.
What are some of the things that you would like to see?
I just released the first version of almnd, a npm package for throttled communication with Cashu mints.
Almnd will schedule and reschedule mint calls with appropriate timings and backoffs, making sure that you can talk to mints, without having to worry about spamming them (and getting rate limited).
The first version focuses on minting. Other methods will be added soon(tm). I built this with npub.cash in mind. I think the most appropriate use case is services that have to deal with a lot of pending state over long periods of times. For most wallets I would recommend looking into Cashu's WebSocket protocol.
Library: https://www.npmjs.com/package/almnd
The first version focuses on minting. Other methods will be added soon(tm). I built this with npub.cash in mind. I think the most appropriate use case is services that have to deal with a lot of pending state over long periods of times. For most wallets I would recommend looking into Cashu's WebSocket protocol.
Library: https://www.npmjs.com/package/almndHi anon! Did you know that there is an open Cashu-TS dev call every week? Come join us: https://cashubtc.github.io/cashu-ts-docs/docs/get_in_touch
Anyone got the link to the new Macos long-form app that was released recently? #asknostr
Become ungovernable π 

π₯ 

Next month, Iβll be hosting a hands-on coding workshop on the basics of ecash and Cashu development!
π Where? Swiss Bitcoin Conference, Kreuzlingen, Switzerland
π
When? Saturday, April 26 (time TBD)
If youβre curious about building with ecash and Cashu, make sure to drop by π
More details about the conference: swiss-bitcoin-conference.com
Hope to see you there! π₯
I just paid the first invoice on npubcash v2 π₯
Support Bitcoin artists π§‘π₯ View quoted note β
I can not wait to never get rate limited again... π₯


Can not believe how helpful this community is. Lots of love to all of you π View quoted note β
The flu stole two weeks of my life⦠what do you do to stay healthy? #asknostr
Because I received a coupe of DMs pointing out a bug in this code: in JavaScript βthisβ is implicitly defined in every function scope. If there is no object attached (function is not a method) it points to the global object (window or globalThis).
There is no bug in this code. ecash fixes it globally.
View quoted note β
Wanna use cashu-ts in your browser?
π
View quoted note β
I have spent several weeks trying to replace the Blink API wrapper of npub.cash with a Cashu native alternative and its been a wild ride.
While Cashu mints do support WebSockets for realtime updates, it turned out that WebSockets are pretty difficult to work with, when you are trying to keep them and the subscriptions alive for long periods (in my case days).
But there is a second issue: You see Cashu mints enfore rather strict rate limits on their users. This is important as Cashu is account-less and preventing spam attacks is difficult. Usually this is no issue, as regular users interacting with a mint do not hit these limits. But npub.cash is a funnel. Instead of every user using their own IP to hit the mint, with npub.cash every user "proxies" through the services server.
Turns out this second issue is much bigger than the first one and WebSockets do not solve this. So I decided to build a scheduler that make sure that all mint communication happens as frequent as possible, but never to frequent. This module also solves the first issue, as it allows to queue polling tasks in a lower priority making sure the service stays up to date about payment activity.
If the server restarts it wont hit the mint with a gazillion subs at once, it will make sure they are evenly spread out through low priority calls, while always making sure there is "rate" left for calls that need to be instant.
I built this module externally, so theoretically I could publish it as npm package for structured and timed mint communication. Please let me know if you could use something like this (because as of right now I don't think most Cashu applications would benefit from this, npub.cash is not your usual Cashu application).
After doing some testing I think it is ready to put into an experimental version of npub.cash. I hope to release this on reckless-npub.cash by the end of the week.


ecash fixes it