• Creates a zero-knowledge proof to prove that you have the preimages of a hash, without disclosing the actual preimages themselves. The use of a scope parameter helps ensure the uniqueness and non-reusability of the proofs, enhancing security in applications like blockchain transactions or private data verification. If, for example, this package were used with Semaphore to demonstrate possession of a Semaphore identity of a group of voters, the scope could be the poll's ID.

    Parameters

    • preimages: BigNumberish[]

      The preimages of the hash.

    • scope: BigNumberish | Uint8Array

      A public value used to contextualize the cryptographic proof and calculate the nullifier.

    • Optional snarkArtifacts: SnarkArtifacts

      The Snark artifacts (wasm and zkey files) generated in a trusted setup of the circuit are necessary to generate valid proofs

    Returns Promise<PoseidonProof>

    The Poseidon zero-knowledge proof.