calle 👁️⚡👁️ on Nostr: I need help with this! I want to make cashu.me wallet sit in the background and ...
I need help with this! I want to make cashu.me wallet sit in the background and listen for push notifications that are triggered by NWC commands so that the PWA can wake up, send a zap, and go to sleep again.
Who has experience in this? Please hit me up
Who has experience in this? Please hit me up
quoting nevent1q…vy4nIt asks to enable push notifs, then sends the push endpoint to server along with pubkey and relay, server monitors the pubkey on relay for unanswered nip46 messages, when detected sends a push to wake up the service worker.
Nwc flow is quite similar, so it should be possible to have the same thing there.
Server side is https://github.com/nostrband/noauthd - not a beautiful piece of code, but can be an inspiration.
You'll also need strfry or other relay that stores ephemeral events for a while so that woken up service worker could fetch them.