aboutsummaryrefslogtreecommitdiffstats
path: root/src/features
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-08-01 11:27:46 -0700
committerAdam Soltys <[email protected]>2026-08-01 11:27:46 -0700
commit4c1f05a3f287f3b5df1319008081cf6df7550647 (patch)
treec2f0d600675ea451d147e9519460daeccdaf55f6 /src/features
parentca76accb5ccbe0ffcd68c97da2e9609f923df8f1 (diff)
downloadcoinosv3-4c1f05a3f287f3b5df1319008081cf6df7550647.tar.gz
coinosv3-4c1f05a3f287f3b5df1319008081cf6df7550647.zip
Add the NWC pouch: a bounded spending capability for background use
Step 2 of background wallet-connect. Answering while hal is closed means signing in a service worker, and service workers cannot read localStorage where the seed lives — which is a property worth keeping, not working around. So instead of exposing the wallet, carve off a small pouch: - its own key branch (account chain 6), never used for ordinary coins, so a leaked pouch key cannot sign for chain-3 vtxos, the mailbox or LN preimages - only the pouch's private keys and its vtxo bytes go to IndexedDB, which the service worker can read. The seed never does. - it holds only what the user puts in it Threat model, stated in the file rather than implied: same-origin script access or a stolen unlocked device can read IndexedDB and spend the pouch. That is the accepted cost of answering while closed, and it is bounded — the pouch is the blast radius. A user who leaves background NWC off has no pouch. tools/nwc-pouch-test.js asserts the isolation that matters: the pouch branch is distinct from every other branch, exported keys match their pouch pubkeys and cannot control ordinary coins, and no seed material appears in the blob. Co-Authored-By: Claude Fable 5 <[email protected]>
Diffstat (limited to 'src/features')
0 files changed, 0 insertions, 0 deletions