Interface UpdateOnlyTree

A Merkle tree that supports updates at arbitrary indices but not appending.

interface UpdateOnlyTree {
    commit(): Promise<void>;
    getDepth(): number;
    getLeafValue(index, includeUncommitted): Promise<undefined | Field>;
    getNumLeaves(includeUncommitted): bigint;
    getRoot(includeUncommitted): Field;
    getSiblingPath(index, includeUncommitted): Promise<BaseSiblingPath>;
    rollback(): Promise<void>;
    updateLeaf(leaf, index): Promise<void>;
}

Hierarchy (view full)

Implemented by

Methods

  • Returns the value of a leaf at the specified index.

    Parameters

    • index: bigint

      The index of the leaf value to be returned.

    • includeUncommitted: boolean

      Set to true to include uncommitted updates in the data set.

    Returns Promise<undefined | Field>