PaymentObserver

Trait PaymentObserver 

Source
pub trait PaymentObserver: Send + Sync {
    // Required method
    fn before_send<'life0, 'async_trait>(
        &'life0 self,
        payments: Vec<ProvisionalPayment>,
    ) -> Pin<Box<dyn Future<Output = Result<(), PaymentObserverError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

This interface is used to observe outgoing payments before Lightning, Spark and onchain Bitcoin payments. If the implementation returns an error, the payment is cancelled.

Required Methods§

Source

fn before_send<'life0, 'async_trait>( &'life0 self, payments: Vec<ProvisionalPayment>, ) -> Pin<Box<dyn Future<Output = Result<(), PaymentObserverError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Called before Lightning, Spark or onchain Bitcoin payments are made

Implementors§