recover wallet in electrum from hex mpk

0

I´m trying to recover a wallet from which the Master Private Key (mpk) in hex format and the number of used addresses is known.

Till now I could manage to convert the hex mpk to the wif format and import this to electrum. But here to history seems to be totally lost.

Is there any way to recover the full wallet and history (not neccessary with electrum)?

Michael

Posted 2018-05-24T13:26:38.287

Reputation: 111

are you sure it's the master private key and not the seed? the seed in hex is 32 characters. if it's the seed do a restore from seed and paste in the hex instead of the words.Abdussamad 2018-05-25T10:53:58.960

sorry for the late respnse. yes, I`m sure that the key is a mpk and not a seed in hex. It seems that the problem is based on compressed vs. uncompressed keys.Michael 2018-05-29T07:48:10.667

Answers

0

The problem is based on the generating method I used from the the Bitwasp library.

$key = PrivateKeyFactory::fromHex($hex, true);
$wif = $key->toWif();

Will return a WIF assuming the hex key was compressed. Restoring the history while importin in electrum failed.

$key = PrivateKeyFactory::fromHex($hex, false);
$wif = $key->toWif();

Will return a WIF from an uncompressed hex key an electrum was able to restore the history of the address.

Michael

Posted 2018-05-24T13:26:38.287

Reputation: 111

master private key doesn't lead to an address in the wallet on its own. you have to run it through hash functions and do ec math to generate child keys at various indices. that's what the type2 deterministic thing is all about. so it seems like you have a regular private key and not a master private key.Abdussamad 2018-05-29T11:57:02.340