react-native-blind-threshold-bls
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

react-native-blind-threshold-bls

Description

This is a React Native wrapper for the Celo Threshold BLS Rust library

It works on iOS and Android, providing access to the crypto operations implemented by the rust library.

Getting started

npm install react-native-blind-threshold-bls --save

Usage

import BlindThresholdBls from 'react-native-blind-threshold-bls';

await BlindThresholdBls.blindMessage(base64PhoneNumber);

await BlindThresholdBls.unblindMessage(base64BlindSig, PUB_KEY)

Updating the libs

The precompiled libs for android (.so files) and ios (.a file) and checked into this repo. To update them, follow the instructions in the celo-threshold-bls-rs repo to create the libs and then copy them over here.

Android libs live in android/src/main/jniLibs. The combined iOS lib lives in ios/Libraries.

Additionally, the header file for the FFI bindings must be included here to support compilation for iOS. That file is located at ios/Headers/threshold.h. Do not modify that file directly. If the FFI interface must change, change it in the celo-threshold-bls-rs repo and copy the header file here.

Proguard

To accomodate JNA, add the following to the consuming app's proguard rules:

-dontwarn java.awt.*
-keep class com.sun.jna.* { *; }
-keepclassmembers class * extends com.sun.jna.* { public *; }

Readme

Keywords

Package Sidebar

Install

npm i react-native-blind-threshold-bls

Weekly Downloads

5

Version

1.0.1

License

Apache-2.0

Unpacked Size

145 MB

Total Files

135

Last publish

Collaborators

  • preben123
  • jmrossy