How to convert encrypted wallet.dat to decrypted? (Yes, I know the password)

5

1

I don't want to spend transaction fee for transferring coins to unencrypted wallet.dat.

What should I do?

R2D4

Posted 2015-01-05T06:49:52.677

Reputation: 53

Are you using the Bitcoin Core client, or something else?Nate Eldredge 2015-01-05T15:32:42.400

I use bitcoin-qt-0.8.5.ebuild and it's integrated console in debug windowR2D4 2015-01-06T07:26:55.580

Seems like there should be an easier way to do this than what Mark S proposed. Maybe it's on the core dev's to-do list.morsecoder 2015-01-08T20:43:40.100

Answers

3

The easiest way is to export your private keys using the dumpprivkey functionality.

DumpPrivKey: returns the wallet-import-format (WIP) private key corresponding to an address. (But does not remove it from the wallet.) Bitcoin Developer Reference

Do this for each address that is storing bitcoin (use listreceivedbyaddress to view all addresses with funds)

ListReceivedByAddress: lists the total number of bitcoins received by each address. Bitcoin Developer Reference

Then create a backup copy of your wallet.dat file and then remove it. The next time bitcoin-qt runs it will create a new empty unencrypted wallet. Now you can use importprivkey to restore your funds.

ImportPrivKey: adds a private key to your wallet. The key should be formatted in the wallet import format created by the dumpprivkey RPC. Bitcoin Developer Reference

Mark S.

Posted 2015-01-05T06:49:52.677

Reputation: 2 415

I don't understood, how to "Do dumpprivkey on each address that is storing coins"R2D4 2015-01-07T06:39:32.690

I edited my answer to include information about listreceivedbyaddress which will list all of your addresses that currently hold fundsMark S. 2015-01-08T00:13:45.127

It won't list change addresses, though, will it? Be careful you don't lose those, probably should make sure to keep that back up in case.morsecoder 2015-01-08T20:40:46.237

listreceivedbyaddress shows all received coins. But I need only unspent (remaining) coins. I found <b>listunspent</b> commandR2D4 2015-01-11T11:39:19.427

And before printing keys, the wallet should be unlocked with [b]walletpassphrase[/b] commandR2D4 2015-01-11T11:45:47.690

Wouldn't dumpwallet be faster? dumpwallet "filename" -- Dumps all wallet keys in a human-readable format.Sun 2019-03-08T05:45:54.457

-1

You can make a paper wallet from actual addresses, then delete wallet.dat, create new one and import paper wallets on created unencypted wallet.dat file.

But you must to remember about the "change address" mechanism because you can lose your bitcoins forever.

Xawery Wiśniowiecki

Posted 2015-01-05T06:49:52.677

Reputation: 709

1What do you mean by "rest mechanism?"Nick ODell 2015-01-05T15:57:11.843

This doesn't seem directly useful to the OP since bitcoin-qt doesn't provide the ability to either create or import paper wallets. Perhaps you should explain in detail how to achieve these steps.Nate Eldredge 2015-01-06T07:35:32.053

rest mechanism I mean "change address" mechanism - sorry I am not english native speakerXawery Wiśniowiecki 2015-01-07T09:06:40.630

1Nate - it is enought to have installed QR code software and use your brain a little bit (ctrl+c ctrl+v) to have this ability in bitcoin-qt also.Xawery Wiśniowiecki 2015-01-07T09:10:02.677