ie put the bip39 seed directly into bip32 without hashing it first like
bip32.org does with passphrases.
function calcBip32Seed(phrase, passphrase, path) {
var seed = mnemonic.toSeed(phrase, passphrase);
- var seedHash = Bitcoin.crypto.sha256(seed).toString("hex");
- bip32RootKey = Bitcoin.HDNode.fromSeedHex(seedHash, network);
+ bip32RootKey = Bitcoin.HDNode.fromSeedHex(seed, network);
bip32ExtendedKey = bip32RootKey;
// Derive the key from the path
var pathBits = path.split("/");
function calcBip32Seed(phrase, passphrase, path) {
var seed = mnemonic.toSeed(phrase, passphrase);
- var seedHash = Bitcoin.crypto.sha256(seed).toString("hex");
- bip32RootKey = Bitcoin.HDNode.fromSeedHex(seedHash, network);
+ bip32RootKey = Bitcoin.HDNode.fromSeedHex(seed, network);
bip32ExtendedKey = bip32RootKey;
// Derive the key from the path
var pathBits = path.split("/");