feat: NIP-46 remote signer via QR (Primal, or any nostrconnect-compatible app)
Adds a second way to sign in besides a NIP-07 browser extension: generate
a nostrconnect:// URI, show it as a QR code, and resolve once a remote
signer app (Primal mobile, etc.) scans and approves it. Session persists
in localStorage so a page reload doesn't require re-scanning.
lib/nip07.ts renamed to lib/signer.ts and generalized — it now abstracts
over both signer kinds behind the same {getPublicKey, signEvent} shape,
so buildNip98Header and the rest of the app don't care which is active.
On a branch (feature/nip46-qr-signer) rather than main, since this is
explicitly experimental and easy rollback matters here.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"nostr-tools": "^2.15.0",
|
||||
"qrcode": "^1.5.4",
|
||||
"vue": "^3.5.0"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user