Skip to content

Latest commit

 

History

History
54 lines (36 loc) · 1.87 KB

README.md

File metadata and controls

54 lines (36 loc) · 1.87 KB

Example

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.

iOS

yarn ios

Android

yarn android

Custom circuits

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.

Circuits generation

You can build your own circuits and witnesses to use with example app. Circom

MacOS Setup

  1. Requires Homebrew and Node.
  2. Install circom.
  3. Install snarkjs. In case of errors try using Node 18 with n or other version manager.
  4. If you want to test inputs - place input.json file in internal circuits dir.
  5. Run ./circuits/scripts/build.sh to generate the circuit and witness files, prove and verify circuit with given input.json.
  6. 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.