From 72fcf960162e235a8d1582892d847f786327e5ce Mon Sep 17 00:00:00 2001 From: archipelago Date: Wed, 22 Jul 2026 02:38:52 -0400 Subject: [PATCH] chore(mock): node.nostr-pubkey returns exact real shape (hex + genuine npub) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mock previously returned a placeholder string with no nostr_npub, so the new Federation signing-details panel showed 'loading…' forever against the mock. Now returns a distinct discovery key — 64-char hex plus its real NIP-19 bech32 encoding (verified against the official test vector) — mirroring production where the node discovery key is separate from the personal identity keys. Co-Authored-By: Claude Fable 5 --- neode-ui/mock-backend.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/neode-ui/mock-backend.js b/neode-ui/mock-backend.js index eeb59e21..072aa1ab 100755 --- a/neode-ui/mock-backend.js +++ b/neode-ui/mock-backend.js @@ -1634,7 +1634,14 @@ app.post('/rpc/v1', (req, res) => { return res.json({ result: { event_id: 'mock-event-id', success: 2, failed: 0 } }) } case 'node.nostr-pubkey': { - return res.json({ result: { nostr_pubkey: 'mock-nostr-pubkey-hex' } }) + // Exact shape of the real handler (node.rs handle_node_nostr_pubkey): + // the node's dedicated discovery key — hex + genuine bech32 npub + // (deliberately NOT one of the personal identity keys; discovery + // presence events are always signed with this separate node key). + return res.json({ result: { + nostr_pubkey: 'c9f0a2e84b71d3568e0f4a6b2c8d1e97a3b5c7d9e1f2a4b6c8d0e2f4a6b8c0d2', + nostr_npub: 'npub1e8c296ztw8f4drs0ff4jerg7j73mt37eu8e2fdkg6r30ff4ccrfq8j5vuy', + } }) } case 'node.signChallenge': {