Static checkReturns true if the value is in the tree and it is at the index from the key
Optional options: { hasher: The hash function to use, defaults to PoseidonHasherFunc; hashValue: whether to hash the value, the default is true.
{boolean}
MerkleTreeUtils
Static checkReturns true if there is no value at the index from the key
Optional hasher: Hasher = PoseidonHasherFunc{boolean}
MerkleTreeUtils
Static compactCompact a merkle proof to reduce its size
Optional hasher: Hasher = PoseidonHasherFunc{CompactMerkleProof}
MerkleTreeUtils
Static compactConvert CompactMerkleProof to JSONValue.
{CompactMerkleProofJSON}
MerkleTreeUtils
Static computeCalculate new root based on value. Note: This method cannot be executed in a circuit.
Optional value: VOptional valueType: Provable<V>Optional options: { hasher: The hash function to use, defaults to PoseidonHasherFunc; hashValue: whether to hash the value, the default is true.
{Field}
MerkleTreeUtils
Static computeCompute new merkle root by index and valueHashOrValueField
Optional hasher: Hasher = PoseidonHasherFunc{Field}
MerkleTreeUtils
Static computeCompute new merkle root by index and valueHashOrValueField, return new root and updates.
Optional hasher: Hasher = PoseidonHasherFunc{{ actualRoot: Field; updates: [Field, Field[]][] }}
MerkleTreeUtils
Static decompactDecompact a CompactMerkleProof.
Optional hasher: Hasher = PoseidonHasherFunc{BaseMerkleProof}
MerkleTreeUtils
Static jsonConvert JSONValue to CompactMerkleProof
{CompactMerkleProof}
MerkleTreeUtils
Static verifyVerify the merkle proof.
Optional value: VOptional valueType: Provable<V>Optional options: { hasher: The hash function to use, defaults to PoseidonHasherFunc; hashValue: whether to hash the value, the default is true.
{boolean}
MerkleTreeUtils
Static verifyVerify the merkle proof by index and valueHashOrValueField
Optional hasher: Hasher = PoseidonHasherFunc{boolean}
MerkleTreeUtils
Static verifyVerify the merkle proof by index and valueHashOrValueField, return result and updates
Optional hasher: Hasher = PoseidonHasherFunc{{ ok: boolean; updates: [Field, Field[]][] }}
MerkleTreeUtils
Collection of utility functions for merkle tree
MerkleTreeUtils