Function gpcProve

  • Generates a GPC proof for the given configuration and inputs. See the documentation of the input and output types for more details: GPCProofConfig, GPCProofInputs, GPCBoundConfig, and GPCRevealedClaims.

    The specific ZK circuit used will be picked as the smallest supported circuit which can fit the configuration and inputs. If you need a specific circuit to be used instead (e.g. to support larger object sizes for future reuse), you can specify that in proofConfig.circuitIdentifier. (See ProtoPODGPC.CIRCUIT_FAMILY for supported circuits.)

    Parameters

    • proofConfig: GPCProofConfig

      the configuration specifying the constraints to be proven.

    • proofInputs: GPCProofInputs

      the input data (PODs and other values) specific to this proof.

    • pathToArtifacts: string

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

    Returns Promise<{
        boundConfig: GPCBoundConfig;
        proof: GPCProof;
        revealedClaims: GPCRevealedClaims;
    }>

    The Groth16 proof, a bound configuration usable for reliable verification or future proofs (see GPCBoundConfig), and the revealed claims of this proof (see GPCRevealedClaims).

    Throws

    TypeError if any of the arguments is malformed

    Throws

    Error if it is impossible to create a valid proof

Generated using TypeDoc