README.md
January 13, 2025 ยท View on GitHub
Example
Before running the example app, you need to copy necessary circuit files you want to use to the example app.
assets/copy_assets.sh
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.
iOS
yarn ios
Android
yarn android
Custom circuits
To use custom circuits, place your circuit, witness and zkey files in the assets folder and run
assets/copy_assets.sh
Or put these files in the ios for iOS and to android/app/src/main/assets for Android directly.
Circuits generation
You can build your own circuits and witnesses to use with example app. Circom
MacOS Setup
- 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.