0.17.0-rc8.17 • Published 2 years ago
@ximingwang/hd v0.17.0-rc8.17
@ximingwang/hd
HD & Mnemonic implementation for lumos.
Usage
Create a new HD wallet.
const { mnemonic, ExtendedPrivateKey, Keystore } = require("@ximingwang/hd");
const m = mnemonic.generateMnemonic();
const seed = mnemonic.mnemonicToSeedSync(m);
const extendedPrivateKey = ExtendedPrivateKey.fromSeed(seed);
const keystore = Keystore.create(extendedPrivateKey, "Your password");
// save keystore file
keystore.save("you path, only dir");
// load keystore file
const keystore = Keystore.load("you file path, with file name");
XPub support.
const { XPubStore } = require("@ximingwang/hd");
// load from xpub file.
const xpub = XPubStore.load("you path");
// to AccountExtendedPublicKey
const accountExtendedPublicKey = xpub.toAccountExtendedPublicKey();
// save xpub file.
xpub.save("your path");
0.18.0-rc5.1
2 years ago
0.16.1-next.105
2 years ago
0.17.0-rc8.17
2 years ago
0.17.0-rc8.16
2 years ago
0.17.0-rc8.15
2 years ago
0.17.0-rc8.14
2 years ago
0.17.0-rc8.13
2 years ago
0.17.0-rc8.11
2 years ago
0.17.0-rc8.10
2 years ago