diff options
| author | Adam Soltys <[email protected]> | 2026-03-01 21:53:22 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-03-01 21:53:22 -0800 |
| commit | 0a7a9c93d414972f36565c71ae227adc151da86b (patch) | |
| tree | f78aa6d0962bf3125ce6faa7e69221edf5587e64 /src/lib | |
| parent | bd3cc211d446c9bd7deb1e783010fc210a5a7b22 (diff) | |
| download | coinos-ui-0a7a9c93d414972f36565c71ae227adc151da86b.tar.gz coinos-ui-0a7a9c93d414972f36565c71ae227adc151da86b.zip | |
check for nostr key
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/nip07.ts | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lib/nip07.ts b/src/lib/nip07.ts index be3f42e2..e90d13a7 100644 --- a/src/lib/nip07.ts +++ b/src/lib/nip07.ts @@ -42,6 +42,14 @@ export const ensureSigner = async (userPubkey: string): Promise<Uint8Array | nul const skFromStorage = await tryNsecFromStorage(); if (skFromStorage) return skFromStorage; + // Try to derive nostr key from cached canonical key (e.g. passkey accounts) + try { + const { autoUnlockNostr } = await import("$lib/seed"); + await autoUnlockNostr(userPubkey); + const skFromDerived = await tryNsecFromStorage(); + if (skFromDerived) return skFromDerived; + } catch {} + // Fall back to NIP-07 extension if available and matches user if (window.nostr) { try { |
