1.0.12 • Published 1 year ago

redbelly-wallet-js v1.0.12

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Redbelly Wallet JS

A JavaScript library for interacting with Redbelly blockchain wallets.

Installation

npm install redbelly-wallet-js

Usage

const RedbellyWallet = require('redbelly-wallet-js');
const network = 'DEVNET'; // or 'TESTNET' or 'MAINNET'
const wallet = new RedbellyWallet(network);
// Create a new wallet from mnemonic
const mnemonic = 'your twelve word mnemonic phrase here';
wallet.createWalletFromMnemonic(mnemonic)
.then(account => console.log(account))
.catch(error => console.error(error));
// Get balance
wallet.getBalance('0x1234567890123456789012345678901234567890')
.then(balance => console.log(balance))
.catch(error => console.error(error));
// Send transaction
const privateKey = 'your private key here';
const toAddress = '0x1234567890123456789012345678901234567890';
const amount = 1.5; // in Ether
wallet.sendTransaction(privateKey, toAddress, amount)
.then(receipt => console.log(receipt))
.catch(error => console.error(error));

License

MIT

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago