Ethereum-Bip44
Library to generate Wanchain addresses from a hierarchical deterministic wallet according to the BIP44 standard.
Internally it uses bitcore for the deterministic private and public keys which allows to use many additional features like deriving Ethereum address from mnemonic backups (BIP32).
Getting Started
npm install wanchain-bip44
Create a new wallet:
var bitcore = ;var EthereumBip44 = ;// create a new master private keyvar key = bitcore;// create the hd walletvar wallet = key;// output the first addressconsole;// output the second addressconsole;
Initialize from an existing private seed:
var bitcore = ;var EthereumBip44 = ;// create the hd walletvar wallet = EthereumBip44;// output the first addressconsole;// output the second addressconsole;
Initialize it from a public seed, for example on hot wallets that don't hold private keys:
var bitcore = ;var EthereumBip44 = ;var key = ;var derivedPubKey = keyhdPublicKey;// create the hd walletvar wallet = EthereumBip44;// output the first addressconsole;// output the second addressconsole;
Note: You need to use a derived public key like shown here, otherwise it won't allow to derive hardened keys.
Original Author Timon Rapp timon@zaeda.net
License
MPL-2.0