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;
}