Semaphore Inclusion Proof

Once a user has added their identity commitment to either the credentials or no-credentials group, they can use Semaphore proofsarrow-up-right to signal anonymously with a zero-knowledge proof that proves that:

  • they are part of the credentials/no-credentials group, and

  • the same user created the signal and the proof

Generating a proof

Similar to a Semaphore proof, you can use the @bq-core/lib library to generate such proofs, passing the following parameters to the generateCredentialOwnershipProof function:

Verifying a Proof Off-Chain

You can use the @bq-core/lib library to verify a generated proof via the verifyCredentialOwnershipProof function:

import { verifyCredentialOwnershipProof } from "@bq-core/lib"

await verifyCredentialOwnershipProof(testProof) // true or false.

Which returns a promise that resolves to true or false.

Last updated