fedimint_lnv2_client::api

Trait LnFederationApi

source
pub trait LnFederationApi {
    // 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 outgoing_contract_expiration<'life0, 'life1, 'async_trait>(
        &'life0 self,
        contract_id: &'life1 ContractId,
    ) -> Pin<Box<dyn Future<Output = FederationResult<Option<u64>>> + 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 outgoing_contract_expiration<'life0, 'life1, 'async_trait>( &'life0 self, contract_id: &'life1 ContractId, ) -> Pin<Box<dyn Future<Output = FederationResult<Option<u64>>> + 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§

source§

impl<T> LnFederationApi for T
where T: IModuleFederationApi + MaybeSend + MaybeSync + 'static + ?Sized,