Skip to content

Commit 5d2f8bc

Browse files
Improve LSPS2 invoice_parameters_generated docs.
On invoice_parameters_generated, explicitly mention that the intercept SCID needs to be retrieved from ChannelManager::get_intercept_scid.
1 parent b5bfa85 commit 5d2f8bc

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

lightning-liquidity/src/lsps2/event.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,11 @@ pub enum LSPS2ServiceEvent {
126126
/// If `payment_size_msat` is [`Option::Some`] then the payer is allowed to use MPP.
127127
/// If `payment_size_msat` is [`Option::None`] then the payer cannot use MPP.
128128
///
129-
/// You must generate an intercept scid and `cltv_expiry_delta` for them to use
130-
/// and call [`LSPS2ServiceHandler::invoice_parameters_generated`].
129+
/// You must generate a `cltv_expiry_delta` and obtain an intercept scid using
130+
/// [`ChannelManager::get_intercept_scid`] for them to use and then call
131+
/// [`LSPS2ServiceHandler::invoice_parameters_generated`].
132+
///
133+
/// [`ChannelManager::get_intercept_scid`]: lightning::ln::channelmanager::ChannelManager::get_intercept_scid
131134
///
132135
/// [`LSPS2ServiceHandler::invoice_parameters_generated`]: crate::lsps2::service::LSPS2ServiceHandler::invoice_parameters_generated
133136
BuyRequest {

lightning-liquidity/src/lsps2/service.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,10 +695,13 @@ where
695695
result
696696
}
697697

698-
/// Used by LSP to provide client with the intercept scid and cltv_expiry_delta to use in their invoice.
698+
/// Used by LSP to provide the client with the intercept scid and
699+
/// `cltv_expiry_delta` to include in their invoice. The intercept scid
700+
/// must be retrieved from [`ChannelManager::get_intercept_scid`].
699701
///
700702
/// Should be called in response to receiving a [`LSPS2ServiceEvent::BuyRequest`] event.
701703
///
704+
/// [`ChannelManager::get_intercept_scid`]: lightning::ln::channelmanager::ChannelManager::get_intercept_scid
702705
/// [`LSPS2ServiceEvent::BuyRequest`]: crate::lsps2::event::LSPS2ServiceEvent::BuyRequest
703706
pub fn invoice_parameters_generated(
704707
&self, counterparty_node_id: &PublicKey, request_id: LSPSRequestId, intercept_scid: u64,

0 commit comments

Comments
 (0)