fix: remove public signal checks
Former-commit-id: ba8a2d812ae7560cc963e230b22ee575605c00e2 [formerly dd1adcb485dc385d29185d730524b65eb391d0a1] [formerly 1b80a557aae032f80e02469703b416a3090f713f [formerly a7dadc5de656de409ec47939dad88180d378ba66]] [formerly a74f36b04df47f92ec22874392a50e2f671e89dd [formerly 32f594062b22d8be2b43a5c62f1d3531f1c40f8c] [formerly f4eec7da9407d04e134be024f0dbe8a0cd9d1712 [formerly f7a0b8c079]]]
Former-commit-id: 039cc5d5f9bb098d97da9f2ff74afa88d404956d [formerly 22b72ebee4a6716e565917d489c594cb47be3b1b] [formerly 06294e11a63cd5524a550295d253cb5638dba0ea [formerly 3c6fef20a3a61251bd5f1f0b626066aef7ea26a1]]
Former-commit-id: 0c3c48b49b2bab6a05fa9deba12c1a21b8a0214c [formerly f04c7bcb3579a9544d53c5dd3143cce7f9918d91]
Former-commit-id: 4894867e3476f9efb233746803f764f7bee04292
🧰 ZK-kit
A monorepo of reusable JS libraries for zero-knowledge technologies.
| ZK-kit is a set of NPM modules (algorithms or utility functions) that can be reused in different projects and zero-knowledge protocols, making it easier for developers to access ready-to-use and tested libraries for common tasks. |
|---|
♚ Simplified package management with Lerna (yarn, yarn build, yarn publish:fp)
♛ Conventional Commits for adding human and machine readable meaning to commit messages (yarn commit)
♜ Jest tests & common test coverage for all packages (yarn test)
♞ ESLint & Prettier to keep the code neat and well organized (yarn prettier & yarn lint)
♝ Automatic deployment of documentation generated with typedocs
♟ Simple benchmarking framework for JavaScript/TypeScript libraries with Benny (yarn benchmarks)
📦 Packages
🛠 Install
Clone this repository and install the dependencies:
$ git clone https://github.com/appliedzkp/zk-kit.git
$ cd zk-kit && yarn
📜 Usage
$ yarn lint # Syntax check with ESLint (yarn lint:fix to fix errors).
$ yarn prettier # Syntax check with Prettier (yarn prettier:fix to fix errors).
$ yarn commit # Interactive Commitizen commit.
$ yarn test # Test all packages (with common coverage).
$ yarn build # Create a JS build for each package.
$ yarn publish:fp # Publish packages on npm.
❓ FAQ
I have a library that could be reused in other projects. How can I integrate it on ZK-kit?
ZK-kit provides a set of pre-configured development tools. All you have to deal with is your own code, testing and documentation. To create a package follow these steps:
- Fork this repository and clone it (or simply clone it directly if you are a collaborator),
- Copy one of our current libraries and update the
README.mdandpackage.jsonfiles with your package name:
cd zk-kit
cp -r packages/sparse-merkle-tree packages/my-package
cd packages/my-package && rm -fr node_modules dist
grep -r -l "sparse-merkle-tree" . | xargs sed -i 's/sparse-merkle-tree/my-package/'
# Update the remaining description/usage sections, and write your code in the src & tests folders!
How can I test and publish my library?
ZK-kit provides two commands: yarn test and yarn publish:fp. Both must be run from the root folder. yarn test will test all packages in the monorepo, including yours using the files inside your packages/my-package/tests folder. yarn publish:fp can only be run by those who own the NPM token of the ZK-kit organization. They will then have to publish your package. This task could be automated in the future.
How can I create benchmarks for my library?
You can see some examples in the benchmarks folder. All you have to do is create a file that exports a function to run your benchmark in that folder, and add that function to the index.ts file. The yarn benchmarks command can be run with no parameters (it will run all the benchmarks), or you can specify the name of your benchmark file to run just that. When you run the command it will creates a benchmarks/results folder with your results.
How can I publish the documentation of my library with typedocs?
You just need to insert the NPM docs command in your package.json file, as in the other packages. This command will be executed by Lerna and the output of typedocs will be placed in the docs folder of the root directory, which will be used to deploy the documentation websites by the Github docs workflow whenever the main branch is updated.