Skip to content

Payer proof fix#84

Open
rustyrussell wants to merge 5 commits intovincenzopalazzo:macros/proof-of-payment-bolt12-specfrom
rustyrussell:payer-proof-fix
Open

Payer proof fix#84
rustyrussell wants to merge 5 commits intovincenzopalazzo:macros/proof-of-payment-bolt12-specfrom
rustyrussell:payer-proof-fix

Conversation

@rustyrussell
Copy link
Copy Markdown

This is all Claude, so take with a grain of salt. But it matches the latest spec update, and it passes the test vectors (assuming you have the bolts repo checked out in ../bolts/...).

vincenzopalazzo and others added 5 commits March 25, 2026 17:21
Move the invoice/refund payer key derivation logic into reusable helpers so
payer proofs can derive the same signing keys without duplicating the metadata
and signer flow.
Add the payer proof types, selective disclosure merkle support, parsing, and
tests for constructing and validating BOLT 12 payer proofs from invoices.
Encapsulate invoice, preimage, and nonce in PaidBolt12Invoice and
surface it in PaymentSent. Rework builder to return UnsignedPayerProof
with SignFn/sign_message integration, use encode_tlv_stream! for
serialization, move helpers to DisclosedFields methods, and address
naming conventions and TLV validation feedback.

Co-Authored-By: Jeffrey Czyz <jkczyz@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Don't insist they're in TLV-sorted order; that's much more complex.

Claude wrote this code, feel free to reject.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Written by Claude, too.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@vincenzopalazzo vincenzopalazzo force-pushed the macros/proof-of-payment-bolt12-spec branch 12 times, most recently from 56efb64 to 1ee2f1a Compare April 15, 2026 20:20
@vincenzopalazzo vincenzopalazzo force-pushed the macros/proof-of-payment-bolt12-spec branch 6 times, most recently from cdac67d to 865df15 Compare April 23, 2026 13:36
@vincenzopalazzo vincenzopalazzo force-pushed the macros/proof-of-payment-bolt12-spec branch 2 times, most recently from 2521206 to 5b1d61f Compare April 30, 2026 21:11
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.

2 participants