pub trait StateClient {
    type Error;
    fn fetch_notes(
        &self,
        height: u64,
        vk: &ViewKey
    ) -> Result<Vec<Note>, Self::Error>;
fn fetch_anchor(&self) -> Result<BlsScalar, Self::Error>;
fn fetch_opening(
        &self,
        note: &Note
    ) -> Result<PoseidonBranch<POSEIDON_TREE_DEPTH>, Self::Error>;
fn fetch_stake(&self, pk: &PublicKey) -> Result<(u64, u32), Self::Error>; }
Expand description

Types that are clients of the state API.

Associated Types

Error returned by the node client.

Required methods

Find notes for a view key, starting from the given block height.

Fetch the current anchor of the state.

Queries the node to find the opening for a specific note.

Queries the node the amount staked by a key and its expiration.

Implementors