Install & Setup
Dependencies
- React Native (Autolinking supported)
- Packages:
@zkp2p/zkp2p-react-native-sdk@react-native-async-storage/async-storage@react-native-cookies/cookiesreact-native-webview@zkp2p/webview-interceptviemreact-native-svgreact-native-device-info
Install
yarn add @zkp2p/zkp2p-react-native-sdk @react-native-async-storage/async-storage @react-native-cookies/cookies react-native-webview @zkp2p/webview-intercept viem react-native-svg react-native-device-info
iOS
- From your app:
cd ios && pod install - The SDK bundles
libgnarkprover.xcframeworkand circuit resources; CocoaPods wires these automatically via the Podspec. - Minimum iOS version follows your React Native project’s
min_ios_version_supportedvalue.
Android
- minSdkVersion: 24; targetSdkVersion: 34; compileSdkVersion: 35.
- Circuits are auto‑packaged into the library’s
src/main/assets/gnark-circuitsvia a Gradle task; no app changes required. - NDK is handled by the library build; consumers do not configure NDK directly.
Project setup notes
- Autolinking registers the native
Zkp2pGnarkModuleused for gnark proofs. react-native-webviewis required for the RPC bridge and provider authentication.react-native-device-infoenables dynamic memory‑based concurrency for proof generation.react-native-svgpowers the default proof status UI.
Verifying native link
- iOS: open the workspace in Xcode and confirm
Zkp2pReactNativeSdkpod is present; build once. - Android: a clean Gradle sync/build will show the circuit copy step in logs.