Skip to content

sdk: Allow setting an invoice expiry in receive - #774

Draft
olegfomenko wants to merge 1 commit into
mainfrom
feature/expose-invoice-expriry
Draft

olegfomenko wants to merge 1 commit into
mainfrom
feature/expose-invoice-expriry

Conversation

@olegfomenko

Copy link
Copy Markdown
Member

Add an optional expiry (seconds) to LspInvoiceRequest. The plugin passes it to CLN's invoice when no JIT channel is needed, and forwards it to lsps-lsps2-invoice for JIT channels; CLN ignores it there for now. When choosing LSP fee offers, the plugin now picks the one with the latest valid_until.

Exposed in gl-sdk Node::receive (default None in Kotlin/Swift/Python), gl-sdk-napi, gl-sdk-cli (--expiry) and glclient lsp_invoice.

BREAKING CHANGE: Rust Node::receive takes a new expiry argument.

Add an optional `expiry` (seconds) to `LspInvoiceRequest`. The plugin
passes it to CLN's `invoice` when no JIT channel is needed, and forwards
it to `lsps-lsps2-invoice` for JIT channels; CLN ignores it there for
now. When choosing LSP fee offers, the plugin now picks the one with the
latest `valid_until`.

Exposed in gl-sdk `Node::receive` (default None in Kotlin/Swift/Python),
gl-sdk-napi, gl-sdk-cli (`--expiry`) and glclient `lsp_invoice`.

BREAKING CHANGE: Rust `Node::receive` takes a new `expiry` argument.
@olegfomenko
olegfomenko marked this pull request as draft November 19, 2026 22:46
@olegfomenko

Copy link
Copy Markdown
Member Author

NOTE: haven't run tests yet

This branch has not been deployed

No deployments
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.

1 participant