28

I've got one wallet.dat from my laptop and another on my desktop, each containing various (different) receiving addresses that I use pretty often. I'd like to merge them into a single wallet.dat so I can see all my balances in one place.

If there isn't some piece of software that can truly "merge" the two, is there some way to at least export an address/keypair from one wallet and then import it into the other?

  • This functionality is eventually planned for the main client, btw. But good question. – eMansipater Sep 2 '11 at 16:08
  • I chose D.H.'s answer over Stephen's only because a solution separate from the client, which can be run on a separate (offline) machine where I can be 100% sure nothing malicious is happening with my wallet.dat seems superior to patching my client, which by nature must manipulate my wallet.dat file and generate internet traffic. Also I speak Python so I can verify/tweak the code myself if necessary. Both are valid solutions, though and I wish I could check two answers. – David Perry Sep 2 '11 at 17:19
8

Pywallet is a python script that (among a number of other things) can export and import key pairs. It's not as complicated to use as it might sound, some python stuff has to be installed but that's almost automatic and once it is done the tasks can be performed using a web interface. From the linked forum post (updated 8/23/11):

Currently you can:

  • Dump your wallet, see your pubkeys, privkeys, their labels, etc
  • Dump your transactions to a json file
  • Import a key/address into your wallet, with a label, or as a reserve key
  • Import a transaction into your wallet
  • Import transactions from a json file
  • Delete addresses from your wallet
  • Delete transactions from your wallet
  • Get info about a privkey, i.e. see address, base58 privkey, hexprivkey, pubkey and hash160, using the network you want
  • Sign and verify string, files, and binary string
  • Read a device to find deleted keys (CLI only)
  • Print the balance of a bitcoin address, read from blockexplorer
  • 1
    Merging 2 wallets using Pywallet would require to dump one wallet and then import manually each private key? Sounds like a lot of work. – Jader Dias Sep 2 '11 at 23:39
  • 1
    Note that Pywallet does not work with encrypted wallets yet. – nmat Nov 7 '11 at 3:08
  • 1
    Pywallet does not run on Mac OS except with a lot of hacking to make this relatively small program work. I had issues installing macports and I don't want to go there again. I am so wondering why anyone should have to go through all this trouble. If wallet.dat were a text file, then none of this would be necessary. – shoeless joe Nov 13 '11 at 20:39
8

A patch for the bitcoin client for this: - http://github.com/bitcoin/bitcoin/pull/220

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.