Noir Verifier
Requirements (read carefully to avoid 99% of issues!)
Garaga CLI Python package version 1.0.1 (install with
pip install garaga==1.0.1)Noir 1.0.0-beta.16 (install with
noirup --version 1.0.0-beta.16ornpm i @noir-lang/noir_js@1.0.0-beta.16)Barretenberg 3.0.0-nightly.20251104 (install with
bbup --version 3.0.0-nightly.20251104ornpm i @aztec/bb.js@3.0.0-nightly.20251104)
To install noirup and bbup, follow the quickstart guide from aztec.
Generate a Starknet smart contract for your Noir program
First, create a new Noir project and compile it with nargo build.
nargo new hello
cd hello
nargo buildThis will create a json file in hello/target/hello.json
Now, generate the corresponding verifying key vk using barretenberg:
bb write_vk -s ultra_honk --oracle_hash keccak -b target/hello.json -o target/vkFinally, generate a smart contract from the verifying key using the garaga CLI.
garaga gen --system ultra_keccak_zk_honk --vk target/vkThis will create a smart contract folder with the following structure.
The main function of interest is located in honk_verifier.cairo
The contract interface will be
In order to interact with the endpoint, we need to generate the full_proof_with_hints array.
To do so, we need a specific proof for your program. But first, Noir requires to specify the inputs of the program in hello/Prover.toml
Now, generate a proof with barretenberg:
This creates two files in the target/ directory:
target/proof- the ZK prooftarget/public_inputs- the public inputs
Generating the calldata (full_proof_with_hints array)
full_proof_with_hints array)Version Compatibility: Use the same Garaga SDK version (pip/npm/Rust) that generated your verifier contract. Mismatched versions produce incompatible calldata and cause verification to fail.
Finalizing the above CLI example, you can obtain the full_proof_with_hints array using the garaga CLI. From within the "hello" directory:
Add the Rust Crate to your project.
Using the garaga Npm package
Using the garaga Python package
BB CLI Reference
Verification Key Generation:
Proof Generation (ZK mode is default):
Proof Verification (optional, for local testing):
Complete dApp Tutorial
Follow the Scaffold‑Garaga repository. This starter kit combines Noir, Garaga, and Starknet with in‑browser proving to help you ship a privacy‑preserving dApp fast.
What you'll learn
Generate & deploy an UltraHonk proof verifier to a local Starknet devnet.
Add on‑chain state to your privacy‑preserving app.
Connect a wallet and deploy to a public testnet.
Need Support ?
Last updated
Was this helpful?