Interface AppendOnlyTree

A Merkle tree that supports only appending leaves and not updating existing leaves.

interface AppendOnlyTree {
    appendLeaves(leaves): Promise<void>;
    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>;
}

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>