🚀 Launch Week Day 4:Introducing the Alert Details Page: A Better Way to Explore Alerts.Learn More →
Socket
Book a DemoInstallSign in
Socket

react-native-elastos-wallet-core

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-elastos-wallet-core

## Getting started

latest
Source
npmnpm
Version
1.0.5
Version published
Maintainers
1
Created
Source

react-native-elastos-wallet-core

Getting started

$ npm install react-native-elastos-wallet-core --save

Mostly automatic installation

$ react-native link react-native-elastos-wallet-core

Manual installation

iOS

  • In XCode, in the project navigator, right click Libraries âžś Add Files to [your project's name]
  • Go to node_modules âžś react-native-elastos-wallet-core and add RNElastosMainchain.xcodeproj
  • In XCode, in the project navigator, select your project. Add libRNElastosMainchain.a to your project's Build Phases âžś Link Binary With Libraries
  • Run your project (Cmd+R)

Android

TODO

  • Open up android/app/src/main/java/[...]/MainApplication.java
  • Add import org.elastos.mainchain.reactnative.RNElastosMainchainPackage; to the imports at the top of the file
  • Add new RNElastosMainchainPackage() to the list returned by the getPackages() method
  • Append the following lines to android/settings.gradle:
    include ':react-native-elastos-wallet-core'
    project(':react-native-elastos-wallet-core').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-elastos-wallet-core/android')
    
  • Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-elastos-wallet-core')
    

Additional configurations

As the react-native-elastos-wallet-core package refers to the https://github.com/elastos/Elastos.ORG.Wallet.Lib.C library, some additional configurations are required:

  • Open the Xcode project located under the ios/ folder in your react-native project
  • Click the name of the project and select the target with the same name
  • Click "Build settings" and add "$(SRCROOT)/../node_modules/react-native-elastos-wallet-core/Elastos.ORG.Wallet.Lib.C/src" to Header Search Paths
  • Similarly add "$(SRCROOT)/../node_modules/react-native-elastos-wallet-core/Elastos.ORG.Wallet.Lib.C/build/ios/src" to Library Search Paths
  • Go to Build Phases/ Link Binary with Libraries and drag&drop the node_modules/react-native-elastos-wallet-core/Elastos.ORG.Wallet.Lib.C/build/ios/src/libElastos.Wallet.Utility.dylib file

Usage

import RNElastosMainchain from 'react-native-elastos-wallet-core';

// Generate a new mnemonic (defaults to English)
RNElastosMainchain.generateMnemonic((err, mnemonic) => {
    console.log(mnemonic)
});

Keywords

elastos

FAQs

Package last updated on 18 Nov 2018

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