Zargo is a circuit managing tool, which can create, build, and use circuits
to generate and verify proofs.
All the commands have default values, so you may omit them in normal circumstances.
zargo --help for more detail.
Creates a new project directory with
Zargo.toml manifest file and
circuit entry point module.
Initializes a new project in an existing directory, creates missing files.
Builds the circuit. The build consists of:
- the bytecode file
- secret input JSON template
- public data JSON template
Removes the build directory.
Build and runs the circuit on the Zinc VM, writes the result to the terminal.
Generates parameters for the prover using the circuit bytecode.
Generates the proof using the circuit bytecode, parameters generated with
and provided public data.
Verifies the proof using the circuit bytecode, parameters generated with
proof generated with
prove, and provided public data.
Executes the full cycle of proof verification, that is, performs
verify. Mostly for testing purposes.
# create a new circuit called 'zircuit' zargo new zircuit cd zircuit/ # write some code # run the full verification cycle zargo proof-check
# create a new circuit called 'zircuit' zargo new zircuit cd zircuit/ # write some code # build the circuit zargo build # run the circuit and print the result zargo run # generate the prover parameters zargo setup # edit the 'build/witness.json' and 'build/public-data.json' files # generate the proof zargo prove # verify the proof zargo verify
A Zinc circuit is described with the manifest file
Zargo.toml with the
[circuit] name = "test" version = "0.1.0"