NIP-46 requests whose method is not in Nip46Method (packages/shared-types/src/nip46.ts), or whose params aren't all strings, fail Nip46RequestSchema.safeParse in bunker.service.ts. The service logs Invalid NIP-46 request schema and returns without sending anything. The client waits until its own timeout.
Two spec points make this user-visible:
logout was added to NIP-46 on 2026-06-14 (nips a932d69). It takes params [] and returns "ack". On receipt the signer SHOULD remove the session for that client-pubkey. nostr-tools' BunkerSigner now calls it (nip46.ts: sendRequest('logout', [])), so logging out of a nostr-tools-based client currently hangs.
- NIP-46 also now says: "Requests made with unknown or unsupported methods MUST be replied with an error" (46.md, nips f0af204, 2026-07-15, "Avoid nip46 silent timeouts"). The handler's
default: branch, which would do exactly that, can't be reached, because the schema rejects the request first.
Suggested fix:
- Accept any
method string at the schema level, and let the handler's default: reply { id, error: 'unsupported method: <m>' }.
- Implement
logout: reply "ack", then revoke or remove the connection for that client-pubkey.
Related: the REVOKED branch in the handler also looks unreachable, because findByClientAndSigner only returns ACTIVE/PENDING rows. A revoked client therefore gets "Unknown client" instead of the revoked path.
(Found while working on #26.)
NIP-46 requests whose
methodis not inNip46Method(packages/shared-types/src/nip46.ts), or whose params aren't all strings, failNip46RequestSchema.safeParseinbunker.service.ts. The service logsInvalid NIP-46 request schemaand returns without sending anything. The client waits until its own timeout.Two spec points make this user-visible:
logoutwas added to NIP-46 on 2026-06-14 (nips a932d69). It takes params[]and returns"ack". On receipt the signer SHOULD remove the session for that client-pubkey. nostr-tools'BunkerSignernow calls it (nip46.ts:sendRequest('logout', [])), so logging out of a nostr-tools-based client currently hangs.default:branch, which would do exactly that, can't be reached, because the schema rejects the request first.Suggested fix:
methodstring at the schema level, and let the handler'sdefault:reply{ id, error: 'unsupported method: <m>' }.logout: reply"ack", then revoke or remove the connection for that client-pubkey.Related: the
REVOKEDbranch in the handler also looks unreachable, becausefindByClientAndSigneronly returns ACTIVE/PENDING rows. A revoked client therefore gets "Unknown client" instead of the revoked path.(Found while working on #26.)