shawn on Nostr: Working on hugostr — a CLI tool that publishes Hugo blog posts to nostr as ...
Working on hugostr — a CLI tool that publishes Hugo blog posts to nostr as kind:30023 events. It uses NIP-46 (remote signing) so users can sign events with their phone (Amber, Primal, et al).
The flow and where I'm stuck
1. User runs hugostr publish content/post.md
2. CLI displays a QR code with nostrconnect:// URI
3. User scans with Amber, approves the connection
4. CLI shows "Connected!" ✅
5. CLI shows "Requesting signature..." then hangs forever ❌
6. Amber never shows a signing prompt
Technical details
- Using nostr-tools library (v2.19.4) with BunkerSigner
- Relay: wss://relay.nsec.app
- The initial NIP-46 handshake completes successfully
- When calling bunkerSigner.signEvent(), it should:
1. Publish a kind:24133 event with encrypted sign_event request
2. Amber receives it, prompts user, sends back signed event
3. But step 2 never happens - Amber doesn't see the request
What I've tried
1. nostr-tools BunkerSigner - connection works, signing hangs
2. NDK's NDKNip46Signer - same issue
3. Checked relay connectivity - pool.publish() works in isolation
4. Added reconnection logic after connection - no change
Suspected causes
1. Pool/WebSocket connection state gets corrupted after the initial handshake
2. Subscription filter issue (Amber uses since = now())
3. Something specific to how nostr-tools manages the post-connection subscription
What would help
- Anyone who has successfully used NIP-46 client-initiated flow (nostrconnect://) from Node.js with Amber
- A working reference implementation to compare against
- Insight into common NIP-46 pitfalls
Halp? #asknostr
Published at
2026-01-10 21:42:57 UTCEvent JSON
{
"id": "1a92dc33f749fc1bc4ffcad6516f2eb8061cf5ffbd77c6bcba8a8de79a732c5f",
"pubkey": "c7eda660a6bc8270530e82b4a7712acdea2e31dc0a56f8dc955ac009efd97c86",
"created_at": 1768081377,
"kind": 1,
"tags": [
[
"t",
"asknostr"
],
[
"r",
"wss://relay.bitcoinpark.com/"
],
[
"r",
"wss://relay.shawnyeager.com/chat"
],
[
"r",
"wss://wot.nostr.party/"
],
[
"r",
"wss://relay.shawnyeager.com/inbox"
],
[
"r",
"wss://relay.shawnyeager.com/outbox"
],
[
"r",
"wss://relay.shawnyeager.com/private"
]
],
"content": "Working on hugostr — a CLI tool that publishes Hugo blog posts to nostr as kind:30023 events. It uses NIP-46 (remote signing) so users can sign events with their phone (Amber, Primal, et al).\n\nThe flow and where I'm stuck\n\n1. User runs hugostr publish content/post.md\n2. CLI displays a QR code with nostrconnect:// URI\n3. User scans with Amber, approves the connection\n4. CLI shows \"Connected!\" ✅\n5. CLI shows \"Requesting signature...\" then hangs forever ❌\n6. Amber never shows a signing prompt\n\nTechnical details\n\n- Using nostr-tools library (v2.19.4) with BunkerSigner\n- Relay: wss://relay.nsec.app\n- The initial NIP-46 handshake completes successfully\n- When calling bunkerSigner.signEvent(), it should:\n 1. Publish a kind:24133 event with encrypted sign_event request\n 2. Amber receives it, prompts user, sends back signed event\n 3. But step 2 never happens - Amber doesn't see the request\n\nWhat I've tried\n\n1. nostr-tools BunkerSigner - connection works, signing hangs\n2. NDK's NDKNip46Signer - same issue\n3. Checked relay connectivity - pool.publish() works in isolation\n4. Added reconnection logic after connection - no change\n\nSuspected causes\n\n1. Pool/WebSocket connection state gets corrupted after the initial handshake\n2. Subscription filter issue (Amber uses since = now())\n3. Something specific to how nostr-tools manages the post-connection subscription\n\nWhat would help\n\n- Anyone who has successfully used NIP-46 client-initiated flow (nostrconnect://) from Node.js with Amber\n- A working reference implementation to compare against\n- Insight into common NIP-46 pitfalls\n\nHalp? #asknostr",
"sig": "573a2401f76b091a77bc661ef9286923899bf8b7ef008c17680781e2a520a36b7c64b1abc2b9ec7e6ea08e918d9e5cbe850ca202f146e52ada2d76c804bcd9a6"
}