fedimint_lnv2_client::api

Trait LightningFederationApi

Source
pub trait LightningFederationApi {
    // Required methods
    fn consensus_block_count<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = FederationResult<u64>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn await_incoming_contract<'life0, 'life1, 'async_trait>(
        &'life0 self,
        contract_id: &'life1 ContractId,
        expiration: u64,
    ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn await_preimage<'life0, 'life1, 'async_trait>(
        &'life0 self,
        contract_id: &'life1 ContractId,
        expiration: u64,
    ) -> Pin<Box<dyn Future<Output = Option<[u8; 32]>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn gateways<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = FederationResult<Vec<SafeUrl>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn gateways_from_peer<'life0, 'async_trait>(
        &'life0 self,
        peer: PeerId,
    ) -> Pin<Box<dyn Future<Output = PeerResult<Vec<SafeUrl>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn add_gateway<'life0, 'async_trait>(
        &'life0 self,
        auth: ApiAuth,
        gateway: SafeUrl,
    ) -> Pin<Box<dyn Future<Output = FederationResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn remove_gateway<'life0, 'async_trait>(
        &'life0 self,
        auth: ApiAuth,
        gateway: SafeUrl,
    ) -> Pin<Box<dyn Future<Output = FederationResult<bool>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn consensus_block_count<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = FederationResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn await_incoming_contract<'life0, 'life1, 'async_trait>( &'life0 self, contract_id: &'life1 ContractId, expiration: u64, ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn await_preimage<'life0, 'life1, 'async_trait>( &'life0 self, contract_id: &'life1 ContractId, expiration: u64, ) -> Pin<Box<dyn Future<Output = Option<[u8; 32]>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source

fn gateways<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = FederationResult<Vec<SafeUrl>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn gateways_from_peer<'life0, 'async_trait>( &'life0 self, peer: PeerId, ) -> Pin<Box<dyn Future<Output = PeerResult<Vec<SafeUrl>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn add_gateway<'life0, 'async_trait>( &'life0 self, auth: ApiAuth, gateway: SafeUrl, ) -> Pin<Box<dyn Future<Output = FederationResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn remove_gateway<'life0, 'async_trait>( &'life0 self, auth: ApiAuth, gateway: SafeUrl, ) -> Pin<Box<dyn Future<Output = FederationResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§