react-native-ethereum-wallets
v0.1.2
Published
An easy-to-use Ethereum wallet generator for React Native.
Downloads
5
Maintainers
Readme
React Native Ethereum Wallet Generator
Introduction
An easy-to-use package for React Native in plain Javascript to create private keys and corresponding Ethereum addresses. Private keys are generated by a package called react-native-securerandom, which makes use of SecRandomCopyBytes
on iOS and SecureRandom
on Android.
Code Samples
import walletGenerator from 'react-native-ethereum-wallets';
const privateKey = await walletGenerator.createPrivateKey();
const publicKey = walletGenerator.getPublicKey(privateKey);
const address = walletGenerator.convertToEthereumAddress(publicKey);
const checkSum = walletGenerator.addChecksum(address);
Installation
Install react-native-securerandom$ yarn add react-native-securerandom
Then link the package$ react-native link react-native-securerandom
Install react-native-ethereum-wallets$ yarn add react-native-ethereum-wallets