diff options
| author | Adam Soltys <[email protected]> | 2026-07-31 15:58:57 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-07-31 17:59:22 -0700 |
| commit | 974c9cae7e11ffafdc571af0f9c47d896a901131 (patch) | |
| tree | 9755388926cd1ab1d8a99ec635f9e5713dfc6700 /lib/utils.ts | |
| parent | f012aec416849b942ebc822b76d916aa5f43c1dc (diff) | |
| download | coinos-server-974c9cae7e11ffafdc571af0f9c47d896a901131.tar.gz coinos-server-974c9cae7e11ffafdc571af0f9c47d896a901131.zip | |
nwc: conform pay/receive to the BIP-321 methods spec (nwc#2)
Tightens our implementation of the BIP-321-based NWC methods proposed
in https://github.com/nostr-wallet-connect/nwc/pull/2 — the successor
to pay_invoice/make_invoice that clients are asked to transition to
for bolt12 zaps in https://github.com/nostr-protocol/nips/pull/2421:
- reject cross-network payment instructions before paying
(UNSUPPORTED_NETWORK) instead of failing after the debit
- reject unknown req- BIP-321 params, including req-pop since we
can't open proof-of-payment callbacks
- reject a request amount that conflicts with the instruction amount
- payer_note is delivered or rejected, never dropped: bolt11+note is
rejected, internal settlements hand the note over as the payment memo
- receive mints a per-request bolt12 offer carrying the requested
description/amount instead of reusing the standing amountless offer
- get_info reports the node's actual network instead of "mainnet"
Co-Authored-By: Claude Fable 5 <[email protected]>
Diffstat (limited to 'lib/utils.ts')
0 files changed, 0 insertions, 0 deletions
