@big-whale-labs/ketl-attestations-verifier
v0.0.2
Published
Ketl verifier for SealCred attestations
Downloads
5
Keywords
Readme
Ketl verifier for SealCred attestations
Usage
- Clone the repository with
git clone [email protected]:BigWhaleLabs/ketl-attestations-verifier.git
- Install the dependencies with
yarn
- Add environment variables to your
.env
file - Check out
yarn generate-inputs
script and modify it so that you get the correct inputs are generated for your circuits, then runyarn generate-inputs
- Run
yarn compile
to compile the circom circuits, create proof, verify proof, export verifier as a solidity Verifier.sol - Run
yarn test
to run the test suits and make sure your circuits are robust - Use the artifacts from the
public
folder in snarkjs - Run
yarn deploy
to deploy the verifier smart contracts to blockchain - Run
yarn release
to publish an NPM package with typings that can later be used in any of your JS/TS projects
Bonus
- Check out
scripts/compile-circuit.sh
for complete understanding of what's going on when compiling the circuits - Feel free to increase/decrease tau factors in the
pot
folder as you number of constraints grows or shrinks
Environment variables
| Name | Description |
| ---------------------------- | --------------------------------- |
| ETHERSCAN_API_KEY
| Etherscan API key |
| ETH_RPC
| Ethereum RPC URL |
| CONTRACT_OWNER_PRIVATE_KEY
| Private key of the contract owner |
Also check out the .env.example
file for more information.
Available scripts
yarn build
— compiles the contracts' ts interfaces to thetypechain
directoryyarn compile
- compiles the circom circuit, creates proof, verifies proof, exports verifier as a solidity file, exports artifacts to thepublic
directoryyarn test
— runs the test suiteyarn deploy
— deploys the contract to the networkyarn eth-lint
— runs the linter for the solidity contractsyarn lint
— runs all the lintersyarn prettify
— prettifies the code in th projectyarn release
— relases thetypechain
directory to NPM