pub struct LSPS1ClientHandler<ES: Deref, K: Deref + Clone>{ /* private fields */ }Expand description
The main object allowing to send and receive bLIP-51 / LSPS1 messages.
Implementations§
Source§impl<ES: Deref, K: Deref + Clone> LSPS1ClientHandler<ES, K>
impl<ES: Deref, K: Deref + Clone> LSPS1ClientHandler<ES, K>
Sourcepub fn config(&self) -> &LSPS1ClientConfig
pub fn config(&self) -> &LSPS1ClientConfig
Returns a reference to the used config.
Sourcepub fn request_supported_options(
&self,
counterparty_node_id: PublicKey,
) -> LSPSRequestId
pub fn request_supported_options( &self, counterparty_node_id: PublicKey, ) -> LSPSRequestId
Request the supported options from the LSP.
The user will receive the LSP’s response via an SupportedOptionsReady event.
counterparty_node_id is the node_id of the LSP you would like to use.
Returns the used LSPSRequestId, which will be returned via SupportedOptionsReady.
Sourcepub fn create_order(
&self,
counterparty_node_id: &PublicKey,
order: LSPS1OrderParams,
refund_onchain_address: Option<Address>,
) -> LSPSRequestId
pub fn create_order( &self, counterparty_node_id: &PublicKey, order: LSPS1OrderParams, refund_onchain_address: Option<Address>, ) -> LSPSRequestId
Places an order with the connected LSP given its counterparty_node_id.
The client agrees to paying channel fees according to the provided parameters.
Sourcepub fn check_order_status(
&self,
counterparty_node_id: &PublicKey,
order_id: LSPS1OrderId,
) -> LSPSRequestId
pub fn check_order_status( &self, counterparty_node_id: &PublicKey, order_id: LSPS1OrderId, ) -> LSPSRequestId
Queries the status of a pending payment, i.e., whether a payment has been received by the LSP.
Upon success an LSPS1ClientEvent::OrderStatus event will be emitted.
Auto Trait Implementations§
impl<ES, K> !Freeze for LSPS1ClientHandler<ES, K>
impl<ES, K> RefUnwindSafe for LSPS1ClientHandler<ES, K>where
ES: RefUnwindSafe,
K: RefUnwindSafe,
impl<ES, K> Send for LSPS1ClientHandler<ES, K>
impl<ES, K> Sync for LSPS1ClientHandler<ES, K>
impl<ES, K> Unpin for LSPS1ClientHandler<ES, K>where
ES: Unpin,
impl<ES, K> UnwindSafe for LSPS1ClientHandler<ES, K>where
ES: UnwindSafe,
K: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more