https://github.com/edgeapp/react-native-secp256k1
React Native bindings to the libsecp256k1 library
https://github.com/edgeapp/react-native-secp256k1
Last synced: 5 months ago
JSON representation
React Native bindings to the libsecp256k1 library
- Host: GitHub
- URL: https://github.com/edgeapp/react-native-secp256k1
- Owner: EdgeApp
- Created: 2017-05-26T17:56:55.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-06-06T18:55:14.000Z (about 8 years ago)
- Last Synced: 2025-04-21T08:13:35.800Z (about 1 year ago)
- Language: C
- Size: 228 KB
- Stars: 2
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-native-secp256k1
*This project is deprecated*. Please see [react-native-fast-crypto](https://github.com/Airbitz/react-native-fast-crypto), which includes secp256k1 routines.
## Getting started
`$ npm install react-native-secp256k1 --save`
### Mostly automatic installation
`$ react-native link react-native-secp256k1`
### Manual installation
#### iOS
1. In XCode, in the project navigator, right click `Libraries` ➜ `Add Files to [your project's name]`
2. Go to `node_modules` ➜ `react-native-secp256k1` and add `RNMyFancyLibrary.xcodeproj`
3. In XCode, in the project navigator, select your project. Add `libRNMyFancyLibrary.a` to your project's `Build Phases` ➜ `Link Binary With Libraries`
4. Run your project (`Cmd+R`)<
#### Android
1. Open up `android/app/src/main/java/[...]/MainActivity.java`
- Add `import com.reactlibrary.RNMyFancyLibraryPackage;` to the imports at the top of the file
- Add `new RNMyFancyLibraryPackage()` to the list returned by the `getPackages()` method
2. Append the following lines to `android/settings.gradle`:
```
include ':react-native-secp256k1'
project(':react-native-secp256k1').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-secp256k1/android')
```
3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:
```
compile project(':react-native-secp256k1')
```
#### Windows
[Read it! :D](https://github.com/ReactWindows/react-native)
1. In Visual Studio add the `RNMyFancyLibrary.sln` in `node_modules/react-native-secp256k1/windows/RNMyFancyLibrary.sln` folder to their solution, reference from their app.
2. Open up your `MainPage.cs` app
- Add `using Com.Reactlibrary.RNMyFancyLibrary;` to the usings at the top of the file
- Add `new RNMyFancyLibraryPackage()` to the `List` returned by the `Packages` method
## Usage
```javascript
import RNMyFancyLibrary from 'react-native-secp256k1';
// TODO: What to do with the module?
RNMyFancyLibrary;
```