β How to consume proofs?
βοΈ Easiest & Most Reliable Way: Use the ID-Mask App
π§βπ» Advanced: Programmatic Proof Verification
npm i idmask-zk-programsimport { verify } from 'o1js'
import { proofOfAge } from 'idmask-zk-programs'
// this is a user supplied JSON proof
const proof = {
publicInput: ["21"],
publicOutput: [...],
maxProofsVerified: 0,
proof: "KChzdGF...KSkpKSkp"
}
const { verificationKey } = await proofOfAge.compile()
const isProofValid = await verify(proof, verificationKey)
console.log(
`Is proof valid? ${isProofValid}`,
`Proof of age of at least ${proof.publicInput[0]} years`
) π§βπ» Advanced: Check if provided public address has an associated proof
Last updated