Trait ex3_blockchain_client::Blockchain

source ·
pub trait Blockchain: Send + Sync {
    // Required methods
    fn get_current_block_height<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = CanisterResult<Option<CandidBlockHeight>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn chain_length<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = CanisterResult<Nat>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_genesis_block_hash<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = CanisterResult<BlockHash>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_block_header_by_height<'life0, 'async_trait>(
        &'life0 self,
        height: CandidBlockHeight
    ) -> Pin<Box<dyn Future<Output = CanisterResult<BlockHeaderResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_last_block_header<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = CanisterResult<Option<CandidConsensusBlockHeader>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn submit_consensus_report<'life0, 'async_trait>(
        &'life0 self,
        consensus_report: CandidConsensusReport
    ) -> Pin<Box<dyn Future<Output = CanisterResult<ActorResult<()>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_snapshot_vault_cursor_by_height<'life0, 'async_trait>(
        &'life0 self,
        height: CandidBlockHeight
    ) -> Pin<Box<dyn Future<Output = CanisterResult<ActorResult<CandidSnapshotCursor>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

source

fn get_current_block_height<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = CanisterResult<Option<CandidBlockHeight>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn chain_length<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = CanisterResult<Nat>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_genesis_block_hash<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = CanisterResult<BlockHash>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_block_header_by_height<'life0, 'async_trait>( &'life0 self, height: CandidBlockHeight ) -> Pin<Box<dyn Future<Output = CanisterResult<BlockHeaderResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_last_block_header<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = CanisterResult<Option<CandidConsensusBlockHeader>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn submit_consensus_report<'life0, 'async_trait>( &'life0 self, consensus_report: CandidConsensusReport ) -> Pin<Box<dyn Future<Output = CanisterResult<ActorResult<()>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source

fn get_snapshot_vault_cursor_by_height<'life0, 'async_trait>( &'life0 self, height: CandidBlockHeight ) -> Pin<Box<dyn Future<Output = CanisterResult<ActorResult<CandidSnapshotCursor>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§