diff options
| author | Adam Soltys <[email protected]> | 2026-06-28 09:31:51 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-06-28 09:31:51 -0700 |
| commit | 0fbeb3c55413fb221d890b3bf3464ebd2aed9fa1 (patch) | |
| tree | f8f034c2ba00d0f78a34e1df1972a46712487151 /src/i18n.js | |
| parent | 96d9b7ee6914b157a17e078cfe597cb40f35c9e2 (diff) | |
| download | coinosv3-0fbeb3c55413fb221d890b3bf3464ebd2aed9fa1.tar.gz coinosv3-0fbeb3c55413fb221d890b3bf3464ebd2aed9fa1.zip | |
Locked gifts: let NIP-07 extension users decrypt in-place, skip the code
The gift payload is now encrypted two ways in the link: under the one-time code
(the DM / manual path) AND to the recipient's nostr pubkey via an ephemeral key.
When a NIP-07 browser extension (window.nostr) is present, the claim view offers
'Claim with nostr extension' — it checks the extension's pubkey matches the gift,
decrypts ctKey via window.nostr.nip44.decrypt, and claims into a fresh wallet with
no code. The pasted-code path remains as the fallback for everyone else.
Verified: both decrypt paths recover the payload from the blob; a different
extension account is rejected.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Diffstat (limited to 'src/i18n.js')
| -rw-r--r-- | src/i18n.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/i18n.js b/src/i18n.js index 48dcef0..31cc3c9 100644 --- a/src/i18n.js +++ b/src/i18n.js @@ -240,6 +240,11 @@ const STR = { giftDmSending: 'Sending the claim code…', giftDmFailed: 'Couldn’t send the nostr DM. Share this code with them privately:', giftCopyCode: 'Copy claim code', + claimWithExtension: 'Claim with nostr extension', + orEnterCode: 'or paste the claim code', + extWrongAccount: 'Your extension is signed in as a different nostr account than this gift is for.', + extNoNip44: 'Your nostr extension doesn’t support NIP-44 — paste the code instead.', + extDecryptFailed: 'Couldn’t decrypt with the extension — try the code.', nostrKeyTitle: 'Nostr address', nostrKeyDesc: 'Share this so others can lock a gift to you — the claim code is sent here as a nostr DM.', giftSplitExplain: 'This gift would lock {lock} until it’s claimed ({change} of it comes back to you then). You can split a right-sized coin first for about {fee} so only the gift amount stays locked.', |
