This is a sample Expo app that demonstrates how mopro can be used to prove a multiplier2 circuit.
Learn more about Mopro: https://zkmopro.org.
Use node.js >= 20
nvm use 20npm install-
setup the
ANDROID_HOMEenvironmentexport ANDROID_HOME=~/Library/Android/sdk
start an android emulator/device
npm run android
-
start an iOS simulator
npm run ios
To run the app on a real iOS device, open the Xcode workspace:
open ios/MyTestLibraryExample.xcworkspace
Then, in Xcode, select your project in the sidebar, go to Signing & Capabilities → Signing, and choose your Apple account (team) under Team.
-
start a web app
npm run web
- Get
MoproReactNativeBindingsthrough Getting Started - Update the
MoproReactNativeBindingsfolder
-
For example, in
src/App.tsximport { CircomProofResult, generateCircomProof, ProofLib, verifyCircomProof, } from 'mopro-ffi'; const circuitInputs = { a: ["3"], b: ["5"], }; const res: CircomProofResult = await generateCircomProof( zkeyPath.replace("file://", ""), JSON.stringify(circuitInputs), ProofLib.Arkworks ); const res: boolean = await verifyCircomProof( zkeyPath.replace("file://", ""), res, ProofLib.Arkworks );

