react-native-action-wallet-eth
v1.1.1
Published
## Features
Downloads
20
Maintainers
Readme
React-native-action-wallet-eth
Features
- Function create wallet, validate based on ethers.js
- Create Wallet
- getHistory
- getBalance
- More
- getGasPrice
- getTransaction
- getTransactionReceipt
- validateWallet
- validateAddress
- validateMnemonic
- validateNetwork
- validatePrivateKey
Installation
Clone the repo
git clone https://github.com/ongdetui/react-native-action-wallet-eth.git
Install NPM packages
npm i react-native-action-wallet-eth
If use yarn
yarn add react-native-action-wallet-eth
Create Wallet
import {createWallet} from 'react-native-action-wallet-eth'
// Create new wallet
await createWallet('rinkeby');
// Import privateKey
await createWallet('rinkeby', {privateKey: 'privateKey your'});
// Re-store wallet
await createWallet('rinkeby', {mnemonic: 'mnemonic your'});
getHistory
import {getHistory} from 'react-native-action-wallet-eth'
function getHistory(
network: string,
address: string,
option?: {
startblock?: number;
endblock?: number;
sort?: string;
}
): Promise<ResponseHistory>;
getBalance
import {getBalance} from 'react-native-action-wallet-eth'
function getBalance(
network: string,
address: string
): Promise<ResponseBalance>;