ZK privacy pools using Noir.
Disclaimer: This project is intended for educational purposes only. The creators assume no responsibility for any illegal activities carried out with it, and the code is made public for viewing purposes only.
.
├── README.md
├── circuits - "Noir circuits"
│ ├── Nargo.toml
│ ├── Prover.toml - "Circuit proof inputs"
│ ├── Verifier.toml - "Circuit verification inputs"
│ ├── contract
│ │ └── ZeroLink
│ │ └── plonk_vk.sol - "UltraPlonk Solidity verifier"
│ ├── proofs
│ │ └── ZeroLink.proof - "Generated proof data"
│ ├── src
│ │ └── main.nr - "Main Noir circuit"
│ └── target
│ └── ZeroLink.json
├── foundry.toml
├── src
│ └── ZeroLink.sol - "Main Solidity contract"
└── test
└── ZeroLink.t.sol - "Solidity tests"
Install foundry.
curl -L https://foundry.paradigm.xyz | bash
foundryup
Install dependencies.
forge install
Install nargo.
curl -L https://raw.githubusercontent.com/noir-lang/noirup/main/install | bash
noirup -n
Navigate to the circuits directory.
cd circuits
Run the tests in main.nr.
nargo test
Compile the main circuit in main.nr.
nargo compile
Create a proof with public & private data from Prover.toml
.
nargo prove
This creates the proof file ZeroLink.proof.
Successful verification of the proof ZeroLink.proof and the public input from Verifier.toml
can be tested.
nargo verify
A proof for the circuit can be verified in Solidity.
nargo codegen-verifier
This creates the solidity Ultra Plonk verifier plonk_vk.sol specific to the circuit.
Navigate to the project's root directory.
Run the tests in ZeroLink.t.sol.
forge test