Repository navigation
Add BOLT12 LSPS2 JIT receive support #999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
tnull
wants to merge
50
commits into
lightningdevkit:main
Choose a base branch
from
tnull:2026-07-bolt12-lsps2-ng-alt
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+5,754
−774
Open
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
d910c8b
lsps2: Move client into module directory
tnull 0de4f6c
lsps2: Add single-use payment leases
tnull aeb4f15
f Document payment leases and use odd TLV types
tnull 4ec3542
lsps2: Persist payment leases
tnull 2a13df1
lsps2: Prune stale payment leases
tnull 1fc7cee
lsps2: Configure a global fee limit
tnull 5c266ff
f Document the fixed-amount fee cap
tnull 6f31bdc
bolt11: Consume LSPS2 payment leases
tnull d912533
f Document that leases are consumed at selection
tnull 304614f
lsps2: Reject oversized CLTV deltas
tnull b9fb27f
bolt12: Move payment into module directory
tnull 9558f8e
lsps2: Persist lease cache targets
tnull 250698b
f Document lease cache targets and use odd TLV types
tnull 3ebb650
bolt12: Register LSPS2 lease targets
tnull 8ea1f92
f Skip lease cache targets without an LSPS2 source
tnull 373262c
f Register lease targets for unified offers
tnull 9d6836e
payment: Move payment metadata
tnull 310abc7
lsps2: Add JIT payment router
tnull 07609aa
f Document direct path rejection and use odd TLV types
tnull c49ff5b
bolt12: Wrap offers message handling
tnull 7446567
bolt12: Sync offers flow block state
tnull 12ec0d3
bolt12: Install LSPS2 router
tnull 5929b77
f Note BOLT12 direct path rejection in the changelog
tnull 47b362e
bolt12: Handle invoice requests locally
tnull 58e7c74
bolt12: Respond to requests from leases
tnull 9d58d7c
bolt12: Bound pending JIT requests
tnull c5b73a6
f Preserve slots for distinct JIT requests
tnull f213155
f Keep JIT responses until invoice expiry
tnull f3f002d
lsps2: Extend opening parameter validity
tnull e5f24f9
bolt12: Validate LSPS2 opening fees
tnull 50e727b
lsps2: Serialize lease negotiation
tnull 552cfb8
lsps2: Refill consumed payment leases
tnull 89c3c4c
f Refill leases for newly registered offer targets
tnull ede361d
f Drop cached leases of removed cache targets
tnull d0d29bb
f Drop leases of cache targets expired across restarts
tnull 911c72f
lsps2: Restore cached payment leases
tnull fb2c35c
lsps2: Retry lease negotiation failures
tnull 34a4ec9
f Handle LSPS2 rejections without timeout
tnull d1fc1d1
lsps2: Match variable leases to payments
tnull f2984c1
f Cap variable lease fees at the resolved amount
tnull 8a990d4
lsps2: Separate cache lease validity
tnull 5d87e14
f Only require cached leases to outlive their invoice
tnull 4d590a6
f Document on-demand lease negotiation
tnull 654a1c5
lsps2: Test BOLT12 JIT payments
tnull 5e3e2d6
lsps2: Test multi-LSP BOLT12 selection
tnull 4c627a9
lsps2: Test restored BOLT12 leases
tnull 141fc1d
f Test that unified offers pre-negotiate leases
tnull 39dce83
lsps2: Test payment lease state
tnull eb772a9
lsps2: Filter direct fallback capacity
tnull cc6de28
f Exclude private capacity from direct fallback
tnull File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤖 The CHANGELOG still doesn't have a feature entry for receiving BOLT12 payments over LSPS2 JIT channels — only the fee-limit and skim-field notes. And one wording point in the direct-path compatibility note: for refunds, "no LSPS2 just-in-time channel is available" is always the case — the router never uses a lease for a refund — so the entry reads as if an LSP could help there.