pub struct CheckpointVerifier { /* private fields */ }Expand description
Checkpoint finality verifier for Sui
Implementations§
Source§impl CheckpointVerifier
impl CheckpointVerifier
Sourcepub fn with_config(config: CheckpointConfig) -> Self
pub fn with_config(config: CheckpointConfig) -> Self
Create a new checkpoint verifier with custom configuration.
Sourcepub fn config(&self) -> &CheckpointConfig
pub fn config(&self) -> &CheckpointConfig
Get the verifier configuration.
Sourcepub fn is_checkpoint_certified(
&self,
checkpoint_seq: u64,
rpc: &dyn SuiRpc,
) -> SuiResult<CheckpointInfo>
pub fn is_checkpoint_certified( &self, checkpoint_seq: u64, rpc: &dyn SuiRpc, ) -> SuiResult<CheckpointInfo>
Check if a checkpoint is certified.
In Sui, a checkpoint is certified when it receives signatures from 2f+1 validators. Once certified, the checkpoint cannot be reverted.
§Arguments
checkpoint_seq- The checkpoint sequence number to checkrpc- RPC client for fetching checkpoint data
§Returns
Ok(CheckpointInfo) with certification details, or Err on failure.
Sourcepub fn is_tx_finalized(
&self,
tx_checkpoint: u64,
rpc: &dyn SuiRpc,
) -> SuiResult<bool>
pub fn is_tx_finalized( &self, tx_checkpoint: u64, rpc: &dyn SuiRpc, ) -> SuiResult<bool>
Check if a transaction’s checkpoint is finalized.
§Arguments
tx_checkpoint- The checkpoint sequence number containing the transactionrpc- RPC client for fetching checkpoint data
Sourcepub fn current_epoch(&self, rpc: &dyn SuiRpc) -> SuiResult<u64>
pub fn current_epoch(&self, rpc: &dyn SuiRpc) -> SuiResult<u64>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CheckpointVerifier
impl RefUnwindSafe for CheckpointVerifier
impl Send for CheckpointVerifier
impl Sync for CheckpointVerifier
impl Unpin for CheckpointVerifier
impl UnsafeUnpin for CheckpointVerifier
impl UnwindSafe for CheckpointVerifier
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more