Minimal Anti Collusion Infrastructure (MACI) / genTreeCommitment
Function: genTreeCommitment()
genTreeCommitment(
leaves
,salt
,depth
):bigint
Defined in: packages/crypto/ts/utils.ts:30
A helper function which hashes a list of results with a salt and returns the hash.
Parameters
leaves
bigint
[]
A list of values
salt
bigint
A random salt
depth
number
The tree depth
Returns
bigint
The hash of the leaves and the salt, with the salt last