We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The MerkleTree class currently provides mechanism to:
leafHash(leaf: T): HexString;
leafLookup(leaf: T): number;
entries(): Iterable<[number, T]>;
What we don't have is:
Both are directly in tree.values, but it is marked as protected readonly, probably because it also contains the treeIndex which should remain hidden.
tree.values
protected readonly
treeIndex
I propose we add:
at(number): T | undefined
length(): number
The text was updated successfully, but these errors were encountered:
length
at(index: number)
Successfully merging a pull request may close this issue.
The MerkleTree class currently provides mechanism to:
leafHash(leaf: T): HexString;
leafLookup(leaf: T): number;
entries(): Iterable<[number, T]>;
What we don't have is:
Both are directly in
tree.values
, but it is marked asprotected readonly
, probably because it also contains thetreeIndex
which should remain hidden.I propose we add:
at(number): T | undefined
that gives the value of node at a given position (name?).length(): number
that returns the number of leaves in the tree (name?).The text was updated successfully, but these errors were encountered: