Before running the example app, you need to copy necessary circuit files you want to use to the example app.
assets/copy_assets.shTo setup the example app, call
yarn install && yarn podsAlso run yarn install in the root folder to install dependencies for the lib as it is not packed.
yarn iosyarn androidTo use custom circuits, place your circuit, witness and zkey files in the assets folder and run
assets/copy_assets.shOr put these files in the ios for iOS and to android/app/src/main/assets for Android directly.
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.jsonfile in internalcircuitsdir. - Run
./circuits/scripts/build.shto generate the circuit and witness files, prove and verify circuit with giveninput.json. - Run
./circuits/scripts/copy_to_example.shto 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.