I still dont understand what needs to be changed in the seed creation algorithm in order to get such a seed that electrum calls segwit
It needs to have a 0x100 version number, according to the documentation above. During seed phrase generation, the wallet software generates seeds until the hash of their seed phrase begins with the specified version number, in this case, 0x100. So, in order for your algorithm to be compatible with Electrum, it has to check the first two bytes of the hash of the seed phrase.
thank you. this is the perfect choice for me. Here is the problem with the implementation.
I generate BIP39
then according to documentation
https://electrum.readthedocs.io/en/latest/seedphrase.htmlneed to do
normalized = prepare_seed(seed_phrase)
The normalization function (prepare_seed) removes all but one space between words.
what space to leave is not written anywhere (
and only then (am I right?)
if(DigestUtils.sha512Hex(seed).startsWith("100")) {
System.out.println(DigestUtils.sha512Hex(seed));
System.out.println(mnemonicPhrase);
}
I understand that I am trying to scratch my left ear with my heel and it will be correct to generate entropy and then get seed from it. But now I need to do exactly this kind of logic.
Thank you in advance.