Class ProvableDeepMerkleSubTree<V>

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

Type Parameters

  • V

Hierarchy

  • ProvableDeepMerkleSubTree

Constructors

  • Creates an instance of ProvableDeepMerkleSubTree.

    Memberof

    ProvableDeepMerkleSubTree

    Type Parameters

    • V

    Parameters

    • root: Field

      merkle root

    • height: number

      height of tree

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

    Returns ProvableDeepMerkleSubTree<V>

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.

    Returns

    {Field}

    Memberof

    ProvableDeepMerkleSubTree

    Parameters

    • index: Field
    • Optional value: V

    Returns Field

Generated using TypeDoc