Skip to content

WIP: Add BOLT12 payer proof support#845

Draft
vincenzopalazzo wants to merge 3 commits intolightningdevkit:mainfrom
vincenzopalazzo:macros/bolt12-pop
Draft

WIP: Add BOLT12 payer proof support#845
vincenzopalazzo wants to merge 3 commits intolightningdevkit:mainfrom
vincenzopalazzo:macros/bolt12-pop

Conversation

@vincenzopalazzo
Copy link
Contributor

@vincenzopalazzo vincenzopalazzo commented Mar 25, 2026

Summary

  • integrate the payer proof rust-lightning branch and patch transitive rust-lightning crates onto the same forked revision
  • persist BOLT12 invoice payer-proof context from InvoiceReceived and expose Bolt12Payment::create_payer_proof with selective disclosure options
  • add UniFFI-facing payer proof support and wire new payer proof errors through the public API

Verification

  • cargo fmt --all
  • cargo check --lib
  • cargo check --lib --features uniffi
  • cargo test --lib
  • cargo test --lib --features uniffi

Disclosure

  • This PR was prepared with Codex AI assistance.

Please note that this PR is just a test to see if we are adding all the necessary API to the main PR lightningdevkit/rust-lightning#4297

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Mar 25, 2026

👋 Thanks for assigning @tnull as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@vincenzopalazzo vincenzopalazzo marked this pull request as draft March 25, 2026 17:13
@vincenzopalazzo vincenzopalazzo changed the title Add BOLT12 payer proof support WIP: Add BOLT12 payer proof support Mar 25, 2026
@vincenzopalazzo vincenzopalazzo force-pushed the macros/bolt12-pop branch 2 times, most recently from 18e0c72 to 312b662 Compare March 26, 2026 15:42
@tnull tnull self-requested a review March 26, 2026 17:28
@vincenzopalazzo vincenzopalazzo force-pushed the macros/bolt12-pop branch 3 times, most recently from a11bf0e to 781d3ee Compare March 26, 2026 18:34
vincenzopalazzo and others added 3 commits March 26, 2026 19:45
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add payer-proof creation for outbound BOLT12 payments, persist the invoice context needed to build the proof, and expose the new types through the public and UniFFI surfaces.

AI-assisted-by: Codex
Update rust-lightning dependency to include commits from PRs #4210
(BLIP-42 contact secrets) and #4297 (payment_nonce in PaymentSent).

The payment_nonce in PaymentSent allows capturing the nonce needed for
payer proof construction directly from the payment success event,
eliminating the need to set manually_handle_bolt12_invoices and
intercept InvoiceReceived.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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