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>
impl<'a, CM: Deref, K: Deref + Clone, T: Deref + Clone> LSPS2ServiceHandlerSync<'a, CM, K, T>
Sourcepub fn config(&self) -> &LSPS2ServiceConfig
pub fn config(&self) -> &LSPS2ServiceConfig
Returns a reference to the used config.
Wraps LSPS2ServiceHandler::config.
Sourcepub fn invalid_token_provided(
&self,
counterparty_node_id: &PublicKey,
request_id: LSPSRequestId,
) -> Result<(), APIError>
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.
Sourcepub fn opening_fee_params_generated(
&self,
counterparty_node_id: &PublicKey,
request_id: LSPSRequestId,
opening_fee_params_menu: Vec<LSPS2RawOpeningFeeParams>,
) -> Result<(), APIError>
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.
Sourcepub 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>
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.
Sourcepub fn htlc_intercepted(
&self,
intercept_scid: u64,
intercept_id: InterceptId,
expected_outbound_amount_msat: u64,
payment_hash: PaymentHash,
) -> Result<(), APIError>
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.
Sourcepub fn htlc_handling_failed(
&self,
failure_type: HTLCHandlingFailureType,
) -> Result<(), APIError>
pub fn htlc_handling_failed( &self, failure_type: HTLCHandlingFailureType, ) -> Result<(), APIError>
Forward Event::HTLCHandlingFailed event parameter into this function.
Sourcepub fn payment_forwarded(
&self,
next_channel_id: ChannelId,
skimmed_fee_msat: u64,
) -> Result<(), APIError>
pub fn payment_forwarded( &self, next_channel_id: ChannelId, skimmed_fee_msat: u64, ) -> Result<(), APIError>
Forward Event::PaymentForwarded event parameter into this function.
Sourcepub fn channel_needs_manual_broadcast(
&self,
user_channel_id: u128,
counterparty_node_id: &PublicKey,
) -> Result<bool, APIError>
pub fn channel_needs_manual_broadcast( &self, user_channel_id: u128, counterparty_node_id: &PublicKey, ) -> Result<bool, APIError>
Sourcepub fn store_funding_transaction(
&self,
user_channel_id: u128,
counterparty_node_id: &PublicKey,
funding_tx: Transaction,
) -> Result<(), APIError>
pub fn store_funding_transaction( &self, user_channel_id: u128, counterparty_node_id: &PublicKey, funding_tx: Transaction, ) -> Result<(), APIError>
Sourcepub fn set_funding_tx_broadcast_safe(
&self,
user_channel_id: u128,
counterparty_node_id: &PublicKey,
) -> Result<(), APIError>
pub fn set_funding_tx_broadcast_safe( &self, user_channel_id: u128, counterparty_node_id: &PublicKey, ) -> Result<(), APIError>
Sourcepub fn channel_open_abandoned(
&self,
counterparty_node_id: &PublicKey,
user_channel_id: u128,
) -> Result<(), APIError>
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.
Sourcepub fn channel_open_failed(
&self,
counterparty_node_id: &PublicKey,
user_channel_id: u128,
) -> Result<(), APIError>
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.
Sourcepub fn channel_ready(
&self,
user_channel_id: u128,
channel_id: &ChannelId,
counterparty_node_id: &PublicKey,
) -> Result<(), APIError>
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.