Socket
Book a DemoInstallSign in
Socket

@iden3/react-native-rapidsnark

Package Overview
Dependencies
Maintainers
4
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@iden3/react-native-rapidsnark

React-native wrapper for rapidsnark

Source
npmnpm
Version
0.0.1-alpha.0
Version published
Weekly downloads
21
-79.41%
Maintainers
4
Weekly downloads
 
Created
Source

react-native-rapidsnark

This library is React Native wrapper for the Rapidsnark. It enables the generation of proofs for specified circuits and witnesses within a React Native environment.

Platform Support

iOS: Compatible with any iOS device with 64 bit architecture.

Version for emulator built without assembly optimizations, resulting in slower performance.

Android: Compatible with arm64-v8a, armeabi-v7a, x86_64 architectures.

Installation

npm install react-native-rapidsnark

Usage

const rapidsnark = NativeModules.Rapidsnark;

// ...

const {proof, pub_signals} = await rapidsnark.groth16_prover(zkey, wtns);

proof and pub_signals are JSON encoded strings.

iOS linking troubleshooting

If you get an error like this:

building for 'iOS-simulator', but linking in object file (${SRC_ROOT}/ios/Frameworks/Rapidsnark.xcframework/ios-arm64/librapidsnarkmerged.a[2](fq.o)) built for 'iOS'
  • Open XCode
  • Select your project in the left sidebar
  • Select Build Phases tab
  • Expand Link Binary With Libraries
  • Add RapidSnark.xcframework from Workspace/Pods folder.

Example App

Check out the example app for a working example.

TODO:

[-]: Add verification.

License

react-native-rapidsnark is part of the iden3 project 0KIMS association. Please check the COPYING file for more details.

Made with create-react-native-library

Keywords

react-native

FAQs

Package last updated on 08 Dec 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts