zk-starter
The easiest way to integrate succinct verifiable on-chain computation using hidden information in custom applications that execute on a credibly-neutral immutable public ledger.
Essentially, it's zero knowledge for those with zero knowledge.
๐ Getting Started
- Clone the repository using
git clone https://github.com/cawfree/zk-starter
. - Make sure you've installed Rust and Foundry:
curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh # install rust
curl -L https://foundry.paradigm.xyz | bash # install foundry
- Run
yarn
, which will installcircom
and automate a new Powers of Tau ceremony, then finally compile your arithmetic circuits. When you make changes to your circuits, you can also useyarn
to recompile them alongside their dependent smart contracts.
๐ก All the build artifacts are cached, so you'll only be required to do this once-per-installation.
โ ๏ธ By default,zk-starter
is configured not to track the results of ceremonies. You can delete the ignore flag of thebuild/
directory within the.gitignore
to avoid data loss.
- Finally, run
yarn dev
to execute the entire stack onhttp://localhost:3000
. This will redeploy the auto-generated verifier logic made available to your smart contracts on theanvil
local chain and inject the relevant configuration properties into your frontend.
โป๏ธ Adding New Circuits
zk-starter
's build life cycle ensures that for each new arithmetic circuit you build, a corresponding Solidity smart contract which inherits a compatible verifier will also be initialized for you to extend.
Likewise, for each circuit you create, a matching utility library is provided to the applicaton frontend at compile time. This yields namespaced high-level functions for generating and verifying proofs, and abstracting away the complexity of smart contract invocation for on-chain verification.
๐ Attribution
This monorepo was inspired by BattleZips ๐ดโโ ๏ธ (Git). Thank you for helping increase accessibility to the state-of-the-art in modern cryptography.