chore(mock): node.nostr-pubkey returns exact real shape (hex + genuine npub)
Some checks failed
Demo images / Build & push demo images (push) Failing after 1m38s

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 <noreply@anthropic.com>
This commit is contained in:
archipelago 2026-07-22 02:38:52 -04:00
parent 50d5d4d132
commit 72fcf96016

View File

@ -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': {