Egge's avatar
Egge
egge@npub.cash
npub1mhcr...c226
Building https://npub.cash πŸ₯œ Working on awesome nostr, cashu and Lightning stuff πŸ’œβš‘οΈ
Egge's avatar
Egge 11 months ago
Typescript rewrite in Go! Great news πŸ”₯
Egge's avatar
Egge 11 months ago
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?
Egge's avatar
Egge 11 months ago
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). image 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
Egge's avatar
Egge 11 months ago
Anyone got the link to the new Macos long-form app that was released recently? #asknostr
Egge's avatar
Egge 11 months ago
Become ungovernable πŸ’œ image
Egge's avatar
Egge 11 months ago
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! πŸ₯œ
Egge's avatar
Egge 11 months ago
I just paid the first invoice on npubcash v2 πŸ₯œ
Egge's avatar
Egge 11 months ago
I can not wait to never get rate limited again... πŸ₯œ image
Egge's avatar
Egge 11 months ago
The flu stole two weeks of my life… what do you do to stay healthy? #asknostr
Egge's avatar
Egge 11 months ago
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 β†’
Egge's avatar
Egge 11 months ago
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. image
Egge's avatar
Egge 11 months ago
ecash fixes it
↑