Skip to main content
Version: v2.x

Minimal Anti Collusion Infrastructure (MACI) v2.0.0 / genTreeCommitment

Function: genTreeCommitment()

genTreeCommitment(leaves, salt, depth): bigint

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

Defined in

packages/crypto/ts/utils.ts:30