diff options
| author | Adam Soltys <[email protected]> | 2026-08-01 11:16:56 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-08-01 11:16:56 -0700 |
| commit | ca76accb5ccbe0ffcd68c97da2e9609f923df8f1 (patch) | |
| tree | c54196c14de4f0b3b1f6bb0149d90a9d5a4e2228 /tools | |
| parent | 0519a79ac05ec983ae7ad8d4292f5cfa9fa321a9 (diff) | |
| download | coinosv3-ca76accb5ccbe0ffcd68c97da2e9609f923df8f1.tar.gz coinosv3-ca76accb5ccbe0ffcd68c97da2e9609f923df8f1.zip | |
Add the NWC push notifier (step 1 of background wallet-connect)
A service worker cannot hold a relay socket open, so something must tell a
closed browser "a request arrived". This watches the relays for NIP-47
requests addressed to the wallet-service pubkeys a device registers, and
sends that device a Web Push. The service worker will do the actual work in
the browser; keys never leave it.
Scoped to leak as little as possible: the notifier learns the service pubkeys
registered and the timing of requests to them, and nothing else. Request
contents are encrypted to keys it doesn't hold, it never sees the wallet seed,
and it cannot move funds — the worst it can do is fail to wake a device.
No database or accounts: registrations live in one JSON file, expire if a
device stops refreshing, and push endpoints that return 404/410 are dropped.
Wake-ups are de-duplicated across relays and only fire for live traffic, so a
replayed old request can't wake anyone.
Co-Authored-By: Claude Fable 5 <[email protected]>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions
