cd circuits-keykosbt && circom drivingLicenseConstraint.circom --r1cs --wasm --sym --c
cd .. && cd dist/src && node generateHash.js
paste data in input.json
cd ../../circuits-keykosbt && cp input.json drivingLicenseConstraint_js
cd drivingLicenseConstraint_js
node generate_witness.js drivingLicenseConstraint.wasm input.json witness.wtns
cd ..
snarkjs powersoftau new bn128 12 pot12_0000.ptau -v
snarkjs powersoftau contribute pot12_0000.ptau pot12_0001.ptau --name="First contribution" -v
snarkjs powersoftau prepare phase2 pot12_0001.ptau pot12_final.ptau -v
snarkjs groth16 setup drivingLicenseConstraint.r1cs pot12_final.ptau drivingLicenseConstraint_0000.zkey
snarkjs zkey contribute drivingLicenseConstraint_0000.zkey drivingLicenseConstraint_0001.zkey --name="1st Contributor Name" -v
snarkjs zkey export verificationkey drivingLicenseConstraint_0001.zkey verification_key.json
copy paste witness.wtns to the general circuit folder (circuits-keykosbt)
snarkjs groth16 prove drivingLicenseConstraint_0001.zkey witness.wtns proof.json public.json
snarkjs groth16 verify verification_key.json public.json proof.json
snarkjs zkey export solidityverifier drivingLicenseConstraint_0001.zkey verifier.sol
deploy contract
snarkjs generatecall
source:
https://docs.circom.io/getting-started/proving-circuits/#verifying-from-a-smart-contract