pub enum LSPS1ClientEvent {
SupportedOptionsReady {
request_id: LSPSRequestId,
counterparty_node_id: PublicKey,
supported_options: LSPS1Options,
},
SupportedOptionsRequestFailed {
request_id: LSPSRequestId,
counterparty_node_id: PublicKey,
error: LSPSResponseError,
},
OrderCreated {
request_id: LSPSRequestId,
counterparty_node_id: PublicKey,
order_id: LSPS1OrderId,
order: LSPS1OrderParams,
payment: LSPS1PaymentInfo,
channel: Option<LSPS1ChannelInfo>,
},
OrderStatus {
request_id: LSPSRequestId,
counterparty_node_id: PublicKey,
order_id: LSPS1OrderId,
order: LSPS1OrderParams,
payment: LSPS1PaymentInfo,
channel: Option<LSPS1ChannelInfo>,
},
OrderRequestFailed {
request_id: LSPSRequestId,
counterparty_node_id: PublicKey,
error: LSPSResponseError,
},
}Expand description
An event which an bLIP-51 / LSPS1 client should take some action in response to.
Variants§
SupportedOptionsReady
A request previously issued via LSPS1ClientHandler::request_supported_options
succeeded as the LSP returned the options it supports.
You must check whether LSP supports the parameters the client wants and then call
LSPS1ClientHandler::create_order to place an order.
**Note: ** This event will not be persisted across restarts.
Fields
request_id: LSPSRequestIdThe identifier of the issued bLIP-51 / LSPS1 get_info request, as returned by
LSPS1ClientHandler::request_supported_options
This can be used to track which request this event corresponds to.
supported_options: LSPS1OptionsAll options supported by the LSP.
SupportedOptionsRequestFailed
A request previously issued via LSPS1ClientHandler::request_supported_options
failed as the LSP returned an error response.
**Note: ** This event will not be persisted across restarts.
Fields
request_id: LSPSRequestIdThe identifier of the issued bLIP-51 / LSPS1 get_info request, as returned by
LSPS1ClientHandler::request_supported_options
This can be used to track which request this event corresponds to.
error: LSPSResponseErrorThe error that was returned.
OrderCreated
Confirmation from the LSP about the order created by the client.
When the payment is confirmed, the LSP will open a channel to you with the below agreed upon parameters.
You must pay the invoice or onchain address if you want to continue and then
call LSPS1ClientHandler::check_order_status with the order id
to get information from LSP about progress of the order.
**Note: ** This event will not be persisted across restarts.
Fields
request_id: LSPSRequestIdThe identifier of the issued bLIP-51 / LSPS1 create_order request, as returned by
LSPS1ClientHandler::create_order
This can be used to track which request this event corresponds to.
order_id: LSPS1OrderIdThe id of the channel order.
order: LSPS1OrderParamsThe order created by client and approved by LSP.
payment: LSPS1PaymentInfoThe details regarding payment of the order
channel: Option<LSPS1ChannelInfo>The details regarding state of the channel ordered.
OrderStatus
Information from the LSP about the status of a previously created order.
Will be emitted in response to calling LSPS1ClientHandler::check_order_status.
**Note: ** This event will not be persisted across restarts.
Fields
request_id: LSPSRequestIdThe identifier of the issued bLIP-51 / LSPS1 get_order request, as returned by
LSPS1ClientHandler::check_order_status
This can be used to track which request this event corresponds to.
order_id: LSPS1OrderIdThe id of the channel order.
order: LSPS1OrderParamsThe order created by client and approved by LSP.
payment: LSPS1PaymentInfoThe details regarding payment of the order
channel: Option<LSPS1ChannelInfo>The details regarding state of the channel ordered.
OrderRequestFailed
A request previously issued via LSPS1ClientHandler::create_order or LSPS1ClientHandler::check_order_status.
failed as the LSP returned an error response.
**Note: ** This event will not be persisted across restarts.
Fields
request_id: LSPSRequestIdThe identifier of the issued LSPS1 create_order or get_order request, as returned by
LSPS1ClientHandler::create_order or LSPS1ClientHandler::check_order_status.
This can be used to track which request this event corresponds to.
error: LSPSResponseErrorThe error that was returned.
Trait Implementations§
Source§impl Clone for LSPS1ClientEvent
impl Clone for LSPS1ClientEvent
Source§fn clone(&self) -> LSPS1ClientEvent
fn clone(&self) -> LSPS1ClientEvent
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more