Skip to content

LSPS2 client support#143

Open
tnull wants to merge 3 commits intolightningdevkit:mainfrom
tnull:2026-03-lsps2-client-support
Open

LSPS2 client support#143
tnull wants to merge 3 commits intolightningdevkit:mainfrom
tnull:2026-03-lsps2-client-support

Conversation

@tnull
Copy link
Collaborator

@tnull tnull commented Mar 7, 2026

I wanted to connect my server to an LSP but found that it currently doesn't expose the corresponding APIs. Here we add them.

@ldk-reviews-bot
Copy link

ldk-reviews-bot commented Mar 7, 2026

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

tnull added 3 commits March 7, 2026 17:08
Expose LSPS2 client settings in  so nodes can be configured to source
just-in-time liquidity from an LSP.

Co-Authored-By: HAL 9000

Signed-off-by: Elias Rohrer <dev@tnull.de>
Expose dedicated LSPS2 invoice endpoints so callers can request fixed
and variable-amount JIT invoices without overloading the existing
 API surface.

Generated with the assistance of AI.

Co-Authored-By: HAL 9000
Expose the new LSPS2 JIT invoice endpoints through the Rust client and
CLI so callers can request either fixed or variable-amount invoices
without constructing protobuf messages manually.

Generated with the assistance of AI.

Co-Authored-By: HAL 9000
Copy link
Collaborator

@benthecarman benthecarman left a comment

Choose a reason for hiding this comment

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

i think your 2nd commit message got screwed up, a couple nits otherwise looks good to me

# The public key of the LSPS2 LSP we source just-in-time liquidity from.
node_pubkey = "<lsp node pubkey>"
# Address to connect to the LSPS2 LSP (IPv4:port, IPv6:port, OnionV3:port, or hostname:port).
address = "127.0.0.1:9735"
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we make this not a local host ip, that might confused people thinking its something they are supposed to run

Bolt11ReceiveViaJitChannel {
#[arg(help = "Amount to request, e.g. 50sat or 50000msat")]
amount: Amount,
#[arg(short, long, help = "Description to attach along with the invoice")]
Copy link
Collaborator

Choose a reason for hiding this comment

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

can we drop short, long here so you can just feed the description directly

)]
Bolt11ReceiveVariableAmountViaJitChannel {
#[arg(short, long, help = "Description to attach along with the invoice")]
description: Option<String>,
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here

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