Trait breez_sdk_core::LspAPI

source ·
pub trait LspAPI: Send + Sync {
    // Required methods
    fn list_lsps<'life0, 'async_trait>(
        &'life0 self,
        node_pubkey: String,
    ) -> Pin<Box<dyn Future<Output = SdkResult<Vec<LspInformation>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn list_used_lsps<'life0, 'async_trait>(
        &'life0 self,
        node_pubkey: String,
    ) -> Pin<Box<dyn Future<Output = SdkResult<Vec<LspInformation>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn register_payment_notifications<'life0, 'async_trait>(
        &'life0 self,
        lsp_id: String,
        lsp_pubkey: Vec<u8>,
        webhook_url: String,
        webhook_url_signature: String,
    ) -> Pin<Box<dyn Future<Output = SdkResult<RegisterPaymentNotificationResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn unregister_payment_notifications<'life0, 'async_trait>(
        &'life0 self,
        lsp_id: String,
        lsp_pubkey: Vec<u8>,
        webhook_url: String,
        webhook_url_signature: String,
    ) -> Pin<Box<dyn Future<Output = SdkResult<RemovePaymentNotificationResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn register_payment<'life0, 'async_trait>(
        &'life0 self,
        lsp_id: String,
        lsp_pubkey: Vec<u8>,
        payment_info: PaymentInformation,
    ) -> Pin<Box<dyn Future<Output = SdkResult<RegisterPaymentReply>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait covering LSP-related functionality

Required Methods§

source

fn list_lsps<'life0, 'async_trait>( &'life0 self, node_pubkey: String, ) -> Pin<Box<dyn Future<Output = SdkResult<Vec<LspInformation>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List LSPs available to the given pubkey

source

fn list_used_lsps<'life0, 'async_trait>( &'life0 self, node_pubkey: String, ) -> Pin<Box<dyn Future<Output = SdkResult<Vec<LspInformation>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

List all LSPs, active and historical, used by the given pubkey

source

fn register_payment_notifications<'life0, 'async_trait>( &'life0 self, lsp_id: String, lsp_pubkey: Vec<u8>, webhook_url: String, webhook_url_signature: String, ) -> Pin<Box<dyn Future<Output = SdkResult<RegisterPaymentNotificationResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Register for webhook callbacks at the given webhook_url whenever a new payment is received

source

fn unregister_payment_notifications<'life0, 'async_trait>( &'life0 self, lsp_id: String, lsp_pubkey: Vec<u8>, webhook_url: String, webhook_url_signature: String, ) -> Pin<Box<dyn Future<Output = SdkResult<RemovePaymentNotificationResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Unregister for webhook callbacks for the given webhook_url

source

fn register_payment<'life0, 'async_trait>( &'life0 self, lsp_id: String, lsp_pubkey: Vec<u8>, payment_info: PaymentInformation, ) -> Pin<Box<dyn Future<Output = SdkResult<RegisterPaymentReply>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Register a payment to open a new channel with the LSP

Implementors§