Trait iota_json_rpc_api::ReadApiClient

source ·
pub trait ReadApiClient: ClientT {
Show 14 methods // Provided methods fn get_transaction_block<'life0, 'async_trait>( &'life0 self, digest: TransactionDigest, options: Option<IotaTransactionBlockResponseOptions>, ) -> Pin<Box<dyn Future<Output = Result<IotaTransactionBlockResponse, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn multi_get_transaction_blocks<'life0, 'async_trait>( &'life0 self, digests: Vec<TransactionDigest>, options: Option<IotaTransactionBlockResponseOptions>, ) -> Pin<Box<dyn Future<Output = Result<Vec<IotaTransactionBlockResponse>, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_object<'life0, 'async_trait>( &'life0 self, object_id: ObjectID, options: Option<IotaObjectDataOptions>, ) -> Pin<Box<dyn Future<Output = Result<IotaObjectResponse, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn multi_get_objects<'life0, 'async_trait>( &'life0 self, object_ids: Vec<ObjectID>, options: Option<IotaObjectDataOptions>, ) -> Pin<Box<dyn Future<Output = Result<Vec<IotaObjectResponse>, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn try_get_past_object<'life0, 'async_trait>( &'life0 self, object_id: ObjectID, version: SequenceNumber, options: Option<IotaObjectDataOptions>, ) -> Pin<Box<dyn Future<Output = Result<IotaPastObjectResponse, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn try_get_object_before_version<'life0, 'async_trait>( &'life0 self, object_id: ObjectID, version: SequenceNumber, ) -> Pin<Box<dyn Future<Output = Result<IotaPastObjectResponse, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn try_multi_get_past_objects<'life0, 'async_trait>( &'life0 self, past_objects: Vec<IotaGetPastObjectRequest>, options: Option<IotaObjectDataOptions>, ) -> Pin<Box<dyn Future<Output = Result<Vec<IotaPastObjectResponse>, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_checkpoint<'life0, 'async_trait>( &'life0 self, id: CheckpointId, ) -> Pin<Box<dyn Future<Output = Result<Checkpoint, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_checkpoints<'life0, 'async_trait>( &'life0 self, cursor: Option<BigInt<u64>>, limit: Option<usize>, descending_order: bool, ) -> Pin<Box<dyn Future<Output = Result<CheckpointPage, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_events<'life0, 'async_trait>( &'life0 self, transaction_digest: TransactionDigest, ) -> Pin<Box<dyn Future<Output = Result<Vec<IotaEvent>, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_total_transaction_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<BigInt<u64>, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_latest_checkpoint_sequence_number<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<BigInt<u64>, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_protocol_config<'life0, 'async_trait>( &'life0 self, version: Option<BigInt<u64>>, ) -> Pin<Box<dyn Future<Output = Result<ProtocolConfigResponse, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... } fn get_chain_identifier<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String, Error>> + Send + 'async_trait>> where Self: Sync + 'async_trait, 'life0: 'async_trait { ... }
}
Expand description

Client implementation for the ReadApi RPC API.

Provided Methods§

source

fn get_transaction_block<'life0, 'async_trait>( &'life0 self, digest: TransactionDigest, options: Option<IotaTransactionBlockResponseOptions>, ) -> Pin<Box<dyn Future<Output = Result<IotaTransactionBlockResponse, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Return the transaction response object.

source

fn multi_get_transaction_blocks<'life0, 'async_trait>( &'life0 self, digests: Vec<TransactionDigest>, options: Option<IotaTransactionBlockResponseOptions>, ) -> Pin<Box<dyn Future<Output = Result<Vec<IotaTransactionBlockResponse>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Returns an ordered list of transaction responses The method will throw an error if the input contains any duplicate or the input size exceeds QUERY_MAX_RESULT_LIMIT

source

fn get_object<'life0, 'async_trait>( &'life0 self, object_id: ObjectID, options: Option<IotaObjectDataOptions>, ) -> Pin<Box<dyn Future<Output = Result<IotaObjectResponse, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Return the object information for a specified object

source

fn multi_get_objects<'life0, 'async_trait>( &'life0 self, object_ids: Vec<ObjectID>, options: Option<IotaObjectDataOptions>, ) -> Pin<Box<dyn Future<Output = Result<Vec<IotaObjectResponse>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Return the object data for a list of objects

source

fn try_get_past_object<'life0, 'async_trait>( &'life0 self, object_id: ObjectID, version: SequenceNumber, options: Option<IotaObjectDataOptions>, ) -> Pin<Box<dyn Future<Output = Result<IotaPastObjectResponse, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Note there is no software-level guarantee/SLA that objects with past versions can be retrieved by this API, even if the object and version exists/existed. The result may vary across nodes depending on their pruning policies. Return the object information for a specified version

source

fn try_get_object_before_version<'life0, 'async_trait>( &'life0 self, object_id: ObjectID, version: SequenceNumber, ) -> Pin<Box<dyn Future<Output = Result<IotaPastObjectResponse, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Note there is no software-level guarantee/SLA that objects with past versions can be retrieved by this API, even if the object and version exists/existed. The result may vary across nodes depending on their pruning policies. Returns the latest object information with a version less than or equal to the given version

source

fn try_multi_get_past_objects<'life0, 'async_trait>( &'life0 self, past_objects: Vec<IotaGetPastObjectRequest>, options: Option<IotaObjectDataOptions>, ) -> Pin<Box<dyn Future<Output = Result<Vec<IotaPastObjectResponse>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Note there is no software-level guarantee/SLA that objects with past versions can be retrieved by this API, even if the object and version exists/existed. The result may vary across nodes depending on their pruning policies. Return the object information for a specified version

source

fn get_checkpoint<'life0, 'async_trait>( &'life0 self, id: CheckpointId, ) -> Pin<Box<dyn Future<Output = Result<Checkpoint, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Return a checkpoint

source

fn get_checkpoints<'life0, 'async_trait>( &'life0 self, cursor: Option<BigInt<u64>>, limit: Option<usize>, descending_order: bool, ) -> Pin<Box<dyn Future<Output = Result<CheckpointPage, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Return paginated list of checkpoints

source

fn get_events<'life0, 'async_trait>( &'life0 self, transaction_digest: TransactionDigest, ) -> Pin<Box<dyn Future<Output = Result<Vec<IotaEvent>, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Return transaction events.

source

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

Return the total number of transaction blocks known to the server.

source

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

Return the sequence number of the latest checkpoint that has been executed

source

fn get_protocol_config<'life0, 'async_trait>( &'life0 self, version: Option<BigInt<u64>>, ) -> Pin<Box<dyn Future<Output = Result<ProtocolConfigResponse, Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Return the protocol config table for the given version number. If the version number is not specified, If none is specified, the node uses the version of the latest epoch it has processed.

source

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

Return the first four bytes of the chain’s genesis checkpoint digest.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<TypeJsonRpseeInteral> ReadApiClient for TypeJsonRpseeInteral
where TypeJsonRpseeInteral: ClientT,