Closed avsync closed 3 years ago
I managed to figure out some basic javascript, just enough to get a test vectors from jsbtc and now I've found that I can get the output from pybtc to match jsbtc. Neither of them produce a split mnemonic that is recoverable on https://bitaps.com/mnemonic though. What's up with that, what I am doing wrong?
let m = 'monkey weird office glove olympic tank vote raven never punch diesel hobby';
console.log("Mnemonic:", m);
let s = btc.splitMnemonic(2, 2, m);
console.log("Split Mnemonic 2/2", s);
console.log("Recovered Mnemonic:", btc.combineMnemonic(s));
_Mnemonic: monkey weird office glove olympic tank vote raven never punch diesel hobby
Split Mnemonic 2/2 {"181":"humble owner damage purse verb under sail deputy skin clap exotic problem","254":"room elegant vintage quick culture brown type shallow ignore culture whip spell"}
Recovered Mnemonic: monkey weird office glove olympic tank vote raven never punch diesel hobby_
And the same thing in pybtc. I must be missing something...
mnemonic = "monkey weird office glove olympic tank vote raven never punch diesel hobby"
print("Mnemonic: ", mnemonic)
split = split_mnemonic(mnemonic, 2, 2)
print("Split Mnemonic: ", split)
combine = combine_mnemonic(split)
print("Recovered Mnemonic: ", combine)
Mnemonic: monkey weird office glove olympic tank vote raven never punch diesel hobby Split Mnemonic: {1: 'curve size try mesh lock pair detail ordinary display flower candy degree', 2: 'tragic obvious divide lyrics rifle fetch grit until surface night series session'} Recovered Mnemonic: monkey weird office glove olympic tank vote raven never punch diesel hobby
Please try this branch. https://github.com/bitaps-com/pybtc/tree/new_block_tx
I not yet finished test coverage and no merge in master
Implementation reference https://github.com/bitaps-com/mnemonic-offline-tool/blob/master/BIP/mnemonic-improvement.md
this. branch https://github.com/bitaps-com/pybtc/tree/new_block_tx implemented according BIP
Thank you for looking into this, much appreciated! I can confirm combine is working as expected in this branch.
Hope to finish work on latest version of pybtc soon!
merged to master
I've been trying to get the combine/split mnemonic in pybtc to play nicely and match https://bitaps.com/mnemonic but the implementation must be different. I've tried to understand how the pybtc mnemonic combine/split differs from jsbtc but my understanding of js is pretty much non existent. Any pointers would be appreciated.