Skip to content

Align offer receipts and noffer TLVs with the spec - #25

Merged
shocknet-justin merged 1 commit into
mainfrom
noffer-receipt-spec
Aug 21, 2026
Merged

shocknet-justin merged 1 commit into
mainfrom
noffer-receipt-spec

Conversation

@shocknet-justin

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

Copy link
Copy Markdown
Member

Summary

  • Receipts are { res: "ok" } with an optional 64-char hex preimage. A second event is only treated as paid if that shape matches.
  • Noffers without TLV 3/4 decode as spontaneous. TLV 5 currency round-trips (variable price; excludes TLV 4).
  • NofferError can include latest for a moved offer. SDK is 1.7.3.

Test plan

  • npm test — 51 pass, including receipt with/without preimage, malformed preimage ignored, missing TLV 3, currency encode/decode
  • clinkctl decode of the demo default noffer1... — priceType: 2

Lightning receipts may carry a preimage; a noffer without price TLVs is spontaneous; currency is TLV 5.

Co-authored-by: Cursor <cursoragent@cursor.com>
@shocknet-justin
shocknet-justin merged commit a1b5e21 into main Aug 21, 2026
6 checks passed
@shocknet-justin
shocknet-justin deleted the noffer-receipt-spec branch August 21, 2026 16:19
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