@nolanle/mixlib
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

npm npm-downloads

Installation

First of all, installation step:

  • With npm
npm install @nolanle/mixlib
  • With yarn
yarn add @nolanle/mixlib

Usages

  • Generate Master Key and Mnemonic
import {create, Network} from '@nolanle/mixlib;

<!-- 12 | 15 | 18 | 21 | 24 -->
const count = 12;

<!-- use this -->
const masterKey = await create('Master Key', count);
console.log(masterKey.mnemonic);
  • Derive master key to accounts
const network = new Network('Ethereum', 'ETH', 18, 60);
const ethAccount = masterKey.derive(network);
  • Working with account
const address = ethAccount.toAddress();
const balance = ethAccount.getBalance();
const privkey = ethAccount.toPrivateKey();

/@nolanle/mixlib/

    Package Sidebar

    Install

    npm i @nolanle/mixlib

    Weekly Downloads

    2

    Version

    0.0.3

    License

    MIT

    Unpacked Size

    23.3 kB

    Total Files

    26

    Last publish

    Collaborators

    • nolanledev
    • nolanle11