Skip to main content

verify

function verify(proof: 
| ProofBase<any, any>
| JsonProof, verificationKey: string | VerificationKey): Promise<boolean>;

Defined in: lib/proof-system/zkprogram.ts:110

Initializes Pickles bindings, serializes the input proof and verification key for use in OCaml, then calls into the Pickles verify function and returns the result.

Parameters

proof

Either a Proof instance or a serialized JSON proof

ProofBase<any, any> | JsonProof

verificationKey

Either a base64 serialized verification key or a VerificationKey instance which will be base64 serialized for use in the bindings.

string | VerificationKey

Returns

Promise<boolean>

A promise that resolves to a boolean indicating whether the proof is valid.

Note

This function is meant to be called in JavaScript, not for use in a circuit. The verification key data and hash are not confirmed to match.