snarkvm_ledger_query

Trait QueryTrait

Source
pub trait QueryTrait<N: Network> {
    // Required methods
    fn current_state_root(&self) -> Result<N::StateRoot>;
    fn get_state_path_for_commitment(
        &self,
        commitment: &Field<N>,
    ) -> Result<StatePath<N>>;
    fn current_block_height(&self) -> Result<u32>;
}

Required Methods§

Source

fn current_state_root(&self) -> Result<N::StateRoot>

Returns the current state root.

Source

fn get_state_path_for_commitment( &self, commitment: &Field<N>, ) -> Result<StatePath<N>>

Returns a state path for the given commitment.

Source

fn current_block_height(&self) -> Result<u32>

Returns the current block height

Implementors§

Source§

impl<N: Network, B: BlockStorage<N>> QueryTrait<N> for Query<N, B>