Skip to content

Update ldk-node dependency & expose bolt12 proofs - #258

Open
benthecarman wants to merge 2 commits into
lightningdevkit:mainfrom
benthecarman:update-ldk-node
Open

Update ldk-node dependency & expose bolt12 proofs#258
benthecarman wants to merge 2 commits into
lightningdevkit:mainfrom
benthecarman:update-ldk-node

Conversation

@benthecarman

Copy link
Copy Markdown
Collaborator

Adapt payment events to the updated ldk-node API and expose their payment IDs. Continue to handle unknown BOLT 11 payments manually so the receive-for-hash APIs work correctly.

Add payer-proof creation to the gRPC, CLI, and MCP interfaces,

Adapt payment events to the updated ldk-node API and expose their
payment IDs. Continue to handle unknown BOLT 11 payments manually so
the receive-for-hash APIs work correctly.
Add payer-proof creation to the gRPC, CLI, and MCP interfaces. Include
the preimage and invoice in successful-payment events because stateless
proof creation requires both values.

AI assistance: OpenAI Codex was used to rebase and verify this change.
@ldk-reviews-bot

ldk-reviews-bot commented Aug 18, 2026

Copy link
Copy Markdown

I've assigned @wpaulino 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.

@benthecarman
benthecarman marked this pull request as ready for review August 18, 2026 05:28
Comment thread ldk-server/src/api/mod.rs
///
/// The claim/fail APIs now take a payment id. Pending inbound matches are preferred so a
/// later retry of the same hash does not claim an already-settled record.
pub(crate) fn bolt11_payment_id_for_hash(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should do this. Iterating all payments will be prohibitively expensive, esp. after only keeping a cache of them in memory. In LDK Node we decided against keeping a reverse index. I think this PR simply has to update the API to also go with fail_for_id/claim_for_id rather than maintaining the old API shape.

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.

3 participants