user18135: I know about pywallet, about this modification for bitcoind, but what is a simple way to merge two wallets, or export a list of private keys and addresses of all of wallets from litecoin, dogecoin, bitcoin, quark, et cetera?
Thank you!

user53: Latest versions of the reference Bitcoin implementation have the 'dumpwallet' RPC command, which dumps a human-readable list of all of your private keys.
The format is simple: just comment-lines (starting with #) or lines that are the private key (plus metadata about the key). So to combine keys from several wallets you would:

Re-run bitcoind/Bitcoin-Qt, giving the -wallet=/path/to/wallet option
dumpwallet the private keys to a file (walletpassphrase first if the wallet has a passphrase)
Shutdown
concatenate the files together
Re-run and importwallet the combined file

The last step will take a while as the blockchain is scanned for transactions to/from the imported private keys (concatenating several wallet keys together in step 3 saves time over repeatedly dumping/importing).
A php or python or bash script that did all of the starting/stopping/concatenating either using the JSON/RPC interface or bitcoin-cli would be spiffy. Extra credit if it noticed which wallets were locked and prompted for passphrases....

18135: <p>I know about pywallet, about this <a href="https://github.com/bitcoin/bitcoin/pull/220" rel="nofollow">modification</a> for bitcoind, but what is a simple way to merge two wallets, or export a list of private keys and addresses of all of wallets from litecoin, dogecoin, bitcoin, quark, et cetera?</p>

<p>Thank you!</p>
 53: <p>Latest versions of the reference Bitcoin implementation have the 'dumpwallet' RPC command, which dumps a human-readable list of all of your private keys.</p>

<p>The format is simple: just comment-lines (starting with #) or lines that are the private key (plus metadata about the key). So to combine keys from several wallets you would:</p>

<ol>
<li>Re-run bitcoind/Bitcoin-Qt, giving the -wallet=/path/to/wallet option</li>
<li>dumpwallet the private keys to a file (walletpassphrase first if the wallet has a passphrase)</li>
<li>Shutdown</li>
<li>concatenate the files together</li>
<li>Re-run and importwallet the combined file</li>
</ol>

<p>The last step will take a while as the blockchain is scanned for transactions to/from the imported private keys (concatenating several wallet keys together in step 3 saves time over repeatedly dumping/importing).</p>

<p>A php or python or bash script that did all of the starting/stopping/concatenating either using the JSON/RPC interface or bitcoin-cli would be spiffy. Extra credit if it noticed which wallets were locked and prompted for passphrases....</p>
