Before running the example app, you need to compile test circuit, and copy necessary files to the example app.
cd circuits/scripts &&
yarn install &&
./build.sh &&
./copy_to_example.sh &&
cd ../..
To setup the example app, call
yarn install && yarn pods
Also run yarn install
in the root folder to install dependencies for the lib as it is not packed.
yarn ios
yarn android
To use custom circuits, place your circuit, witness and zkey files in the ios
for iOS and to android/app/src/main/assets
for Android.
Or put these files in the example
root folder and call scripts/copy_assets.sh
to copy them to the correct location.
You can build your own circuits and witnesses to use with example app. Circom
- Requires Homebrew and Node.
- Install circom.
- Install snarkjs. In case of errors try using Node 18 with n or other version manager.
- If you want to test inputs - place
input.json
file in internalcircuits
dir. - Run
./circuits/scripts/build.sh
to generate the circuit and witness files, prove and verify circuit with giveninput.json
. - Run
./circuits/scripts/copy_to_example.sh
to update example app with new circuit and witness files.
circuits
folder is taken from iden3/circuits repo.
circuits/input.json
is taken from iden3/circuits test, line 10.