Class ProvableDeepMerkleSubTree<V>

ProvableDeepMerkleSubTree is a deep merkle subtree for working on only a few leafs in circuit.

ProvableDeepMerkleSubTree

Type Parameters

  • V

Constructors

  • Creates an instance of ProvableDeepMerkleSubTree.

    Type Parameters

    • V

    Parameters

    • root: Field

      merkle root

    • height: number

      height of tree

    • valueType: Provable<V>
    • Optional options: {
          hashValue: boolean;
          hasher?: Hasher;
      } = ...

      hasher: The hash function to use, defaults to PoseidonHasherFunc; hashValue: whether to hash the value, he default is true.

      • hashValue: boolean
      • Optional hasher?: Hasher

    Returns ProvableDeepMerkleSubTree<V>

    Memberof

    ProvableDeepMerkleSubTree

Properties

hashValue: boolean
hasher: Hasher
height: number
nodeStore: Map<string, Field[]>
root: Field
valueStore: Map<string, Field>
valueType: Provable<V>

Methods

  • Update a new value for a key in the tree and return the new root of the tree.

    Parameters

    • index: Field
    • Optional value: V

    Returns Field

    {Field}

    Memberof

    ProvableDeepMerkleSubTree