mirror of
https://github.com/Routstr/routstrd.git
synced 2026-08-09 11:54:38 +00:00
Two bugs caused NWC responses to never arrive:
1. getPublicKey() in nostr-tools v2 already returns a hex string, but
the code wrapped it with Buffer.from().toString('hex'), producing a
double-encoded 128-char string. The relay rejected the REQ filter
with 'filter item too large' because the #p tag value was invalid.
2. The 'secret' from the NWC connection string (the pre-shared client
private key per NIP-47) was parsed but never used. Instead a new
random keypair was generated on every restart, so the wallet service
would see requests from an unexpected pubkey.
Also removed 'since' from the subscription filter (simpler, some relays
choke on it) and added debug logging for the REQ filter.