Static
ARTIFACTS_Name of the package on NPM which contains published artifacts for this GPC family.
Static
ARTIFACTS_Version of the published artifacts on NPM which are compatible with this version of the GPC circuits.
Static
CIRCUIT_List of pre-compiled circuits, sorted in order of increasing cost. These should match the declarations in circuits.json for circomkit, and each should correspond to an available set of precompiled artifacts.
Static
CIRCUIT_Circuit parameters pulled from circuitParameters.json
in the form of pairs consisting of the circuit parameters
and the cost of the circuit in constraints.
Private
Static
circuitStatic
circuitDerives circuit descriptions from circuit parameters.
an array of pairs of circuit parameters and circuit sizes (constraint counts).
an array of the corresponding circuit descriptions arranged in order of increasing circuit size.
Static
circuitChecks whether a described circuit can meet a required set of parameters. This will be true if each of the circuit's parameters is greater than or equal to the required value.
description of the circuit to check
the min required value of each circuit parameter
true
if the circuit meets the requirements.
Static
circuitGenerates a circuit name based on parameters.
Static
filterExtract the public inputs from the full set of proof inputs.
Static
findFinds the description of a circuit in this family by name.
the circuit family name
the name of the circuit
Optional
circuitFamily: ProtoPODGPCCircuitDesc[] = ProtoPODGPC.CIRCUIT_FAMILYthe circuit family to search
the circuit description, or undefined if the name is unrecognized.
Static
makeCreates a set of public signals for verification, given public inputs and outputs of a circuit.
Some values are replaced with their 0-residues modulo BABY_JUB_PRIME
to
agree with the values returned by the Groth16 prover, which are always
normalised this way.
Static
mergeCalculates the merged set of parameters which meets the unified (maximum) requirements of both inputs.
first set of required parameters
second set of required paremeters
unified (maximum) parameters
Static
outputsExtract named outputs from the public circuit signals.
Because of the flattened array representation of the public signals, the circuit's maxEntries and includeOwner parameters must be known to properly reconstruct output arrays.
Static
pickPicks the smallest available circuit in this family which can handle the size parameters of a desired configuration.
a lower bound on the parameters required
Optional
circuitFamily: ProtoPODGPCCircuitDesc[] = ProtoPODGPC.CIRCUIT_FAMILYthe circuit family to pick the circuit from. This must be sorted in order of increasing circuit size (constraint count).
the circuit description, or undefined if no circuit can handle the required parameters.
Static
proveGenerate a Groth16 proof for a circuit in this family.
full inputs (public and private)
path to wasm file for witness generation. See CircuitArtifactPaths.
path to file containing proving key. See CircuitArtifactPaths.
Groth16 proof, circuit outputs, and full set of public signals (primarily for verification in tests).
Static
verifyVerify a proof for a circuit in this library.
path to verification key as a JSON file. See CircuitArtifactPaths.
Groth16 proof.
claimed public inputs to the circuit. See filterPublicInputs
claimed outputs from the circuit (generally derived from claims).
true if the proof is valid
Generated using TypeDoc
Utility functions for the ProtoPODGPC family of circuits.
This can be factored out and generalized if/when there are multiple families and we're clear on what's common between them.