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§
Sourcefn 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_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.
Sourcefn 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 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
.
Sourcefn 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 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.
Sourcefn pending_nullifiers(&self) -> Vector<Nullifier>
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.