Trait iota_types::storage::RestStateReader
source · pub trait RestStateReader:
ObjectStore
+ ReadStore
+ Send
+ Sync {
// Required methods
fn get_transaction_checkpoint(
&self,
digest: &TransactionDigest,
) -> Result<Option<CheckpointSequenceNumber>>;
fn get_lowest_available_checkpoint_objects(
&self,
) -> Result<CheckpointSequenceNumber>;
fn get_chain_identifier(&self) -> Result<ChainIdentifier>;
fn account_owned_objects_info_iter(
&self,
owner: IotaAddress,
cursor: Option<ObjectID>,
) -> Result<Box<dyn Iterator<Item = AccountOwnedObjectInfo> + '_>>;
fn dynamic_field_iter(
&self,
parent: ObjectID,
cursor: Option<ObjectID>,
) -> Result<Box<dyn Iterator<Item = (DynamicFieldKey, DynamicFieldIndexInfo)> + '_>>;
fn get_coin_info(&self, coin_type: &StructTag) -> Result<Option<CoinInfo>>;
}
Expand description
Trait used to provide functionality to the REST API service.
It extends both ObjectStore and ReadStore by adding functionality that may require more detailed underlying databases or indexes to support.
Required Methods§
fn get_transaction_checkpoint( &self, digest: &TransactionDigest, ) -> Result<Option<CheckpointSequenceNumber>>
sourcefn get_lowest_available_checkpoint_objects(
&self,
) -> Result<CheckpointSequenceNumber>
fn get_lowest_available_checkpoint_objects( &self, ) -> Result<CheckpointSequenceNumber>
Lowest available checkpoint for which object data can be requested.
Specifically this is the lowest checkpoint for which input/output object data will be available.