Skip to main content

verify

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

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

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 | 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.