pub struct WalletState {
pub nullifier_set_root: [u8; 32],
pub owned_notes_root: [u8; 32],
pub note_tree_frontier: NoteFrontier,
pub block_height: u32,
pub block_hash: [u8; 32],
}Expand description
full wallet state
Fields§
§nullifier_set_root: [u8; 32]sparse merkle root: nullifier -> bool (has been seen)
owned_notes_root: [u8; 32]sparse merkle root: note_commitment -> NoteData
note_tree_frontier: NoteFrontierincremental merkle tree frontier for note commitment tree allows reconstructing merkle paths for spending stored as frontier hashes at each level
block_height: u32chain position
block_hash: [u8; 32]Implementations§
Source§impl WalletState
impl WalletState
Sourcepub fn genesis_testnet() -> Self
pub fn genesis_testnet() -> Self
genesis state for testnet
Sourcepub fn commit(&self) -> WalletStateCommitment
pub fn commit(&self) -> WalletStateCommitment
commit to state (domain-separated blake2b)
Sourcepub fn is_genesis(&self) -> bool
pub fn is_genesis(&self) -> bool
check if this is genesis state
Trait Implementations§
Source§impl Clone for WalletState
impl Clone for WalletState
Source§fn clone(&self) -> WalletState
fn clone(&self) -> WalletState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for WalletState
impl Debug for WalletState
Source§impl<'de> Deserialize<'de> for WalletState
impl<'de> Deserialize<'de> for WalletState
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WalletState
impl RefUnwindSafe for WalletState
impl Send for WalletState
impl Sync for WalletState
impl Unpin for WalletState
impl UnwindSafe for WalletState
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more