Trait mina_ledger::GenesisLedger
source · [−]pub trait GenesisLedger<'a, const DEPTH: usize, Account: Hashable>where
<Account as Hashable>::D: Default,
Self: 'a,
&'a Self: IntoIterator<Item = Result<Account, Self::Error>>,{
type Error;
fn depth(&self) -> usize { ... }
fn accounts(&'a self) -> <&'a Self as IntoIterator>::IntoIter { ... }
fn to_mina_merkle_ledger_legacy(
&'a self
) -> MinaLedgerMerkleTreeLegacy<Account> { ... }
fn to_mina_merkle_ledger(&'a self) -> MinaLedgerMerkleTree<Account> { ... }
}
Expand description
A genesis ledger provides access to its accounts by implementing IntoIterator This implementation must be provided to meet the trait requirements
A Genesis ledger has a compile time pre-defined depth which is set here as a const generic This ensures compile-time checking that the correct depth ledger is being used in the correc place
Required Associated Types
Provided Methods
sourcefn accounts(&'a self) -> <&'a Self as IntoIterator>::IntoIter
fn accounts(&'a self) -> <&'a Self as IntoIterator>::IntoIter
Return a iterator over the accounts in this genesis ledger without consuming self
sourcefn to_mina_merkle_ledger_legacy(&'a self) -> MinaLedgerMerkleTreeLegacy<Account>
fn to_mina_merkle_ledger_legacy(&'a self) -> MinaLedgerMerkleTreeLegacy<Account>
Build legacy mina merkle ledger tree with a fixed height that uses legacy hasher
sourcefn to_mina_merkle_ledger(&'a self) -> MinaLedgerMerkleTree<Account>
fn to_mina_merkle_ledger(&'a self) -> MinaLedgerMerkleTree<Account>
Build mina merkle ledger tree with a fixed height that uses kimchi hasher