The aim of the generate-proof command is to run proof generation in MPC using the provided public inputs and witness shares.


co-circom generate-proof --witness test_vectors/poseidon/witness.wtns.0.shared --zkey test_vectors/poseidon/poseidon.zkey --protocol REP3 --config configs/party1.toml --out proof.json --public-input public_input.json

The above command takes a witness share test_vectors/poseidon/witness.wtns.0.shared, a traditional Circom .zkey file and a networking config and produces a Circom-compatible proof proof.json, with a Circom-compatible public input file public_input.json.


$ co-circom generate-proof --help
Evaluates the prover algorithm for the specified circuit and witness share in MPC

Usage: co-circom generate-proof [OPTIONS] --witness <WITNESS> --zkey <ZKEY> --protocol <PROTOCOL> --curve <CURVE> --config <CONFIG>

      --witness <WITNESS>            The path to the witness share file
      --zkey <ZKEY>                  The path to the proving key (.zkey) file, generated by snarkjs setup phase
      --protocol <PROTOCOL>          The MPC protocol to be used [possible values: REP3, SHAMIR]
      --curve <CURVE>                The pairing friendly curve to be used [possible values: BN254, BLS12-381]
      --config <CONFIG>              The path to MPC network configuration file
      --out <OUT>                    The output file where the final proof is written to. If not passed, this party will not write the proof to a file
      --public-input <PUBLIC_INPUT>  The output JSON file where the public inputs are written to. If not passed, this party will not write the public inputs to a file
  -t, --threshold <THRESHOLD>        The threshold of tolerated colluding parties [default: 1]
  -h, --help                         Print help