Title: SOSHow to restore BitcoinCore wallet with passphrase+public address+private key? Post by: maxacure on January 07, 2022, 01:30:24 AM Bitcoin Client Software and Version Number: Bitcoin Core V.20.1
Operating System: Windows 7 Description of Problem: I installed Bitcoin Core V0.20.1 wallet in my laptop earlier, and created an address and received some btc to it. After that i saved a paper copy of the public address and its private key. I also encrypted the wallet and i saved the wallet passphrase on paper also. (This laptop has been blocked from internet since then and i have checked via blockchain.com that the btc is still in that address currently.) Now i need to transfer the btc out from that address to somewhere else. I tried to launch the Bitcoin Core wallet, but seems the legacy wallet.dat file is missed( maybe i did something nasty). Tried re-install the BitCoin Core wallet, but i just cannot get the legacy wallet back.. So , with the Public Address/Private Key/ Wallet Passphrase all available, is there a way i can get the wallet back, so that i can transfer the btc inside the address to a new address somewhere else? Help appreciated! PS: tried cmd : importprivkey <my private key> in the new wallet, it returns error: Invalid private key encoding (code -5) Title: Re: SOSHow to restore BitcoinCore wallet with passphrase+public address+private key? Post by: nc50lc on January 07, 2022, 03:45:32 AM The script type isn't important when recovering funds in Bitcoin core because it can look for all types when scanning for balance.
So if you've successfully imported the private key, it should be able to restore the previous balance once Bitcoin Core finished the rescan. PS: tried cmd : importprivkey <my private key> in the new wallet, it returns error: Invalid private key encoding (code -5) You shouldn't include the <> in "<my private key>";but if you typed it correctly, then you've included invalid characters to your private key. It should start with K or L consisting of 52 characters. example command: Code: importprivkey KxQ1ibqgPztpugBjWBuUrBp1TwbuJnzrNHTzhDrRVyzWScMZBmUp Question: is your Bitcoin Core fully synced to the network after the reinstall? Have you disabled "prune" settings? Title: Re: SOSHow to restore BitcoinCore wallet with passphrase+public address+private key? Post by: maxacure on January 07, 2022, 04:39:57 AM The script type isn't important when recovering funds in Bitcoin core because it can look for all types when scanning for balance. So if you've successfully imported the private key, it should be able to restore the previous balance once Bitcoin Core finished the rescan. PS: tried cmd : importprivkey <my private key> in the new wallet, it returns error: Invalid private key encoding (code -5) You shouldn't include the <> in "<my private key>";but if you typed it correctly, then you've included invalid characters to your private key. It should start with K or L consisting of 52 characters. example command: Code: importprivkey KxQ1ibqgPztpugBjWBuUrBp1TwbuJnzrNHTzhDrRVyzWScMZBmUp Question: is your Bitcoin Core fully synced to the network after the reinstall? Have you disabled "prune" settings? Thanks for the help..! This is exactly what i provided in the Console window for privkey importing: Code: importprivkey Lx......X the thing is, i use this laptop as a COLD wallet, so there is no internet connected to it, and hence it is not synced with the "chain" at all. I have no plan to get it connected to internet to sync up, to keep it COLD(that means, absolutely SAFE). I have a separate laptop with internet connected , and i also have a portable hard driver. I was following some guidance via google to send out the btc. The guidance says : 0)both laptops should have bitcoin core wallet installed; 1)use the laptop with internet to sync up the main chain and save all the blockchain data(size is ~380 GB) into the portable hard driver; 2) connect the hard driver to the laptop w/o internet, where i can trigger the "sending" operation with a "request message", 3)then copy the "request message" to the hard driver, and then connect the hard driver back to the laptop with internet, to finish signing the request. In this way , the signature is fulfilled "offline". ---> it is kinda confusing when i try out the solution and no luck so far... "Have you disabled "prune" settings?"-->No idea what is that. what is "prune" for? All in all, my goal is to transfer the btc in the legacy address to a hardware wallet. I am open to any solution that is better way to fulfill that, in a safe way. Thanks again!! Title: Re: SOSHow to restore BitcoinCore wallet with passphrase+public address+private key? Post by: nc50lc on January 07, 2022, 05:32:10 AM -snip- This is concerning since the error indicates that there's an issue with the provided private key.Thanks for the help..! This is exactly what i provided in the Console window for privkey importing: Code: importprivkey Lx......X My suggestion below will only work if your private keys is valid. All in all, my goal is to transfer the btc in the legacy address to a hardware wallet. I am open to any solution that is better way to fulfill that, in a safe way. You can set-up a cold-storage Electrum to fulfill that, create an imported Electrum in your Cold-storage PC and create a watch-only imported Electrum to the online PC.Here are the simple steps:
Title: Re: SOSHow to restore BitcoinCore wallet with passphrase+public address+private key? Post by: PawGo on January 07, 2022, 07:58:38 AM Thanks for the help..! This is exactly what i provided in the Console window for privkey importing: Code: importprivkey Lx......X Is it possible that you made a mistake when you were writing the key? Maybe one or more characters are wrong. You may go to website: https://iancoleman.io/bitcoin-key-compression/ or if you prefer, download it's source https://github.com/iancoleman/keycompression, disable internet connection and launch file "standalone.html". Then copy your key into "Input Key" field and see if it is correctly decoded - to the address you expect. If something is wrong and luckily only 1 or 2 characters are misspelled: You may use my program WifSolver (https://github.com/PawelGorny/WifSolver) - there is worker 'ROTATE' which should find the correct WIF. Title: Re: SOSHow to restore BitcoinCore wallet with passphrase+public address+private key? Post by: BitMaxz on January 07, 2022, 11:06:40 AM Can you try to check the Bitcoin data folder and maybe you created two wallet.dat with different names.
The default can be found here C:\Users\YourUserName\Appdata\Roaming\Bitcoin or open run and type this %APPDATA%\Bitcoin Then look for the wallet folder to check if there are other files or make a screenshot of that folder. Let see if you created other wallets with another name. If I'm right you can open it again with Bitcoin core to find the exact wallet. This error "Invalid private key encoding (code -5)" usually popups if the private key has a missing character or has a compatibility issue but since you dump the private key on the same version maybe you copied the private key with a missing character. It's just my guess. Title: Re: SOSHow to restore BitcoinCore wallet with passphrase+public address+private key? Post by: maxacure on January 08, 2022, 11:46:29 PM Can you try to check the Bitcoin data folder and maybe you created two wallet.dat with different names. The default can be found here C:\Users\YourUserName\Appdata\Roaming\Bitcoin or open run and type this %APPDATA%\Bitcoin Then look for the wallet folder to check if there are other files or make a screenshot of that folder. Let see if you created other wallets with another name. If I'm right you can open it again with Bitcoin core to find the exact wallet. This error "Invalid private key encoding (code -5)" usually popups if the private key has a missing character or has a compatibility issue but since you dump the private key on the same version maybe you copied the private key with a missing character. It's just my guess. "maybe you created two wallet.dat with different names. "---> i am not sure what it means. What i did is: I did created a wallet in the default path earlier last year. Now i deleted the wallet.dat(with a backup file created), and i changed the Bitcoin Core path of datadir to be my portable hard driver, and then restarted the bitcoin Core.. Then i see in the portable Hard driver a new wallet.dat file in the wallet folder. I am pretty sure my priv key is correct, as i did copy it 3 times on 3 different papers, and they are all the same. How can i fix all these mess? Thanks again! PS: my wallet was pruned with NO blockchain data synced up at all. Title: Re: SOSHow to restore BitcoinCore wallet with passphrase+public address+private key? Post by: nc50lc on January 09, 2022, 02:32:30 AM -snip- If that's the case, then the error must be a mistook character (eg.: letter case).I am pretty sure my priv key is correct, as i did copy it 3 times on 3 different papers, and they are all the same. There's no way Bitcoin Core will return with that error if the WIF private key is correct. It's quite easy to check for the wrong character since the WIF private key should only have BASE58 characters which shouldn't contain any I, l (lowercase L), O (uppercase o) or 0 (zero). See if it has any of those characters and replace them with the similar character from the list below. It should only have: https://en.bitcoin.it/wiki/Base58Check_encoding#Base58_symbol_chart (https://en.bitcoin.it/wiki/Base58Check_encoding#Base58_symbol_chart) (strictly case sensitive) |