@conflux-dev/hdwallet
TypeScript icon, indicating that this package has built-in type declarations

0.1.2 • Public • Published

HDWallet

Install

$ npm install @conflux-dev/hdwallet

How to use

const { HDWallet } = require('@conflux-dev/hdwallet');

const mnemonic =  HDWallet.generateMnemonic();
// faint also eye industry survey unhappy boil public lemon myself cube sense

const wallet = new HDWallet(mnemonic);

const privateKey0 = wallet.getPrivateKeyByIndex(0);
console.log(privateKey0.toString('hex'));
// 40d0f137665463584cc57fce2b761572a85d1cbf1601fc93d001c129b2a11c92
const privateKey1 = wallet.getPrivateKey("m/44'/503'/0'/0/1");
console.log(privateKey0.toString('hex'));

Readme

Keywords

Package Sidebar

Install

npm i @conflux-dev/hdwallet

Weekly Downloads

17

Version

0.1.2

License

LGPL-3.0

Unpacked Size

5.02 kB

Total Files

8

Last publish

Collaborators

  • ypliu
  • geekberry
  • pana
  • wangdayong228