Payer proof fix#84
Open
rustyrussell wants to merge 5 commits intovincenzopalazzo:macros/proof-of-payment-bolt12-specfrom
Open
Payer proof fix#84rustyrussell wants to merge 5 commits intovincenzopalazzo:macros/proof-of-payment-bolt12-specfrom
rustyrussell wants to merge 5 commits intovincenzopalazzo:macros/proof-of-payment-bolt12-specfrom
Conversation
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>
2 tasks
56efb64 to
1ee2f1a
Compare
cdac67d to
865df15
Compare
2521206 to
5b1d61f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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/...).