Struct LSPS1ClientHandler

Source
pub struct LSPS1ClientHandler<ES: Deref>
where ES::Target: EntropySource,
{ /* private fields */ }
Expand description

The main object allowing to send and receive LSPS1 messages.

Implementations§

Source§

impl<ES: Deref> LSPS1ClientHandler<ES>
where ES::Target: EntropySource,

Source

pub fn request_supported_options( &self, counterparty_node_id: PublicKey, ) -> RequestId

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 RequestId, which will be returned via SupportedOptionsReady.

Source

pub fn create_order( &self, counterparty_node_id: &PublicKey, order: OrderParameters, refund_onchain_address: Option<Address>, ) -> RequestId

Places an order with the connected LSP given its counterparty_node_id.

The client agrees to paying channel fees according to the provided parameters.

Source

pub fn check_order_status( &self, counterparty_node_id: &PublicKey, order_id: OrderId, ) -> RequestId

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> !Freeze for LSPS1ClientHandler<ES>

§

impl<ES> RefUnwindSafe for LSPS1ClientHandler<ES>
where ES: RefUnwindSafe,

§

impl<ES> Send for LSPS1ClientHandler<ES>
where ES: Send,

§

impl<ES> Sync for LSPS1ClientHandler<ES>
where ES: Sync,

§

impl<ES> Unpin for LSPS1ClientHandler<ES>
where ES: Unpin,

§

impl<ES> UnwindSafe for LSPS1ClientHandler<ES>
where ES: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.