LSPS2ServiceHandlerSync

Struct LSPS2ServiceHandlerSync 

Source
pub struct LSPS2ServiceHandlerSync<'a, CM: Deref, K: Deref + Clone, T: Deref + Clone>{ /* private fields */ }
Expand description

A synchroneous wrapper around LSPS2ServiceHandler to be used in contexts where async is not available.

Implementations§

Source§

impl<'a, CM: Deref, K: Deref + Clone, T: Deref + Clone> LSPS2ServiceHandlerSync<'a, CM, K, T>

Source

pub fn config(&self) -> &LSPS2ServiceConfig

Returns a reference to the used config.

Wraps LSPS2ServiceHandler::config.

Source

pub fn invalid_token_provided( &self, counterparty_node_id: &PublicKey, request_id: LSPSRequestId, ) -> Result<(), APIError>

Used by LSP to inform a client requesting a JIT Channel the token they used is invalid.

Wraps LSPS2ServiceHandler::invalid_token_provided.

Source

pub fn opening_fee_params_generated( &self, counterparty_node_id: &PublicKey, request_id: LSPSRequestId, opening_fee_params_menu: Vec<LSPS2RawOpeningFeeParams>, ) -> Result<(), APIError>

Used by LSP to provide fee parameters to a client requesting a JIT Channel.

Wraps LSPS2ServiceHandler::opening_fee_params_generated.

Source

pub fn invoice_parameters_generated( &self, counterparty_node_id: &PublicKey, request_id: LSPSRequestId, intercept_scid: u64, cltv_expiry_delta: u32, client_trusts_lsp: bool, user_channel_id: u128, ) -> Result<(), APIError>

Used by LSP to provide the client with the intercept scid, a unique user_channel_id, and cltv_expiry_delta to include in their invoice.

Wraps LSPS2ServiceHandler::invoice_parameters_generated.

Source

pub fn htlc_intercepted( &self, intercept_scid: u64, intercept_id: InterceptId, expected_outbound_amount_msat: u64, payment_hash: PaymentHash, ) -> Result<(), APIError>

Forward Event::HTLCIntercepted event parameters into this function.

Wraps LSPS2ServiceHandler::htlc_intercepted.

Source

pub fn htlc_handling_failed( &self, failure_type: HTLCHandlingFailureType, ) -> Result<(), APIError>

Forward Event::HTLCHandlingFailed event parameter into this function.

Wraps LSPS2ServiceHandler::htlc_handling_failed.

Source

pub fn payment_forwarded( &self, next_channel_id: ChannelId, skimmed_fee_msat: u64, ) -> Result<(), APIError>

Forward Event::PaymentForwarded event parameter into this function.

Wraps LSPS2ServiceHandler::payment_forwarded.

Source

pub fn channel_needs_manual_broadcast( &self, user_channel_id: u128, counterparty_node_id: &PublicKey, ) -> Result<bool, APIError>

Source

pub fn store_funding_transaction( &self, user_channel_id: u128, counterparty_node_id: &PublicKey, funding_tx: Transaction, ) -> Result<(), APIError>

Source

pub fn set_funding_tx_broadcast_safe( &self, user_channel_id: u128, counterparty_node_id: &PublicKey, ) -> Result<(), APIError>

Source

pub fn channel_open_abandoned( &self, counterparty_node_id: &PublicKey, user_channel_id: u128, ) -> Result<(), APIError>

Abandons a pending JIT‐open flow for user_channel_id, removing all local state.

Wraps LSPS2ServiceHandler::channel_open_abandoned.

Source

pub fn channel_open_failed( &self, counterparty_node_id: &PublicKey, user_channel_id: u128, ) -> Result<(), APIError>

Used to fail intercepted HTLCs backwards when a channel open attempt ultimately fails.

Wraps LSPS2ServiceHandler::channel_open_failed.

Source

pub fn channel_ready( &self, user_channel_id: u128, channel_id: &ChannelId, counterparty_node_id: &PublicKey, ) -> Result<(), APIError>

Forward Event::ChannelReady event parameters into this function.

Wraps LSPS2ServiceHandler::channel_ready.

Auto Trait Implementations§

§

impl<'a, CM, K, T> Freeze for LSPS2ServiceHandlerSync<'a, CM, K, T>

§

impl<'a, CM, K, T> RefUnwindSafe for LSPS2ServiceHandlerSync<'a, CM, K, T>

§

impl<'a, CM, K, T> Send for LSPS2ServiceHandlerSync<'a, CM, K, T>
where CM: Sync, K: Sync + Send, T: Sync,

§

impl<'a, CM, K, T> Sync for LSPS2ServiceHandlerSync<'a, CM, K, T>
where CM: Sync, K: Sync + Send, T: Sync,

§

impl<'a, CM, K, T> Unpin for LSPS2ServiceHandlerSync<'a, CM, K, T>

§

impl<'a, CM, K, T> UnwindSafe for LSPS2ServiceHandlerSync<'a, CM, K, T>

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.