Skip to main content

NodeApi

Trait NodeApi 

Source
pub trait NodeApi {
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<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<SyncStatusQueryData>> + 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<TimeWindowQueryData<Header<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn limits<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<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<Vec<PeerConfig<SeqTypes>>>> + 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<StakeTableWithEpochNumber<SeqTypes>>> + 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<Vec<PeerConfig<SeqTypes>>>> + 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<StakeTableWithEpochNumber<SeqTypes>>> + 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<IndexMap<Address, AuthenticatedValidator<PubKey>>>> + 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<Vec<RegisteredValidator<PubKey>>>> + 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<HashMap<PubKey, f64>>> + 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<HashMap<PubKey, f64>>> + 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<HashMap<PubKey, f64>>> + 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<HashMap<PubKey, f64>>> + 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<Option<RewardAmount>>> + 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<BlockQueryData<SeqTypes>>>> + 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<LeafQueryData<SeqTypes>>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait;
}

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<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<SyncStatusQueryData>> + 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<TimeWindowQueryData<Header<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn limits<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<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<Vec<PeerConfig<SeqTypes>>>> + 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<StakeTableWithEpochNumber<SeqTypes>>> + 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<Vec<PeerConfig<SeqTypes>>>> + 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<StakeTableWithEpochNumber<SeqTypes>>> + 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<IndexMap<Address, AuthenticatedValidator<PubKey>>>> + 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<Vec<RegisteredValidator<PubKey>>>> + 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<HashMap<PubKey, f64>>> + 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<HashMap<PubKey, f64>>> + 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<HashMap<PubKey, f64>>> + 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<HashMap<PubKey, f64>>> + 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<Option<RewardAmount>>> + 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<BlockQueryData<SeqTypes>>>> + 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<LeafQueryData<SeqTypes>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§