Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

coinethjs

Bitclimb12MIT1.0.0

Bip44 implementation of Ethereum on Nodejs

bip33, ether, wallet, ethereum

readme

coinethjs

Bip44 implementation of Ethereum

Usage

const ethjs = require('coinethjs');
const bitcoin = require('bitcoinjs-lib');

//using bip39 mnemonic
const seed = bip39.mnemonicToSeed(mnemonic); // your 12 word bip39 seed
// using bip32 xpriv
const seed = bitcoin.crypto.sha256(BIP32_KEY); // your BIP32 KEY

const node = ethjs.fromSeedBuffer(seed);
const master = node.derivePath(`m/44'/60'/0'/0/0`);
 getPrivateKey () {
    if (master.keyPair) {
      return master.keyPair.toWIF();
    } else {
      return master.getPrivateKey();
    }
  }
  getAddress () {
    return master.getAddress();
  }
console.log(getAddress()) // prints the address
console.log(getPrivateKey()) // prints the private key