mirror of
https://github.com/OneKeyHQ/bip39.git
synced 2026-04-05 18:43:47 +00:00
bip32.org format not used for seed
ie put the bip39 seed directly into bip32 without hashing it first like bip32.org does with passphrases.
This commit is contained in:
@@ -22865,8 +22865,7 @@ WORDLISTS = {
|
||||
|
||||
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("/");
|
||||
|
||||
@@ -164,8 +164,7 @@
|
||||
|
||||
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("/");
|
||||
|
||||
Reference in New Issue
Block a user