prove_and_verify_with_keys

Function prove_and_verify_with_keys 

Source
pub fn prove_and_verify_with_keys(
    wasm_path: impl AsRef<Path>,
    r1cs_path: impl AsRef<Path>,
    inputs: &Inputs,
    keys: &CircuitKeys,
) -> Result<CircomResult>
Expand description

Proves and verifies a Circom circuit using precomputed Groth16 keys. This is the preferred function when repeated proofs must be generated.

Steps:

  1. Load Circom config (WASM + R1CS)
  2. Build circuit with provided inputs
  3. Generate Groth16 proof using precomputed pk
  4. Verify the proof using fast pvk

Returns CircomResult.