ReadApiServer

Trait ReadApiServer 

Source
pub trait ReadApiServer:
    Sized
    + Send
    + Sync
    + 'static {
Show 16 methods // Required methods fn get_transaction_block<'life0, 'async_trait>( &'life0 self, digest: TransactionDigest, options: Option<SuiTransactionBlockResponseOptions>, ) -> Pin<Box<dyn Future<Output = RpcResult<SuiTransactionBlockResponse>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn multi_get_transaction_blocks<'life0, 'async_trait>( &'life0 self, digests: Vec<TransactionDigest>, options: Option<SuiTransactionBlockResponseOptions>, ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<SuiTransactionBlockResponse>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_object<'life0, 'async_trait>( &'life0 self, object_id: ObjectID, options: Option<SuiObjectDataOptions>, ) -> Pin<Box<dyn Future<Output = RpcResult<SuiObjectResponse>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn multi_get_objects<'life0, 'async_trait>( &'life0 self, object_ids: Vec<ObjectID>, options: Option<SuiObjectDataOptions>, ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<SuiObjectResponse>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn try_get_past_object<'life0, 'async_trait>( &'life0 self, object_id: ObjectID, version: SequenceNumber, options: Option<SuiObjectDataOptions>, ) -> Pin<Box<dyn Future<Output = RpcResult<SuiPastObjectResponse>> + Send + 'async_trait>> where Self: '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 = RpcResult<SuiPastObjectResponse>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn try_multi_get_past_objects<'life0, 'async_trait>( &'life0 self, past_objects: Vec<SuiGetPastObjectRequest>, options: Option<SuiObjectDataOptions>, ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<SuiPastObjectResponse>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_checkpoint<'life0, 'async_trait>( &'life0 self, id: CheckpointId, ) -> Pin<Box<dyn Future<Output = RpcResult<Checkpoint>> + Send + 'async_trait>> where Self: '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 = RpcResult<CheckpointPage>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_events<'life0, 'async_trait>( &'life0 self, transaction_digest: TransactionDigest, ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<SuiEvent>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_total_transaction_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = RpcResult<BigInt<u64>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_latest_checkpoint_sequence_number<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = RpcResult<BigInt<u64>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_protocol_config<'life0, 'async_trait>( &'life0 self, version: Option<BigInt<u64>>, ) -> Pin<Box<dyn Future<Output = RpcResult<ProtocolConfigResponse>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn get_chain_identifier<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = RpcResult<String>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; fn verify_zklogin_signature<'life0, 'async_trait>( &'life0 self, bytes: String, signature: String, intent_scope: ZkLoginIntentScope, author: SuiAddress, ) -> Pin<Box<dyn Future<Output = RpcResult<ZkLoginVerifyResult>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait; // Provided method fn into_rpc(self) -> RpcModule<Self> { ... }
}
Expand description

Server trait implementation for the ReadApi RPC API.

Required Methods§

Source

fn get_transaction_block<'life0, 'async_trait>( &'life0 self, digest: TransactionDigest, options: Option<SuiTransactionBlockResponseOptions>, ) -> Pin<Box<dyn Future<Output = RpcResult<SuiTransactionBlockResponse>> + Send + 'async_trait>>
where Self: '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<SuiTransactionBlockResponseOptions>, ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<SuiTransactionBlockResponse>>> + Send + 'async_trait>>
where Self: '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<SuiObjectDataOptions>, ) -> Pin<Box<dyn Future<Output = RpcResult<SuiObjectResponse>> + Send + 'async_trait>>
where Self: '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<SuiObjectDataOptions>, ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<SuiObjectResponse>>> + Send + 'async_trait>>
where Self: '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<SuiObjectDataOptions>, ) -> Pin<Box<dyn Future<Output = RpcResult<SuiPastObjectResponse>> + Send + 'async_trait>>
where Self: '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 = RpcResult<SuiPastObjectResponse>> + Send + 'async_trait>>
where Self: '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<SuiGetPastObjectRequest>, options: Option<SuiObjectDataOptions>, ) -> Pin<Box<dyn Future<Output = RpcResult<Vec<SuiPastObjectResponse>>> + Send + 'async_trait>>
where Self: '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 = RpcResult<Checkpoint>> + Send + 'async_trait>>
where Self: '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 = RpcResult<CheckpointPage>> + Send + 'async_trait>>
where Self: '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 = RpcResult<Vec<SuiEvent>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return transaction events.

Source

fn get_total_transaction_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = RpcResult<BigInt<u64>>> + Send + 'async_trait>>
where Self: '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 = RpcResult<BigInt<u64>>> + Send + 'async_trait>>
where Self: '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 = RpcResult<ProtocolConfigResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Return the protocol config table for the given version number. 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 = RpcResult<String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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

Source

fn verify_zklogin_signature<'life0, 'async_trait>( &'life0 self, bytes: String, signature: String, intent_scope: ZkLoginIntentScope, author: SuiAddress, ) -> Pin<Box<dyn Future<Output = RpcResult<ZkLoginVerifyResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Verify a zklogin signature for the given bytes, intent scope and author.

Provided Methods§

Source

fn into_rpc(self) -> RpcModule<Self>

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§