Class ProvableMerkleTreeUtils

Collection of utility functions for merkle tree in the circuit.

Hierarchy

  • ProvableMerkleTreeUtils

Constructors

Properties

EMPTY_VALUE: Field = EMPTY_VALUE

Empty value for merkle tree

Static

Memberof

ProvableMerkleTreeUtils

Methods

  • Returns true if the value is in the tree and it is at the index from the key

    Static

    Returns

    {Bool}

    Memberof

    ProvableMerkleTreeUtils

    Type Parameters

    • V

    Parameters

    • proof: BaseMerkleProof
    • expectedRoot: Field
    • index: Field
    • value: V
    • valueType: Provable<V>
    • Optional options: {
          hashValue: boolean;
          hasher?: Hasher;
      } = ...
      • hashValue: boolean
      • Optional hasher?: Hasher

    Returns Bool

  • Calculate new root based on index and value.

    Static

    Returns

    {Field}

    Memberof

    ProvableMerkleTreeUtils

    Type Parameters

    • V

    Parameters

    • proof: BaseMerkleProof
    • index: Field
    • value: V
    • valueType: Provable<V>
    • Optional options: {
          hashValue: boolean;
          hasher?: Hasher;
      } = ...
      • hashValue: boolean
      • Optional hasher?: Hasher

    Returns Field

Generated using TypeDoc