mirror of
https://github.com/privacy-scaling-explorations/zk-kit.git
synced 2026-04-22 03:00:15 -04:00
fix: set correct bigint tree leaves
This commit is contained in:
@@ -66,7 +66,7 @@ export function generateMerkleProof(
|
||||
): MerkleProof {
|
||||
const tree = generateMerkleTree(depth, zeroValue, arity, leaves)
|
||||
|
||||
const leafIndex = leaves.indexOf(BigInt(leaf))
|
||||
const leafIndex = tree.leaves.indexOf(BigInt(leaf))
|
||||
|
||||
if (leafIndex === -1) {
|
||||
throw new Error("The leaf does not exists")
|
||||
|
||||
Reference in New Issue
Block a user