Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: The Ferox on July 27, 2014, 09:17:17 PM



Title: Importing a list of private keys
Post by: The Ferox on July 27, 2014, 09:17:17 PM
I found on another thread a reference to a RPC command "importwallet" although i can find no documentation about it anywhere so i am looking for a different approach.

How would a person import a list of private keys into Bitcoin QT through either debug window or Bitcoind? Not a single address but a long list of private keys.


Title: Re: Importing a list of private keys
Post by: bitsta on July 27, 2014, 10:37:57 PM
I found on another thread a reference to a RPC command "importwallet" although i can find no documentation about it anywhere so i am looking for a different approach.

How would a person import a list of private keys into Bitcoin QT through either debug window or Bitcoind? Not a single address but a long list of private keys.

write a script (python, perl, bash) and use a loop which executes the rpc-command "importprivkey" on every privatekey inside your list (list could be realized with loading an external file[containing the privkeys] into an array). if you need any support, let me know.

regards


Title: Re: Importing a list of private keys
Post by: The Ferox on July 27, 2014, 10:39:55 PM
I found on another thread a reference to a RPC command "importwallet" although i can find no documentation about it anywhere so i am looking for a different approach.

How would a person import a list of private keys into Bitcoin QT through either debug window or Bitcoind? Not a single address but a long list of private keys.

write a script (python, perl, bash) and use a loop which executes the rpc-command "importprivkey" on every privatekey inside your list. if you need any support, let me know.

regards


Bista that would be awesome, could you give me an example? like a .bat file or something with just a few spoofed keys that i could use as a template then i can just copy and paste the few hundred addresses i have left to import.


Title: Re: Importing a list of private keys
Post by: btchris on July 27, 2014, 10:58:02 PM
I found on another thread a reference to a RPC command "importwallet" although i can find no documentation about it anywhere so i am looking for a different approach.

How would a person import a list of private keys into Bitcoin QT through either debug window or Bitcoind? Not a single address but a long list of private keys.

Yeah it's not documented here (https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list) where most of the other RPC commands are, but I thought I had already mostly answered you in the original thread over here (https://bitcointalk.org/index.php?topic=712047.msg8051822#msg8051822). The only "official documentation" as far as I know is in the actual source code (https://github.com/bitcoin/bitcoin/blob/v0.9.2.1/src/rpcdump.cpp#L136).

Or of course you could use one of the better documented APIs as bitsta recommended.


Title: Re: Importing a list of private keys
Post by: gmaxwell on July 28, 2014, 04:04:03 AM
The documentation is the integrated online help. use the help rpc on any rpc.


Title: Re: Importing a list of private keys
Post by: btchris on July 28, 2014, 11:53:35 AM
The documentation is the integrated online help. use the help rpc on any rpc.

Yup, that's how I came across it. It's a very helpful addition. It's just that the import format has to be reversed engineered from the dumpwallet file / the source code if you want to build your own file.


Title: Re: Importing a list of private keys
Post by: gmaxwell on July 28, 2014, 02:34:39 PM
Yup, that's how I came across it. It's a very helpful addition. It's just that the import format has to be reversed engineered from the dumpwallet file / the source code if you want to build your own file.
Ah, didn't realize thats what the question was. It's the multibit format.


Title: Re: Importing a list of private keys
Post by: ethought on July 28, 2014, 07:30:13 PM
I found on another thread a reference to a RPC command "importwallet" although i can find no documentation about it anywhere so i am looking for a different approach.

How would a person import a list of private keys into Bitcoin QT through either debug window or Bitcoind? Not a single address but a long list of private keys.

I wrote a small script to restore altcoin wallets after a fork.

Essentially all it does is dump private keys and then import them in a new wallet.

https://github.com/ethought/PrivateKeyMover


Title: Re: Importing a list of private keys
Post by: Kprawn on July 29, 2014, 05:58:46 PM
Thanks, I can also use this. Just wondering, what is available to read and convert QR codes in Windows to text files?

Drop me a PM pls.  ;)