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§
sourcefn 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 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.
sourcefn 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 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
sourcefn 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 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
sourcefn 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 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
sourcefn 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_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
sourcefn 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_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
sourcefn 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 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
sourcefn 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_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
sourcefn 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_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
sourcefn 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_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.
sourcefn 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_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.
sourcefn 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_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
sourcefn 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_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.