zk-kit.circom
zk-kit.circom copied to clipboard
A monorepo of reusable Circom circuits.
Circom
👥 Contributing | 🤝 Code of conduct | 🔎 Issues | 🗣️ Chat & Support
| ZK-Kit is a set of libraries (algorithms or utility functions) that can be reused in different projects and zero-knowledge protocols, making it easier for developers to access user-friendly, tested, and documented code for common tasks. ZK-Kit provides different repositories for each language - this one contains Circom templates only. |
|---|
[!IMPORTANT]
Installation of Circom required for circuit tests.
🗂️ Repositories
- Javascript: https://github.com/privacy-scaling-explorations/zk-kit
- Solidity: https://github.com/privacy-scaling-explorations/zk-kit.solidity
- Circom: https://github.com/privacy-scaling-explorations/zk-kit.circom
- Noir: https://github.com/privacy-scaling-explorations/zk-kit.noir
📦 Packages
| Package | Version | Downloads | Audited |
|---|---|---|---|
| @zk-kit/binary-merkle-root.circom |
|
|
✔️ |
| @zk-kit/ecdh.circom |
|
|
❌ |
| @zk-kit/poseidon-cipher.circom |
|
|
❌ |
| @zk-kit/poseidon-proof.circom |
|
|
❌ |
| @zk-kit/utils.circom |
|
|
❌ |
👥 Ways to contribute
- 🔧 Work on open issues
- 📦 Suggest new circuits
- 🐛 Create a report if you find any bugs in the code
🛠 Install
Clone this repository:
git clone https://github.com/privacy-scaling-explorations/zk-kit.circom.git
and install the dependencies:
cd zk-kit.circom && yarn
📜 Usage
Code quality and formatting
Install and run Circomspect to analyze the code and catch bugs:
yarn lint
[!WARNING]
You need to install Circomspect withcargo install circomspectto run this command.
Run Prettier to check formatting rules:
yarn format
or to automatically format the code:
yarn format:write
Conventional commits
ZK-Kit uses conventional commits. A command line utility to commit using the correct syntax can be used by running:
git commit
Testing
Test the code with:
yarn test
Compile
Compile all the circuits with:
yarn compile
Releases
- Bump a new version of the package with:
yarn version:bump <package-name> <version>
# e.g. yarn version:bump utils 2.0.0
This step creates a commit and a git tag.
- Push the changes to main:
git push origin main
- Push the new git tag:
git push origin <package-name>-<version>
# e.g. git push origin utils-v2.0.0
After pushing the new git tag, a workflow will be triggered and will publish the package on npm and release a new version on Github with its changelogs automatically.