Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Cheap Ass on January 29, 2016, 12:18:19 AM



Title: Importing multiple Private keys.
Post by: Cheap Ass on January 29, 2016, 12:18:19 AM
Hi, does anyone know which wallet/client allows multiple private keys to be imported at once?

Not like blockchain.info which imports 1 by 1.

Also tried electrum client as you can paste multiple keys at once, but it always says my private keys are invalid, anyone know a solution to that?

here are a couple of private keys which electrum states are invalid but blockchain imports without a problem.

5J7cVicrWJP2wZ1Sp2eqFJmWpCh1wEG5XEQmqSh89bEBzV7iExd
5Hx6zbgjtC6ouqi96YkQEB4ojp8Xg3JakaBEXna5Z2ymHM5aGdh
5KS1wBgCUhvW6Cr2kxu1dgnszHfNzGdfKzCaVDndaFLWbvKzQYU

So any tips/advice?

thanks!


Title: Re: Importing multiple Private keys.
Post by: calkob on January 29, 2016, 12:21:35 AM
I do hope you have no bitcoin at them addresses........ if you do there probably gone already  :o


Title: Re: Importing multiple Private keys.
Post by: Cheap Ass on January 29, 2016, 12:24:05 AM
I do hope you have no bitcoin at them addresses........ if you do there probably gone already  :o

No ofcourse not  ;D as I said they have already been imported with blockchain but was just asking people to check if they could import the given keys with electrum as I keep getting an error message.


Title: Re: Importing multiple Private keys.
Post by: achow101 on January 29, 2016, 12:29:24 AM
I do hope you have no bitcoin at them addresses........ if you do there probably gone already  :o

No ofcourse not  ;D as I said they have already been imported with blockchain but was just asking people to check if they could import the given keys with electrum as I keep getting an error message.
Works fine for me. How are you importing them? I made a new wallet from those imported keys.


Title: Re: Importing multiple Private keys.
Post by: Cheap Ass on January 29, 2016, 12:30:50 AM
I do hope you have no bitcoin at them addresses........ if you do there probably gone already  :o

No ofcourse not  ;D as I said they have already been imported with blockchain but was just asking people to check if they could import the given keys with electrum as I keep getting an error message.
Works fine for me. How are you importing them? I made a new wallet from those imported keys.

Are you using electrum?


Title: Re: Importing multiple Private keys.
Post by: achow101 on January 29, 2016, 12:45:53 AM
I do hope you have no bitcoin at them addresses........ if you do there probably gone already  :o

No ofcourse not  ;D as I said they have already been imported with blockchain but was just asking people to check if they could import the given keys with electrum as I keep getting an error message.
Works fine for me. How are you importing them? I made a new wallet from those imported keys.

Are you using electrum?
Yes.


Title: Re: Importing multiple Private keys.
Post by: Cheap Ass on January 29, 2016, 12:51:06 AM
I do hope you have no bitcoin at them addresses........ if you do there probably gone already  :o

No ofcourse not  ;D as I said they have already been imported with blockchain but was just asking people to check if they could import the given keys with electrum as I keep getting an error message.
Works fine for me. How are you importing them? I made a new wallet from those imported keys.

Are you using electrum?
Yes.

so I just go wallet- private keys - import and I add the keys but it gives me an error message saying they can't be added.
So I thought ok must be a wrong key, but then blockchain can import it.
So strange..
Any other clients you know that support bulk importing perhaps?


Title: Re: Importing multiple Private keys.
Post by: deepceleron on January 29, 2016, 12:54:42 AM
The original Bitcoin Core client can bulk import from a text file, if that text file is actually a batch file with RPC commands:

Code:
"C:\Program Files\Bitcoin\daemon\bitcoin-cli.exe" importprivkey L4mP3joYEhSv1ofdsWbz8xEmqCmYK9vGyi8mJmWWbh79Xx2NsS1M importedaddress1 false
"C:\Program Files\Bitcoin\daemon\bitcoin-cli.exe" importprivkey Ky2EGjWLhfKv1sWnPcuN4SHF2iALj6SfK7hoLWKx5T4zMqXg7aT9 importedaddress2 false
"C:\Program Files\Bitcoin\daemon\bitcoin-cli.exe" importprivkey KzrZ4DULdVWFqpF48pdJicFJfX5dqrhxBkqDnT4HRkCswdFy3Eo4 importedaddress3 false
"C:\Program Files\Bitcoin\daemon\bitcoin-cli.exe" importprivkey L2ELWXewr1PQnMwFDpfobHFqspyM6g1noM4uzkCMgoSZTSf3sQJF importedaddress4 true

With some text editing you can make your list of privkeys into such a list of commands, and save it as import.cmd and run (notice the last line has "true" at the end to start reindexing).


Title: Re: Importing multiple Private keys.
Post by: Cheap Ass on January 29, 2016, 01:02:20 AM
The original Bitcoin Core client can bulk import from a text file, if that text file is actually a batch file with RPC commands:

Code:
"C:\Program Files\Bitcoin\daemon\bitcoin-cli.exe" importprivkey L4mP3joYEhSv1ofdsWbz8xEmqCmYK9vGyi8mJmWWbh79Xx2NsS1M importedaddress1 false
"C:\Program Files\Bitcoin\daemon\bitcoin-cli.exe" importprivkey Ky2EGjWLhfKv1sWnPcuN4SHF2iALj6SfK7hoLWKx5T4zMqXg7aT9 importedaddress2 false
"C:\Program Files\Bitcoin\daemon\bitcoin-cli.exe" importprivkey KzrZ4DULdVWFqpF48pdJicFJfX5dqrhxBkqDnT4HRkCswdFy3Eo4 importedaddress3 false
"C:\Program Files\Bitcoin\daemon\bitcoin-cli.exe" importprivkey L2ELWXewr1PQnMwFDpfobHFqspyM6g1noM4uzkCMgoSZTSf3sQJF importedaddress4 true

With some text editing you can make your list of privkeys into such a list of commands, and save it as import.cmd and run (notice the last line has "true" at the end to start reindexing).

Oh that sounds useful aswell, might try it!

Thanks a lot deepceleron!


Title: Re: Importing multiple Private keys.
Post by: -XXIII- on January 29, 2016, 01:29:39 AM
Where are you copying these keys from? It could be the application you copied from is representing newlines with incompatible control characters? Try pasting the keys into a different text editor and enable "Show Line Endings", or something to that effect. Windows typically feeds newlines as CRLF (Carriage Return, Line Feed), Linux is usually just LF.