pub trait GlobalFederationApi {
    // Required methods
    fn submit_transaction<'life0, 'async_trait>(
        &'life0 self,
        tx: Transaction
    ) -> Pin<Box<dyn Future<Output = FederationResult<SerdeModuleEncoding<Result<TransactionId, TransactionError>>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn await_block<'life0, 'life1, 'async_trait>(
        &'life0 self,
        block_index: u64,
        decoders: &'life1 ModuleDecoderRegistry
    ) -> Pin<Box<dyn Future<Output = Result<SessionOutcome>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn session_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_transaction<'life0, 'async_trait>(
        &'life0 self,
        txid: TransactionId
    ) -> Pin<Box<dyn Future<Output = FederationResult<TransactionId>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn await_output_outcome<'life0, 'life1, 'async_trait, R>(
        &'life0 self,
        outpoint: OutPoint,
        timeout: Duration,
        module_decoder: &'life1 Decoder
    ) -> Pin<Box<dyn Future<Output = Result<R, OutputOutcomeError>> + Send + 'async_trait>>
       where R: OutputOutcome + 'async_trait,
             Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn download_client_config<'life0, 'life1, 'async_trait>(
        &'life0 self,
        info: &'life1 InviteCode
    ) -> Pin<Box<dyn Future<Output = FederationResult<ClientConfig>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn server_config_consensus_hash<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = FederationResult<Hash>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn upload_backup<'life0, 'life1, 'async_trait>(
        &'life0 self,
        request: &'life1 SignedBackupRequest
    ) -> Pin<Box<dyn Future<Output = FederationResult<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn download_backup<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 PublicKey
    ) -> Pin<Box<dyn Future<Output = FederationResult<Vec<ClientBackupSnapshot>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn discover_api_version_set<'life0, 'life1, 'async_trait>(
        &'life0 self,
        client_versions: &'life1 SupportedApiVersionsSummary
    ) -> Pin<Box<dyn Future<Output = FederationResult<ApiVersionSet>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

The API for the global (non-module) endpoints

Required Methods§

source

fn submit_transaction<'life0, 'async_trait>( &'life0 self, tx: Transaction ) -> Pin<Box<dyn Future<Output = FederationResult<SerdeModuleEncoding<Result<TransactionId, TransactionError>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn await_block<'life0, 'life1, 'async_trait>( &'life0 self, block_index: u64, decoders: &'life1 ModuleDecoderRegistry ) -> Pin<Box<dyn Future<Output = Result<SessionOutcome>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn session_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_transaction<'life0, 'async_trait>( &'life0 self, txid: TransactionId ) -> Pin<Box<dyn Future<Output = FederationResult<TransactionId>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn await_output_outcome<'life0, 'life1, 'async_trait, R>( &'life0 self, outpoint: OutPoint, timeout: Duration, module_decoder: &'life1 Decoder ) -> Pin<Box<dyn Future<Output = Result<R, OutputOutcomeError>> + Send + 'async_trait>>
where R: OutputOutcome + 'async_trait, Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn download_client_config<'life0, 'life1, 'async_trait>( &'life0 self, info: &'life1 InviteCode ) -> Pin<Box<dyn Future<Output = FederationResult<ClientConfig>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Fetch client configuration info only if verified against a federation id

source

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

Fetches the server consensus hash if enough peers agree on it

source

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

source

fn download_backup<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 PublicKey ) -> Pin<Box<dyn Future<Output = FederationResult<Vec<ClientBackupSnapshot>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source

fn discover_api_version_set<'life0, 'life1, 'async_trait>( &'life0 self, client_versions: &'life1 SupportedApiVersionsSummary ) -> Pin<Box<dyn Future<Output = FederationResult<ApiVersionSet>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Query peers and calculate optimal common api versions to use.

Object Safety§

This trait is not object safe.

Implementors§