diff --git a/build/nostr-lite.js b/build/nostr-lite.js index 7205d13..fd464d0 100644 --- a/build/nostr-lite.js +++ b/build/nostr-lite.js @@ -8,7 +8,7 @@ * Two-file architecture: * 1. Load nostr.bundle.js (official nostr-tools bundle) * 2. Load nostr-lite.js (this file - NOSTR_LOGIN_LITE library with CSS-only themes) - * Generated on: 2026-06-09T19:25:39.199Z + * Generated on: 2026-07-20T22:03:53.007Z */ // Verify dependencies are loaded diff --git a/build/nostr.bundle.js b/build/nostr.bundle.js index b555c53..4f197ca 100644 --- a/build/nostr.bundle.js +++ b/build/nostr.bundle.js @@ -11146,12 +11146,12 @@ zoo`.split("\n"); } async getPublicKey() { if (!this.cachedPubKey) { - this.cachedPubKey = await this.sendRequest("get_public_key", []); + this.cachedPubKey = await this.sendRequest("nostr_get_public_key", []); } return this.cachedPubKey; } async signEvent(event) { - let resp = await this.sendRequest("sign_event", [JSON.stringify(event)]); + let resp = await this.sendRequest("nostr_sign_event", [JSON.stringify(event)]); let signed = JSON.parse(resp); if (verifyEvent(signed)) { return signed; @@ -11160,16 +11160,16 @@ zoo`.split("\n"); } } async nip04Encrypt(thirdPartyPubkey, plaintext) { - return await this.sendRequest("nip04_encrypt", [thirdPartyPubkey, plaintext]); + return await this.sendRequest("nostr_nip04_encrypt", [thirdPartyPubkey, plaintext]); } async nip04Decrypt(thirdPartyPubkey, ciphertext) { - return await this.sendRequest("nip04_decrypt", [thirdPartyPubkey, ciphertext]); + return await this.sendRequest("nostr_nip04_decrypt", [thirdPartyPubkey, ciphertext]); } async nip44Encrypt(thirdPartyPubkey, plaintext) { - return await this.sendRequest("nip44_encrypt", [thirdPartyPubkey, plaintext]); + return await this.sendRequest("nostr_nip44_encrypt", [thirdPartyPubkey, plaintext]); } async nip44Decrypt(thirdPartyPubkey, ciphertext) { - return await this.sendRequest("nip44_decrypt", [thirdPartyPubkey, ciphertext]); + return await this.sendRequest("nostr_nip44_decrypt", [thirdPartyPubkey, ciphertext]); } }; async function createAccount(bunker, params, username, domain, email, localSecretKey = generateSecretKey()) { diff --git a/examples/cyd_webserial_demo.html b/examples/cyd_webserial_demo.html index fa964cc..889846d 100644 --- a/examples/cyd_webserial_demo.html +++ b/examples/cyd_webserial_demo.html @@ -611,7 +611,7 @@ // ── Pubkey helper ───────────────────────────────────────────────────────── async function fetchOwnPubkeyAndFillPeers() { const params = [getIndexOptions()]; - const resp = await rpcCall("get_public_key", params); + const resp = await rpcCall("nostr_get_public_key", params); if (resp && typeof resp.result === "string") { ownPubkey = resp.result.trim().toLowerCase(); pubkeyOutEl.textContent = pretty(resp); @@ -668,7 +668,7 @@ }; const params = [unsignedEvent, getIndexOptions()]; - const resp = await rpcCall("sign_event", params); + const resp = await rpcCall("nostr_sign_event", params); signOutEl.textContent = pretty(resp?.result ?? resp); } catch (e) { signOutEl.textContent = String(e); @@ -680,7 +680,7 @@ const peer = requirePeerHex(nip04PeerEl.value); const msg = String(nip04MsgEl.value || ""); const params = [peer, msg, getIndexOptions()]; - const resp = await rpcCall("nip04_encrypt", params); + const resp = await rpcCall("nostr_nip04_encrypt", params); nip04OutEl.textContent = pretty(resp?.result ?? resp); if (resp && typeof resp.result === "string") { nip04DecPeerEl.value = peer; @@ -696,7 +696,7 @@ const peer = requirePeerHex(nip04DecPeerEl.value); const ciphertext = String(nip04CipherEl.value || ""); const params = [peer, ciphertext, getIndexOptions()]; - const resp = await rpcCall("nip04_decrypt", params); + const resp = await rpcCall("nostr_nip04_decrypt", params); nip04DecOutEl.textContent = requireStringResult(resp, "NIP-04 decrypt"); } catch (e) { nip04DecOutEl.textContent = String(e); @@ -708,7 +708,7 @@ const peer = requirePeerHex(nip44PeerEl.value); const msg = String(nip44MsgEl.value || ""); const params = [peer, msg, getIndexOptions()]; - const resp = await rpcCall("nip44_encrypt", params); + const resp = await rpcCall("nostr_nip44_encrypt", params); nip44OutEl.textContent = pretty(resp?.result ?? resp); if (resp && typeof resp.result === "string") { nip44DecPeerEl.value = peer; @@ -724,7 +724,7 @@ const peer = requirePeerHex(nip44DecPeerEl.value); const ciphertext = String(nip44CipherEl.value || ""); const params = [peer, ciphertext, getIndexOptions()]; - const resp = await rpcCall("nip44_decrypt", params); + const resp = await rpcCall("nostr_nip44_decrypt", params); nip44DecOutEl.textContent = requireStringResult(resp, "NIP-44 decrypt"); } catch (e) { nip44DecOutEl.textContent = String(e); diff --git a/examples/feather_webusb_demo.html b/examples/feather_webusb_demo.html index c796934..4a47f63 100644 --- a/examples/feather_webusb_demo.html +++ b/examples/feather_webusb_demo.html @@ -369,7 +369,7 @@ async function fetchOwnPubkeyAndFillPeers() { const params = [getIndexOptions()]; - const resp = await rpcCall("get_public_key", params, "web-own-pubkey"); + const resp = await rpcCall("nostr_get_public_key", params, "web-own-pubkey"); if (resp && typeof resp.result === "string") { ownPubkey = resp.result.trim().toLowerCase(); pubkeyOutEl.textContent = pretty(resp); @@ -460,7 +460,7 @@ }; const params = [unsignedEvent, getIndexOptions()]; - const resp = await rpcCall("sign_event", params, "web-sign-kind1"); + const resp = await rpcCall("nostr_sign_event", params, "web-sign-kind1"); signOutEl.textContent = pretty(resp?.result ?? resp); } catch (e) { signOutEl.textContent = String(e); @@ -472,7 +472,7 @@ const peer = requirePeerHex(nip04PeerEl.value); const msg = String(nip04MsgEl.value || ""); const params = [peer, msg, getIndexOptions()]; - const resp = await rpcCall("nip04_encrypt", params, "web-nip04-enc"); + const resp = await rpcCall("nostr_nip04_encrypt", params, "web-nip04-enc"); nip04OutEl.textContent = pretty(resp?.result ?? resp); if (resp && typeof resp.result === "string") { nip04DecPeerEl.value = peer; @@ -488,7 +488,7 @@ const peer = requirePeerHex(nip04DecPeerEl.value); const ciphertext = String(nip04CipherEl.value || ""); const params = [peer, ciphertext, getIndexOptions()]; - const resp = await rpcCall("nip04_decrypt", params, "web-nip04-dec"); + const resp = await rpcCall("nostr_nip04_decrypt", params, "web-nip04-dec"); nip04DecOutEl.textContent = requireStringResult(resp, "NIP-04 decrypt"); } catch (e) { nip04DecOutEl.textContent = String(e); @@ -500,7 +500,7 @@ const peer = requirePeerHex(nip44PeerEl.value); const msg = String(nip44MsgEl.value || ""); const params = [peer, msg, getIndexOptions()]; - const resp = await rpcCall("nip44_encrypt", params, "web-nip44-enc"); + const resp = await rpcCall("nostr_nip44_encrypt", params, "web-nip44-enc"); nip44OutEl.textContent = pretty(resp?.result ?? resp); if (resp && typeof resp.result === "string") { nip44DecPeerEl.value = peer; @@ -516,7 +516,7 @@ const peer = requirePeerHex(nip44DecPeerEl.value); const ciphertext = String(nip44CipherEl.value || ""); const params = [peer, ciphertext, getIndexOptions()]; - const resp = await rpcCall("nip44_decrypt", params, "web-nip44-dec"); + const resp = await rpcCall("nostr_nip44_decrypt", params, "web-nip44-dec"); nip44DecOutEl.textContent = requireStringResult(resp, "NIP-44 decrypt"); } catch (e) { nip44DecOutEl.textContent = String(e);