Skip to content

Only { res: ok } is a payment receipt - #24

Merged
shocknet-justin merged 2 commits into
mainfrom
receipt-shape
Aug 21, 2026
Merged

shocknet-justin merged 2 commits into
mainfrom
receipt-shape

Conversation

@shocknet-justin

@shocknet-justin shocknet-justin commented Aug 21, 2026 •

Copy link
Copy Markdown
Member

Summary

  • 1.7.1 re-subscribe dumps the cached invoice and called onReceipt with { bolt11 }. That is not paid.
  • Only { res: "ok" } (spec receipt) closes the wait. Replayed invoices and any other payload stay listening.

Not on npm yet. 1.7.1 is unsafe for onReceipt.

Test plan

  • npm test — 46 pass, including replayed invoice after resubscribe, then real { res: ok }
  • { res: GFY } does not fire onReceipt or close the sub

Re-subscribe dumps the cached bolt11; treating that as paid made --receipt print ok with no payment. Only { res: ok } closes the wait. 1.7.2.

Co-authored-by: Cursor <cursoragent@cursor.com>
A payload with any res field is still not payment. The offer spec is { res: ok }; anything else stays listening.

Co-authored-by: Cursor <cursoragent@cursor.com>
@shocknet-justin shocknet-justin changed the title 1.7.2: only { res: ok } is a receipt Only { res: ok } is a payment receipt Aug 21, 2026
@shocknet-justin
shocknet-justin merged commit 08db714 into main Aug 21, 2026
5 checks passed
@shocknet-justin
shocknet-justin deleted the receipt-shape branch August 21, 2026 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant