Skip to main content

MerkleListIteratorBase

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

Defined in: lib/provable/merkle-list.ts:375

Type Parameters

T

T

Properties

currentHash

currentHash: Field;

Defined in: lib/provable/merkle-list.ts:386

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>;

Defined in: lib/provable/merkle-list.ts:390

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


data

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

Defined in: lib/provable/merkle-list.ts:377


hash

readonly hash: Field;

Defined in: lib/provable/merkle-list.ts:376