Latest Threat ResearchGlassWorm Loader Hits Open VSX via Developer Account Compromise.Details
Socket
Book a DemoInstallSign in
Socket

react-native-elastos-unity-wallet

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-elastos-unity-wallet

## Getting started

latest
Source
npmnpm
Version
1.0.8
Version published
Maintainers
1
Created
Source

React Native Elastos Wallet Plugin

The React Native Elastos Unity Wallet repository provides all the necessary code to port the Elastos wallet functionnalities to React Native. Developers can use the Elastos Unity wallet module to implement the Elastos wallet functionalities into their existing app. Elastos Wallet is used to manage private and public keys and to make transactions on the Elastos network including DID sidechain.

Installation

You can install the react-native-unity-elastos-wallet package using npm or yarn:

## with npm
npm install react-native-elastos-unity-wallet --save
## with yarn
yarn add react-native-elastos-unity-wallet

Platform specific linking

Automatic linking

iOS

  • RN < 0.60
react-native link react-native-elastos-unity-wallet
  • RN > 0.60
cd ios
pod install

Android

The only step required for Android is to insert the following lines inside the android block in android/app/build.gradle:

packagingOptions {
	pickFirst '**/libc++_shared.so'
}

Manual linking

iOS

  • In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]
  • Go to node_modulesreact-native-elastos-unity-wallet and add RNElastosMainchain.xcodeproj
  • In XCode, in the project navigator, select your project. Add libRNElastosMainchain.a to your project's Build PhasesLink Binary With Libraries
  • Run your project (Cmd+R)

Android

  • 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:
    implementation project(':react-native-elastos-wallet-core')
    
  • Insert the following lines inside the android block in android/app/build.gradle:
    packagingOptions {
        pickFirst '**/libc++_shared.so'
    }
    

Usage

import Wallet from 'react-native-elastos-unity-wallet';

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

The complete documentation is available on: elastosunity.com/docs/wallet

Keywords

elastos

FAQs

Package last updated on 05 Mar 2020

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