pub enum LSPS2ServiceEvent {
GetInfo {
request_id: RequestId,
counterparty_node_id: PublicKey,
token: Option<String>,
},
BuyRequest {
request_id: RequestId,
counterparty_node_id: PublicKey,
opening_fee_params: OpeningFeeParams,
payment_size_msat: Option<u64>,
},
OpenChannel {
their_network_key: PublicKey,
amt_to_forward_msat: u64,
opening_fee_msat: u64,
user_channel_id: u128,
intercept_scid: u64,
},
}
Expand description
An event which an LSPS2 server should take some action in response to.
Variants§
GetInfo
A request from a client for information about JIT Channel parameters.
You must calculate the parameters for this client and pass them to
LSPS2ServiceHandler::opening_fee_params_generated
.
If an unrecognized or stale token is provided you can use
[LSPS2ServiceHandler::invalid_token_provided
] to error the request.
Fields
request_id: RequestId
An identifier that must be passed to LSPS2ServiceHandler::opening_fee_params_generated
.
BuyRequest
A client has selected a opening fee parameter to use and would like to purchase a channel with an optional initial payment size.
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
.
Fields
request_id: RequestId
An identifier that must be passed into LSPS2ServiceHandler::invoice_parameters_generated
.
opening_fee_params: OpeningFeeParams
The channel parameters they have selected.
OpenChannel
You should open a channel using ChannelManager::create_channel
.
Fields
Trait Implementations§
Source§impl Clone for LSPS2ServiceEvent
impl Clone for LSPS2ServiceEvent
Source§fn clone(&self) -> LSPS2ServiceEvent
fn clone(&self) -> LSPS2ServiceEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more