Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: bluesmoke on August 28, 2018, 07:10:45 AM



Title: [Solved] dumpprivkey on Bitcoin-Qt, shows different addresses in Electrum
Post by: bluesmoke on August 28, 2018, 07:10:45 AM
It's been one week since I was trying to resolve this issue but never found a proper solution or what I have found simply didn't work with me. Perhaps I can't understand the exact mechanism due to the language barrier as I'm not native in English. So, today I am seeking help from the community.

Problem: Unable to use Bitcoin from Bitcoin-qt 16.2 because of synchronization issue.
More details: I sent some small amount of BTC in my Bitcoin-qt wallet which was never synced. The issue raised when I tried to use it.

Actual problem:
I have tried various method by Googling the issue like dumping private key. But the problem is when I import the private key in Electrum or other wallets it shows zero balance and different BTC address. Got confused here, tried again and again what's wrong with me, dumped the key again, still found safe error. Used https://bitaddress.org too to see wallet details but it shows what electrum shows.
Here I'm posting an example of my wallet with the dumped private key that has no fund. Copied from wallet but see yourself https://bitaddress.org showing different address also try importing it will show get different receiving address.

L49YrnZPvfptpaV6ad1pw55fTBz2gdJLSzgZjYrgSyLkCQaPdZer 2018-03-03T17:05:32Z reserve=1 # addr=3JP77cLUwuwY6Rw16CZZRmZ7eDHKHQQcZA hdkeypath=m/0'/0'/8'
Kxk4dYpsLghVeTBccCNsSb5iq9ULczFjCKB3kEhrWFKFeTY9dT5w 2018-03-03T17:05:32Z reserve=1 # addr=3KBtWR5zGsGWrPxfRx6HyG7CnpqssaftdA hdkeypath=m/0'/0'/37'

What can I do now?
What I want to do: Import those funds to any other wallet like Electrum.

Device I can use: Windows 7, 32bit, Android (Note: most desktop wallet doesn't support 32bit pc, for example, Electrum itself won't run in my PC)  


Edit: The issue has been solved with the first reply with easy solution. Thanks to that amazing community member.


Title: Re: dumpprivkey on Bitcoin-Qt, shows different addresses in Electrum, what can I do?
Post by: nc50lc on August 28, 2018, 07:30:17 AM
You must change the derivation path depending on the address type.
In your case, those are more likely p2wpkh-p2sh SegWit Addresses.
However, by restoring using only the private keys, you will need to tell the client to restore the SegWit addresses from those prv keys .

Try this:
Restore them using Electrum by adding "p2wpkh-p2sh:" in front each of the private keys, like this:
Code:
p2wpkh-p2sh:L49YrnZPvfptpaV6ad1pw55fTBz2gdJLSzgZjYrgSyLkCQaPdZer
p2wpkh-p2sh:Kxk4dYpsLghVeTBccCNsSb5iq9ULczFjCKB3kEhrWFKFeTY9dT5w

then hit next, next.

-Edit-
I've tried and the correct addresses: 3JP77cLUwuwY6Rw16CZZRmZ7eDHKHQQcZA & 3KBtWR5zGsGWrPxfRx6HyG7CnpqssaftdA were restored.


Title: Re: dumpprivkey on Bitcoin-Qt, shows different addresses in Electrum, what can I do?
Post by: bluesmoke on August 28, 2018, 03:22:36 PM
You must change the derivation path depending on the address type.
In your case, those are more likely p2wpkh-p2sh SegWit Addresses.
However, by restoring using only the private keys, you will need to tell the client to restore the SegWit addresses from those prv keys .

Try this:
Restore them using Electrum by adding "p2wpkh-p2sh:" in front each of the private keys, like this:
Code:
p2wpkh-p2sh:L49YrnZPvfptpaV6ad1pw55fTBz2gdJLSzgZjYrgSyLkCQaPdZer
p2wpkh-p2sh:Kxk4dYpsLghVeTBccCNsSb5iq9ULczFjCKB3kEhrWFKFeTY9dT5w

then hit next, next.

-Edit-
I've tried and the correct addresses: 3JP77cLUwuwY6Rw16CZZRmZ7eDHKHQQcZA & 3KBtWR5zGsGWrPxfRx6HyG7CnpqssaftdA were restored.

Impressive! This really works, it was so easy that I never thought. Thank you so much.