Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: tehnate on April 16, 2018, 01:32:14 PM



Title: Help recovering wallet VIA privkey
Post by: tehnate on April 16, 2018, 01:32:14 PM
I know it's pittance but I have a few bucks in a wallet. I made the mistake of using Bitcoin Core as the wallet and not waiting for it to update before mining....  obviously I don't want to wait a year to withdraw the money.

I'm assuming I'm grabbing the wrong key from debug, otherwise clueless as to what the issue is. Took some screenshots, hoping for some help. The key, although blacked out, is the same gotten from dumpprivkey that's being rejected from Blockchain's website.

https://i.imgur.com/dwD0ELS.jpg
https://i.imgur.com/0SMJhsq.jpg
https://i.imgur.com/VLjTSn8.jpg

Thanks for any help or suggestions. Will try anything.


Title: Re: Help recovering wallet VIA privkey
Post by: starmyc on April 16, 2018, 01:52:59 PM
You should contact the blockchain.info customer service (https://support.blockchain.com/hc/en-us), or try another wallet that doesn't require to download the whole chain, like Electrum (https://electrum.org/#home).


Title: Re: Help recovering wallet VIA privkey
Post by: Xynerise on April 16, 2018, 03:38:42 PM
The address starts with "3" so it's a P2SH address (most likely P2PWKH wrapped in P2SH,  aka Segwit address)
Blockchain.info wallet does not support Segwit AFAIK.
You'll have to import the private key to another wallet that supports Segwit eg Electrum.


Title: Re: Help recovering wallet VIA privkey
Post by: hugeblack on April 16, 2018, 10:48:43 PM
You can convert your Segwit P2SH address (start with 3) into a legacy address.but this process is dangerous because you can not know that the address starting with 1 uses a compressed or uncompressed public key(also you sign using pvtkey) so it’s better to import it into a wallet that supports Segwit.
read more https://bitcoincore.org/en/segwit_wallet_dev/#creation-of-p2sh-p2wpkh-address (https://bitcoincore.org/en/segwit_wallet_dev/#creation-of-p2sh-p2wpkh-address)

1. Download electrum.org (http://electrum.org)
2. Follow https://support.btcprivate.org/403137-Bitcoin-Private-Electrum-Wallet---How-to-sweepimport-Private-Key

I recommend you to transfer your coins from blockchain/.info into electrum https://bitcoin.stackexchange.com/a/66614


Title: Re: Help recovering wallet VIA privkey
Post by: tehnate on April 17, 2018, 02:13:09 AM
You can convert your Segwit P2SH address (start with 3) into a legacy address.but this process is dangerous because you can not know that the address starting with 1 uses a compressed or uncompressed public key(also you sign using pvtkey) so it’s better to import it into a wallet that supports Segwit.
read more https://bitcoincore.org/en/segwit_wallet_dev/#creation-of-p2sh-p2wpkh-address (https://bitcoincore.org/en/segwit_wallet_dev/#creation-of-p2sh-p2wpkh-address)

1. Download electrum.org (http://electrum.org)
2. Follow https://support.btcprivate.org/403137-Bitcoin-Private-Electrum-Wallet---How-to-sweepimport-Private-Key

I recommend you to transfer your coins from blockchain/.info into electrum https://bitcoin.stackexchange.com/a/66614


Thanks. That taught me a few things NOT to do, but I'm stuck getting a "No Input" error. Took screenshots of the process and as you may notice, I can see the old wallet in Electrum as 'Watch Only' just as I could on Blockchain. Not sure if that means anything or anything can be done with that. Thanks again for any help.

https://i.imgur.com/KPRO8Yw.jpg
https://i.imgur.com/ghvYmFs.jpg
https://i.imgur.com/kVqFhb9.jpg

Coin is still going into this wallet because I'm that stupid so again, thanks for the help.


Title: Re: Help recovering wallet VIA privkey
Post by: Xynerise on April 17, 2018, 05:37:42 AM


Thanks. That taught me a few things NOT to do, but I'm stuck getting a "No Input" error. Took screenshots of the process and as you may notice, I can see the old wallet in Electrum as 'Watch Only' just as I could on Blockchain. Not sure if that means anything or anything can be done with that. Thanks again for any help.

https://i.imgur.com/KPRO8Yw.jpg
https://i.imgur.com/ghvYmFs.jpg
https://i.imgur.com/kVqFhb9.jpg

Coin is still going into this wallet because I'm that stupid so again, thanks for the help.
"No inputs" means that there are no (confirmed) UTXOs for that address, meaning there are no bitcoins there.
Are you sure that address has bitcoins?
Are you sure you're sweeping the right private key?


Title: Re: Help recovering wallet VIA privkey
Post by: HCP on April 17, 2018, 10:25:20 AM
Sadly, you can't import a SegWit private key in WIF format (starting with "K" or "L") into Electrum... as the "Import Bitcoin Address or Private Key" wallet creation option only generates "Legacy" wallets and will generate the "Legacy" address that starts with a "1". :-\

I believe this is why the "Sweep" option is also returning "No inputs"... it is only checking the "Legacy" address generated from your WIF key :-\

You'll need to either manually craft a transaction and broadcast it... or find another wallet that allows importing of SegWit private keys... or wait for Bitcoin Core to sync :P

EDIT: you could also try the "dumpwallet" command from Bitcoin Core and see if it gives you a "ypriv" Master Private Key in the output file... if it gives an "xpriv" Master Private Key, Electrum will still treat it as a "Legacy" wallet :-\