Function gpcVerify

  • Verifies a GPC proof produced by gpcProve. See the documentation of the input types for more details: GPCBoundConfig and GPCRevealedClaims.

    Note that the bound config must match the object produced by gpcProve along with the proof. If you wish to reuse a config and avoid transmitting it along with the proof, you can use gpcBindConfig to obtain an object which should remain stable and reusable.

    Parameters

    • proof: Groth16Proof

      the Groth16 proof generated by gpcProve.

    • boundConfig: GPCBoundConfig

      the bound configuration specifying the constraints proven, and the specific circuit which was used.

    • revealedClaims: GPCRevealedClaims

      the revealed parts of the proof inputs and outputs.

    • pathToArtifacts: string

      the path to the root foler where circuit artifacts can be found. This may be a URL (in browser) or a filesystem path (in Node).

    Returns Promise<boolean>

    true if the proof is valid

    Throws

    TypeError if any of the arguments is malformed

    Throws

    Error if the proof cannot be verified

Generated using TypeDoc