Trait RestStateReader
pub trait RestStateReader:
ObjectStore
+ ReadStore
+ Send
+ Sync {
// Required methods
fn get_transaction_checkpoint(
&self,
digest: &TransactionDigest,
) -> Result<Option<u64>, Error>;
fn get_lowest_available_checkpoint_objects(&self) -> Result<u64, Error>;
fn get_chain_identifier(&self) -> Result<ChainIdentifier, Error>;
fn account_owned_objects_info_iter(
&self,
owner: IotaAddress,
cursor: Option<ObjectID>,
) -> Result<Box<dyn Iterator<Item = AccountOwnedObjectInfo> + '_>, Error>;
fn dynamic_field_iter(
&self,
parent: ObjectID,
cursor: Option<ObjectID>,
) -> Result<Box<dyn Iterator<Item = (DynamicFieldKey, DynamicFieldIndexInfo)> + '_>, Error>;
fn get_coin_info(
&self,
coin_type: &StructTag,
) -> Result<Option<CoinInfo>, Error>;
}
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<u64>, Error>
fn get_lowest_available_checkpoint_objects(&self) -> Result<u64, Error>
fn get_lowest_available_checkpoint_objects(&self) -> Result<u64, Error>
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.