Skip to main content

RpcIndexes

Trait RpcIndexes 

Source
pub trait RpcIndexes: Send + Sync {
Show 14 methods // Required methods fn get_epoch_info(&self, epoch: EpochId) -> Result<Option<EpochInfo>>; fn owned_objects_iter( &self, owner: SuiAddress, object_type: Option<StructTag>, cursor: Option<OwnedObjectInfo>, ) -> Result<Box<dyn Iterator<Item = Result<OwnedObjectInfo, TypedStoreError>> + '_>>; fn dynamic_field_iter( &self, parent: ObjectID, cursor: Option<DynamicFieldKey>, ) -> Result<Box<dyn Iterator<Item = DynamicFieldIteratorItem> + '_>>; fn get_coin_info(&self, coin_type: &StructTag) -> Result<Option<CoinInfo>>; fn get_balance( &self, owner: &SuiAddress, coin_type: &StructTag, ) -> Result<Option<BalanceInfo>>; fn balance_iter( &self, owner: &SuiAddress, cursor: Option<(SuiAddress, StructTag)>, ) -> Result<BalanceIterator<'_>>; fn package_versions_iter( &self, original_id: ObjectID, cursor: Option<u64>, ) -> Result<Box<dyn Iterator<Item = Result<(u64, ObjectID), TypedStoreError>> + '_>>; fn get_highest_indexed_checkpoint_seq_number( &self, ) -> Result<Option<CheckpointSequenceNumber>>; fn ledger_tx_seq_digest( &self, tx_seq: u64, ) -> Result<Option<LedgerTxSeqDigest>>; fn ledger_tx_seq_digest_iter( &self, start: u64, end_exclusive: u64, descending: bool, ) -> Result<LedgerTxSeqDigestIterator<'_>>; fn transaction_bitmap_bucket_iter( &self, dimension_key: Vec<u8>, start_bucket: u64, end_bucket_exclusive: u64, descending: bool, ) -> Result<LedgerBitmapBucketIterator<'_>>; fn event_bitmap_bucket_iter( &self, dimension_key: Vec<u8>, start_bucket: u64, end_bucket_exclusive: u64, descending: bool, ) -> Result<LedgerBitmapBucketIterator<'_>>; // Provided methods fn get_highest_live_indexed_checkpoint_seq_number( &self, ) -> Result<Option<CheckpointSequenceNumber>> { ... } fn ledger_tx_seq_digest_multi_get( &self, tx_seqs: &[u64], ) -> Result<Vec<Option<LedgerTxSeqDigest>>> { ... }
}

Required Methods§

Source

fn get_epoch_info(&self, epoch: EpochId) -> Result<Option<EpochInfo>>

Source

fn owned_objects_iter( &self, owner: SuiAddress, object_type: Option<StructTag>, cursor: Option<OwnedObjectInfo>, ) -> Result<Box<dyn Iterator<Item = Result<OwnedObjectInfo, TypedStoreError>> + '_>>

Source

fn dynamic_field_iter( &self, parent: ObjectID, cursor: Option<DynamicFieldKey>, ) -> Result<Box<dyn Iterator<Item = DynamicFieldIteratorItem> + '_>>

Iterate the dynamic fields owned by parent. Dynamic-field objects live in the same owned-object index as address-owned objects (under the object-owner key, sorted by (type, object id)), so the DynamicFieldKey cursor carries the field’s type alongside its id – the full sort position – letting the scan seek straight to it, as in owned_objects_iter.

Source

fn get_coin_info(&self, coin_type: &StructTag) -> Result<Option<CoinInfo>>

Source

fn get_balance( &self, owner: &SuiAddress, coin_type: &StructTag, ) -> Result<Option<BalanceInfo>>

Source

fn balance_iter( &self, owner: &SuiAddress, cursor: Option<(SuiAddress, StructTag)>, ) -> Result<BalanceIterator<'_>>

Source

fn package_versions_iter( &self, original_id: ObjectID, cursor: Option<u64>, ) -> Result<Box<dyn Iterator<Item = Result<(u64, ObjectID), TypedStoreError>> + '_>>

Source

fn get_highest_indexed_checkpoint_seq_number( &self, ) -> Result<Option<CheckpointSequenceNumber>>

Source

fn ledger_tx_seq_digest(&self, tx_seq: u64) -> Result<Option<LedgerTxSeqDigest>>

Source

fn ledger_tx_seq_digest_iter( &self, start: u64, end_exclusive: u64, descending: bool, ) -> Result<LedgerTxSeqDigestIterator<'_>>

Source

fn transaction_bitmap_bucket_iter( &self, dimension_key: Vec<u8>, start_bucket: u64, end_bucket_exclusive: u64, descending: bool, ) -> Result<LedgerBitmapBucketIterator<'_>>

Source

fn event_bitmap_bucket_iter( &self, dimension_key: Vec<u8>, start_bucket: u64, end_bucket_exclusive: u64, descending: bool, ) -> Result<LedgerBitmapBucketIterator<'_>>

Provided Methods§

Source

fn get_highest_live_indexed_checkpoint_seq_number( &self, ) -> Result<Option<CheckpointSequenceNumber>>

The highest checkpoint the live-object cohort – the indexes derivable from the live object set (owned objects, types, and balances) – has committed, or None if it has not committed any checkpoint yet.

This is the frontier the health check measures against. The live-object indexes are restored to the tip and follow it, whereas the ledger-history cohort backfills independently after a restore; gating health on the latter would report a node unhealthy for the whole backfill even though its live-object reads are already caught up.

Defaults to Self::get_highest_indexed_checkpoint_seq_number for backends without a live/history cohort split, where every index tracks the tip together.

Source

fn ledger_tx_seq_digest_multi_get( &self, tx_seqs: &[u64], ) -> Result<Vec<Option<LedgerTxSeqDigest>>>

Implementors§