Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

Mnemonic from <-> to #68

Open
speculees opened this issue Nov 27, 2018 · 2 comments
Open

Mnemonic from <-> to #68

speculees opened this issue Nov 27, 2018 · 2 comments

Comments

@speculees
Copy link

Hi, I have a question.
I create Mnemonic from some String. I then call toSeed() method and I get a Buffer. Afterwards, I create a new Mnemonic using the same Buffer generated by toSeed method. I call toHDPrivateKey().privateKey.toWIF() on both Mnemonics and I get two different results. Why is this? It seems if I pass String or Buffer to Mnemonic constructor the result should be the same, yet it's not.

@speculees
Copy link
Author

speculees commented Nov 28, 2018

And here is the code example:

var Mnemonic = require('bitcore-mnemonic');
var bitcore = require('bitcore-lib');

var wordPhrase = 'concert great autumn belt diagram page rigid stereo draw comfort goat zone';
var mnemonicCode1 = new Mnemonic(wordPhrase);
var bufferSeed = mnemonicCode1.toSeed();
var mnemonicCode2 = new Mnemonic(bufferSeed);

console.log(mnemonicCode1.phrase); // output: concert great autumn belt diagram page rigid stereo draw comfort goat zone
console.log(mnemonicCode2.phrase); // output: volcano suspect marriage delay focus spring firm message add lizard royal board yard daughter online robust wonder help review gospel between convince truck trumpet trim tackle term unique depart solve border rather gap aware ball electric ask faint open heavy direct cause noise fee picnic cheap illness museum

@speculees
Copy link
Author

Oh yeah. I know there is fromSeed function, but It just checks if params are correct type before passing them to the return new Mnemonic(seed, wordlist);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant