Trait diem_data_client::DiemDataClient [−][src]
pub trait DiemDataClient {
fn get_global_data_summary(&self) -> GlobalDataSummary;
fn get_account_states_with_proof<'life0, 'async_trait>(
&'life0 self,
version: u64,
start_account_index: u64,
end_account_index: u64
) -> Pin<Box<dyn Future<Output = Result<Response<AccountStatesChunkWithProof>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_epoch_ending_ledger_infos<'life0, 'async_trait>(
&'life0 self,
start_epoch: Epoch,
expected_end_epoch: Epoch
) -> Pin<Box<dyn Future<Output = Result<Response<Vec<LedgerInfoWithSignatures>>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_number_of_account_states<'life0, 'async_trait>(
&'life0 self,
version: Version
) -> Pin<Box<dyn Future<Output = Result<Response<u64>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_transaction_outputs_with_proof<'life0, 'async_trait>(
&'life0 self,
proof_version: Version,
start_version: Version,
end_version: Version
) -> Pin<Box<dyn Future<Output = Result<Response<TransactionOutputListWithProof>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn get_transactions_with_proof<'life0, 'async_trait>(
&'life0 self,
proof_version: Version,
start_version: Version,
end_version: Version,
include_events: bool
) -> Pin<Box<dyn Future<Output = Result<Response<TransactionListWithProof>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
}Expand description
The API offered by the Diem Data Client.
Required methods
fn get_global_data_summary(&self) -> GlobalDataSummary
fn get_global_data_summary(&self) -> GlobalDataSummary
Returns a global summary of the data currently available in the network.
This API is intended to be relatively cheap to call, usually returning a cached view of this data client’s available data.
Returns a single account states chunk with proof, containing the accounts from start to end index (inclusive) at the specified version. The proof version is the same as the specified version.
Returns all epoch ending ledger infos between start and end (inclusive). If the data cannot be fetched (e.g., the number of epochs is too large), an error is returned.
Returns the number of account states at the specified version.
Returns a transaction output list with proof object, with transaction
outputs from start to end versions (inclusive). The proof is relative to
the specified proof_version. If the data cannot be fetched (e.g., the
number of transaction outputs is too large), an error is returned.
fn get_transactions_with_proof<'life0, 'async_trait>(
&'life0 self,
proof_version: Version,
start_version: Version,
end_version: Version,
include_events: bool
) -> Pin<Box<dyn Future<Output = Result<Response<TransactionListWithProof>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
fn get_transactions_with_proof<'life0, 'async_trait>(
&'life0 self,
proof_version: Version,
start_version: Version,
end_version: Version,
include_events: bool
) -> Pin<Box<dyn Future<Output = Result<Response<TransactionListWithProof>>> + Send + 'async_trait>> where
'life0: 'async_trait,
Self: 'async_trait,
Returns a transaction list with proof object, with transactions from
start to end versions (inclusive). The proof is relative to the specified
proof_version. If include_events is true, events are included in the
proof. If the data cannot be fetched (e.g., the number of transactions is
too large), an error is returned.