Skip to main content

NodeApi

Trait NodeApi 

Source
pub trait NodeApi {
    type VidShare: Serialize + Send + Sync + 'static;
    type SyncStatus: Serialize + Send + Sync + 'static;
    type HeaderWindow: Serialize + Send + Sync + 'static;
    type Limits: Serialize + Send + Sync + 'static;
    type StakeTable: Serialize + Send + Sync + 'static;
    type StakeTableCurrent: Serialize + Send + Sync + 'static;
    type Validators: Serialize + Send + Sync + 'static;
    type AllValidators: Serialize + Send + Sync + 'static;
    type Participation: Serialize + Send + Sync + 'static;
    type BlockReward: Serialize + Send + Sync + 'static;
    type Block: Serialize + Send + Sync + 'static;
    type Leaf: Serialize + Send + Sync + 'static;

Show 20 methods // Required methods fn block_height<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn count_transactions<'life0, 'async_trait>( &'life0 self, from: Option<u64>, to: Option<u64>, namespace: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn payload_size<'life0, 'async_trait>( &'life0 self, from: Option<u64>, to: Option<u64>, namespace: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_vid_share<'life0, 'async_trait>( &'life0 self, id: VidShareId, ) -> Pin<Box<dyn Future<Output = Result<Self::VidShare>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn sync_status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::SyncStatus>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_header_window<'life0, 'async_trait>( &'life0 self, start: HeaderWindowStart, end: u64, ) -> Pin<Box<dyn Future<Output = Result<Self::HeaderWindow>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn limits<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::Limits>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stake_table<'life0, 'async_trait>( &'life0 self, epoch: u64, ) -> Pin<Box<dyn Future<Output = Result<Self::StakeTable>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn stake_table_current<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::StakeTableCurrent>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn da_stake_table<'life0, 'async_trait>( &'life0 self, epoch: u64, ) -> Pin<Box<dyn Future<Output = Result<Self::StakeTable>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn da_stake_table_current<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::StakeTableCurrent>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_validators<'life0, 'async_trait>( &'life0 self, epoch: u64, ) -> Pin<Box<dyn Future<Output = Result<Self::Validators>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_all_validators<'life0, 'async_trait>( &'life0 self, epoch: u64, offset: u64, limit: u64, ) -> Pin<Box<dyn Future<Output = Result<Self::AllValidators>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn current_proposal_participation<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::Participation>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn proposal_participation<'life0, 'async_trait>( &'life0 self, epoch: u64, ) -> Pin<Box<dyn Future<Output = Result<Self::Participation>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn current_vote_participation<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::Participation>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn vote_participation<'life0, 'async_trait>( &'life0 self, epoch: u64, ) -> Pin<Box<dyn Future<Output = Result<Self::Participation>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_block_reward<'life0, 'async_trait>( &'life0 self, epoch: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<Self::BlockReward>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_oldest_block<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Block>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_oldest_leaf<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Leaf>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}

Required Associated Types§

Source

type VidShare: Serialize + Send + Sync + 'static

Source

type SyncStatus: Serialize + Send + Sync + 'static

Source

type HeaderWindow: Serialize + Send + Sync + 'static

Source

type Limits: Serialize + Send + Sync + 'static

Source

type StakeTable: Serialize + Send + Sync + 'static

Source

type StakeTableCurrent: Serialize + Send + Sync + 'static

Source

type Validators: Serialize + Send + Sync + 'static

Source

type AllValidators: Serialize + Send + Sync + 'static

Source

type Participation: Serialize + Send + Sync + 'static

Source

type BlockReward: Serialize + Send + Sync + 'static

Source

type Block: Serialize + Send + Sync + 'static

Source

type Leaf: Serialize + Send + Sync + 'static

Required Methods§

Source

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

Source

fn count_transactions<'life0, 'async_trait>( &'life0 self, from: Option<u64>, to: Option<u64>, namespace: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn payload_size<'life0, 'async_trait>( &'life0 self, from: Option<u64>, to: Option<u64>, namespace: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_vid_share<'life0, 'async_trait>( &'life0 self, id: VidShareId, ) -> Pin<Box<dyn Future<Output = Result<Self::VidShare>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn sync_status<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::SyncStatus>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_header_window<'life0, 'async_trait>( &'life0 self, start: HeaderWindowStart, end: u64, ) -> Pin<Box<dyn Future<Output = Result<Self::HeaderWindow>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn limits<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::Limits>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

Source

fn stake_table_current<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::StakeTableCurrent>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

Source

fn da_stake_table_current<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::StakeTableCurrent>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

Source

fn get_all_validators<'life0, 'async_trait>( &'life0 self, epoch: u64, offset: u64, limit: u64, ) -> Pin<Box<dyn Future<Output = Result<Self::AllValidators>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn current_proposal_participation<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::Participation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

Source

fn current_vote_participation<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Self::Participation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

Source

fn get_block_reward<'life0, 'async_trait>( &'life0 self, epoch: Option<u64>, ) -> Pin<Box<dyn Future<Output = Result<Self::BlockReward>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

Source

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

Implementors§