penumbra_sct::component::tree

Trait SctRead

Source
pub trait SctRead: StateRead {
    // Provided methods
    fn get_sct<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Tree> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn get_anchor_by_height<'life0, 'async_trait>(
        &'life0 self,
        height: u64,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Root>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn spend_info<'life0, 'async_trait>(
        &'life0 self,
        nullifier: Nullifier,
    ) -> Pin<Box<dyn Future<Output = Result<Option<NullificationInfo>>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn pending_nullifiers(&self) -> Vector<Nullifier> { ... }
}
Available on crate feature component only.
Expand description

Provides read access to the state commitment tree and related data.

Provided Methods§

Source

fn get_sct<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Tree> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Fetch the state commitment tree from nonverifiable storage, preferring the cached tree if it exists.

Source

fn get_anchor_by_height<'life0, 'async_trait>( &'life0 self, height: u64, ) -> Pin<Box<dyn Future<Output = Result<Option<Root>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Return the SCT root for the given height, if it exists. If the height is not found, return None.

Source

fn spend_info<'life0, 'async_trait>( &'life0 self, nullifier: Nullifier, ) -> Pin<Box<dyn Future<Output = Result<Option<NullificationInfo>>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Return metadata on the specified nullifier, if it has been spent.

Source

fn pending_nullifiers(&self) -> Vector<Nullifier>

Return the set of nullifiers that have been spent in the current block.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: StateRead + ?Sized> SctRead for T