Function gpcCheckProvable

  • Checks whether the the given configuration and inputs can be used to generate a valid GPC Proof. This function performs all of the argument checks of gpcProve, but does not perform expensive proof generation or trigger any side-effects such as downloading artifacts. See the documentation of the input and output types for more details: GPCProofConfig, GPCProofInputs, GPCBoundConfig, and ProtoPODGPCCircuitDesc.

    If the config or inputs cannot be used to generate a valid proof with the supported circuits, this function will throw an exception with a message explaining why. If this function returns successfully, it should be possible to later call gpcProve with the same arguments without any risk of failing due to config or inputs, though internal errors in proof generation or artifact download are still possible.

    The specific ZK circuit needed 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.

    Returns {
        boundConfig: GPCBoundConfig;
        circuitDesc: ProtoPODGPCCircuitDesc;
    }

    a new configuration object bound and canonicalized (see GPCBoundConfig), as well as a description of selected circuit.

    Throws

    TypeError if any of the arguments is malformed

    Throws

    Error if the requirements of the given configuration are impossible to meet with the given circuit

Generated using TypeDoc