circuits
: circuits to create passport and Aadhaar credentials.contracts/verifiers
: groth16 verifier contracts built from the circuits.package
: files needed for generation of witness calculator fromwitnesscalc-template
project.scripts
: scripts for building and packagingtests
: tests for the different circuits.
- Install dependencies
git submodule update --init --recursive
yarn install
- Build circuits for the different instances of signature algorithms based on scripts in
scripts/build/
.
npm run build-dsc
npm run build-signature
Results for the builds in build
folder.
You can select which circuits to build by updating :true
of :false
in the scripts for circuits in the CIRCUITS
variable.
- Generate package for the different instances of signature algorithms based on scripts in
scripts/package/
.
npm run package-dsc
npm run package-signature
Results for the packages in package
folder.
You can select which circuits to package by updating :true
of :false
in the scripts for circuits in the CIRCUITS
variable.
You can change sigAlgs
in test_cases.ts
to run specific signature algorithm.
npm run test-dsc
npm run test-signature
Once the circuits are built and packaged you can test integrations generating witnesses, proofs and verifying the proofs for desired circuit or full test suite.
First of all you need to download prover
executable from rapidsnark
for your OS from https://github.com/iden3/rapidsnark/releases and copy it to rapidsnark
folder.
Now you are ready to execute integration tests.
- Single circuit specified in
test_cases.ts
insigAlgs
npm run integration-dsc
or
npm run integration-signature
- Full suite specified in
test_cases.ts
infullSigAlgs
FULL_TEST_SUITE=true npm run integration-dsc
or
FULL_TEST_SUITE=true npm run integration-signature