Closed 0xDatapunk closed 1 month ago
https://github.com/privacy-scaling-explorations/zk-kit/blob/c912111c134b6bbefe223bb61ba22f864036e9ba/packages/imt/src/imt.ts#L160
since the tree does not preclude duplicated leaves, indexOf will return the first occurrence of the specified element in the array. Let's make it clear with comment.
https://github.com/privacy-scaling-explorations/zk-kit/blob/c912111c134b6bbefe223bb61ba22f864036e9ba/packages/imt/src/imt.ts#L160
since the tree does not preclude duplicated leaves, indexOf will return the first occurrence of the specified element in the array. Let's make it clear with comment.