mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
Wire up NIP-04 in the BitLogin adapter, flip capabilities.nip04 to true
bitlogin's widget now implements NIP-04 (nip04Encrypt/nip04Decrypt), closing the one gap left relative to a real NIP-07 extension. bitvid's own nip07Adapter/nsecAdapter/nip46Adapter all already wire this up and report it via signerCapabilities.nip04 -- BitLogin's adapter was the one exception, hardcoded to nip04: false because the widget genuinely didn't support it before. js/nostr/client.js's DM encrypt/decrypt path only offers NIP-04 to a caller when that capability flag is true, so a BitLogin-signed-in user previously had no working legacy-DM path at all. Re-vendored the widget bundle (bitlogin's CHANGELOG.md, 2026-07-21 entry, third one) and updated the one test that hardcoded the old (now-incorrect) capabilities shape. Co-Authored-By: Claude Sonnet 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01DY9UMTuF43Ekc2U4E1eDwX
This commit is contained in:
1 parent
ca7b711b8a
commit
f2d390ff18
5 files changed
+1095
-793
No files matched your search
@@ -17,6 +17,10 @@ export function createBitloginAdapter(widgetElement, pubkey) {
|
||||
widgetElement.nip44Encrypt(peerPubkey, plaintext),
|
||||
nip44Decrypt: async (peerPubkey, payload) =>
|
||||
widgetElement.nip44Decrypt(peerPubkey, payload),
|
||||
nip04Encrypt: async (peerPubkey, plaintext) =>
|
||||
widgetElement.nip04Encrypt(peerPubkey, plaintext),
|
||||
nip04Decrypt: async (peerPubkey, payload) =>
|
||||
widgetElement.nip04Decrypt(peerPubkey, payload),
|
||||
requestPermissions: async () => ({ ok: true }),
|
||||
destroy: async () => {
|
||||
try {
|
||||
@@ -30,7 +34,7 @@ export function createBitloginAdapter(widgetElement, pubkey) {
|
||||
capabilities: {
|
||||
sign: true,
|
||||
nip44: true,
|
||||
nip04: false,
|
||||
nip04: true,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user