Skip to main content

MerkleListIteratorBase

type MerkleListIteratorBase<T>: {
"currentHash": Field;
"currentIndex": Unconstrained<number>;
"data": Unconstrained<WithHash<T>[]>;
"hash": Field;
};

Type parameters

T

Type declaration

currentHash

currentHash: Field;

The merkle list hash of [data[currentIndex], ..., data[length-1]] (when hashing from right to left).

For example:

  • If currentIndex === 0, then currentHash === this.hash is the hash of the entire array.
  • If currentIndex === length, then currentHash === emptyHash is the hash of an empty array.

currentIndex

currentIndex: Unconstrained<number>;

The index of the element that will be returned by the next call to next().

data

readonly data: Unconstrained<WithHash<T>[]>;

hash

readonly hash: Field;

Source

lib/provable/merkle-list.ts:330