breez_sdk_liquid::lightning_125::onion_message::async_payments

Trait AsyncPaymentsMessageHandler

pub trait AsyncPaymentsMessageHandler {
    // Required methods
    fn held_htlc_available(
        &self,
        message: HeldHtlcAvailable,
        responder: Option<Responder>,
    ) -> Option<(ReleaseHeldHtlc, ResponseInstruction)>;
    fn release_held_htlc(&self, message: ReleaseHeldHtlc);

    // Provided method
    fn release_pending_messages(
        &self,
    ) -> Vec<(AsyncPaymentsMessage, MessageSendInstructions)> { ... }
}
Expand description

A handler for an OnionMessage containing an async payments message as its payload.

Required Methods§

fn held_htlc_available( &self, message: HeldHtlcAvailable, responder: Option<Responder>, ) -> Option<(ReleaseHeldHtlc, ResponseInstruction)>

Handle a HeldHtlcAvailable message. A ReleaseHeldHtlc should be returned to release the held funds.

fn release_held_htlc(&self, message: ReleaseHeldHtlc)

Handle a ReleaseHeldHtlc message. If authentication of the message succeeds, an HTLC should be released to the corresponding payee.

Provided Methods§

fn release_pending_messages( &self, ) -> Vec<(AsyncPaymentsMessage, MessageSendInstructions)>

Release any AsyncPaymentsMessages that need to be sent.

Typically, this is used for messages initiating an async payment flow rather than in response to another message.

Implementors§

§

impl AsyncPaymentsMessageHandler for IgnoringMessageHandler

§

impl<M, T, ES, NS, SP, F, R, L> AsyncPaymentsMessageHandler for ChannelManager<M, T, ES, NS, SP, F, R, L>
where M: Deref, T: Deref, ES: Deref, NS: Deref, SP: Deref, F: Deref, R: Deref, L: Deref, <M as Deref>::Target: Watch<<<SP as Deref>::Target as SignerProvider>::EcdsaSigner>, <T as Deref>::Target: BroadcasterInterface, <ES as Deref>::Target: EntropySource, <NS as Deref>::Target: NodeSigner, <SP as Deref>::Target: SignerProvider, <F as Deref>::Target: FeeEstimator, <R as Deref>::Target: Router, <L as Deref>::Target: Logger,