Skip to content

[Docs] LSPS2: Improve invoice_parameters_generated docs #3871

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

Merged
merged 1 commit into from
Jun 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lightning-liquidity/src/lsps2/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,11 @@ pub enum LSPS2ServiceEvent {
/// If `payment_size_msat` is [`Option::Some`] then the payer is allowed to use MPP.
/// If `payment_size_msat` is [`Option::None`] then the payer cannot use MPP.
///
/// You must generate an intercept scid and `cltv_expiry_delta` for them to use
/// and call [`LSPS2ServiceHandler::invoice_parameters_generated`].
/// You must generate a `cltv_expiry_delta` and obtain an intercept scid using
/// [`ChannelManager::get_intercept_scid`] for them to use and then call
/// [`LSPS2ServiceHandler::invoice_parameters_generated`].
///
/// [`ChannelManager::get_intercept_scid`]: lightning::ln::channelmanager::ChannelManager::get_intercept_scid
///
/// [`LSPS2ServiceHandler::invoice_parameters_generated`]: crate::lsps2::service::LSPS2ServiceHandler::invoice_parameters_generated
BuyRequest {
Expand Down
5 changes: 4 additions & 1 deletion lightning-liquidity/src/lsps2/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -695,10 +695,13 @@ where
result
}

/// Used by LSP to provide client with the intercept scid and cltv_expiry_delta to use in their invoice.
/// Used by LSP to provide the client with the intercept scid and
/// `cltv_expiry_delta` to include in their invoice. The intercept scid
/// must be retrieved from [`ChannelManager::get_intercept_scid`].
///
/// Should be called in response to receiving a [`LSPS2ServiceEvent::BuyRequest`] event.
///
/// [`ChannelManager::get_intercept_scid`]: lightning::ln::channelmanager::ChannelManager::get_intercept_scid
/// [`LSPS2ServiceEvent::BuyRequest`]: crate::lsps2::event::LSPS2ServiceEvent::BuyRequest
pub fn invoice_parameters_generated(
&self, counterparty_node_id: &PublicKey, request_id: LSPSRequestId, intercept_scid: u64,
Expand Down
Loading