Pages:
Author

Topic: Bitcoin Client Redeam private key? (Read 4497 times)

member
Activity: 93
Merit: 10
September 14, 2012, 08:20:43 AM
#28
Blockchain.info has a desktop sync. Is it possible to just do a desktop sync with Blockchain.info and then uninstall the client, thereby migrating from the Satoshi client to Blockchain.info and not needing to install the client again?
legendary
Activity: 1022
Merit: 1000
September 13, 2012, 06:38:53 PM
#27
I know, I know, I did this already Wink

But I still would like to know how to go without 3rd party services like blockchain.info or mtgox,..
Just with the bare bones the satoshi client.

Well, basically it's just what we mentioned here Wink
In your specific case, you need to add more parameters to the commands because you don't have the client data and blockchain in the usual places.
This means it becomes a bit of a mess to have the config file and the command line parameters all synced to work coherently...

Alright, alright I give up already! I just hope they will fix that in the versions of the Satoshi client still to come. At least by version 1.0 they should have implemented a no sweat easy-as-shit way to import private keys. Just let the user enter the damn priv. key from the GUI and BAM! Thats it. No tinkering with any frigging command lines necessary anymore!

(can you tell I just watched another episode of the Angry Video Game Nerd?)

Thx for your patience anyway
sr. member
Activity: 306
Merit: 250
Donations: http://tny.im/nx
September 13, 2012, 05:16:23 PM
#26
I know, I know, I did this already Wink

But I still would like to know how to go without 3rd party services like blockchain.info or mtgox,..
Just with the bare bones the satoshi client.

Well, basically it's just what we mentioned here Wink
In your specific case, you need to add more parameters to the commands because you don't have the client data and blockchain in the usual places.
This means it becomes a bit of a mess to have the config file and the command line parameters all synced to work coherently...
legendary
Activity: 1022
Merit: 1000
September 13, 2012, 04:41:26 PM
#25
I know, I know, I did this already Wink

But I still would like to know how to go without 3rd party services like blockchain.info or mtgox,..
Just with the bare bones the satoshi client.
sr. member
Activity: 306
Merit: 250
Donations: http://tny.im/nx
September 13, 2012, 04:23:52 PM
#24
In the command line parameters you pass to bitcoind, you should also be telling it to look for data in your custom directory... so that it doesn't think it hasn't downloaded the blockchain.

I agree this is a big, big hassle. You could create a blockchain.info wallet, redeem the key there and then send the funds to another address you control, on the Bitcoin.org client. This should be much simpler compared to all the things you had to do already, and you still didn't get it working.
At blockchain.info, the option for importing a key inside a wallet is at Import/Export (click Continue then) -> "Import Private Key". It's really easy.
legendary
Activity: 1022
Merit: 1000
September 13, 2012, 04:12:39 PM
#23
Then create one, on D:\Programme\Bitcoin\Blockchain (because that's the datadir you specified, and I think the client expects to see the conf file there). On that folder, right click and then select New -> Text document. Then name that file bitcoin.conf without the .txt at the end. Now open the file with Notepad and add the settings to it... I agree it's a bit troublesome for non-tech-savvy users.

Ok, I did just that, created the bitcoin.conf file like you described, saved it in D:\Programme\Bitcoin\Blockchain first, didnt work, saved it in C:\Users\Sgt.Banana\AppData\Roaming\Bitcoin like the client expects it by default, then..
nothing.

Ok actually it did something, so that the command line locked up and I could see the blockchain download all over again in C:\Users\Sgt.Banana\AppData\Roaming\Bitcoin the directory I tried to divert the heavy 3GB blockchain from!

So this seems not to work, unless I remodel the partition size of my harddrive, which I wont do.

Is there something else we can do to make this work? Thx for your help so far.
sr. member
Activity: 306
Merit: 250
Donations: http://tny.im/nx
September 13, 2012, 03:07:49 PM
#22
Then create one, on D:\Programme\Bitcoin\Blockchain (because that's the datadir you specified, and I think the client expects to see the conf file there). On that folder, right click and then select New -> Text document. Then name that file bitcoin.conf without the .txt at the end. Now open the file with Notepad and add the settings to it... I agree it's a bit troublesome for non-tech-savvy users.
legendary
Activity: 1022
Merit: 1000
September 13, 2012, 03:01:13 PM
#21
You should really edit your bitcoin.conf and add the settings it said.
It is either in D:\Programme\Bitcoin\Blockchain or C:\Users\Sgt.Banana\AppData\Roaming\Bitcoin\bitcoin.conf

It's not that hard, just open the file with Notepad and add the rpcuser and rpcpassword settings.

For providing the settings through the command line, I have no idea (I thought it would work like BkkCoin said).

There is no file called "bitcoin.conf" in either of the two directories
sr. member
Activity: 306
Merit: 250
Donations: http://tny.im/nx
September 13, 2012, 02:43:45 PM
#20
You should really edit your bitcoin.conf and add the settings it said.
It is either in D:\Programme\Bitcoin\Blockchain or C:\Users\Sgt.Banana\AppData\Roaming\Bitcoin\bitcoin.conf

It's not that hard, just open the file with Notepad and add the rpcuser and rpcpassword settings.

For providing the settings through the command line, I have no idea (I thought it would work like BkkCoin said).
legendary
Activity: 1022
Merit: 1000
September 13, 2012, 02:15:12 PM
#19
It doesn't look like the command line is changing to the directory, as the part before the > keeps being the path to your home directory.
Since you need to change to another drive, try doing the following instead:
Code:
D:
(yes, just type D followed by : and press enter)
and then
Code:
cd Programme\Bitcoin\daemon

By now the last line of the command line should read "D:\Programme\Bitcoin\daemon>".
Now type the bitcoind commands with .\ at the beginning like you were doing.

Ok, thx I entered:

Code:
D:
Wink

and it changed to the correct path instantly. Next thing I entered was:

Code:
D:\Programme\Bitcoin\daemon>.\bitcoind -daemon -rpc-user=Borg -rpc-password=Borg

Error: To use the "-daemon" option, you must set a rpcpassword in the configurat
ion file:
 C:\Users\Sgt.Banana\AppData\Roaming\Bitcoin\bitcoin.conf
It is recommended you use the following random password:
rpcuser=bitcoinrpc
rpcpassword=DTX3ZCFaKjzcHDxtuRuFYcLVeUUXBL7oHh7LkXjfqNFh
(you do not need to remember this password)
If the file does not exist, create it with owner-readable-only file permissions.

Maybe I should mention, that I changed the blockchain file to a new destination folder, because the default path (C:\Users\Sgt.Banana\AppData\Roaming\Bitcoin\bitcoin.conf) clogs up my partition C: .

I accomplished that by creating a shortcut of bitcoin-qt.exe and wrote in its properties in the field "Destination":

Code:
D:\Programme\Bitcoin\bitcoin-qt.exe -datadir=D:\Programme\Bitcoin\Blockchain
you can imagine how long it took me to figure that out;)

So now the blockchain is saved in D:\Programme\Bitcoin\Blockchain.

Is it still possible to import a private key though?


sr. member
Activity: 306
Merit: 250
Donations: http://tny.im/nx
September 13, 2012, 01:58:04 PM
#18
It doesn't look like the command line is changing to the directory, as the part before the > keeps being the path to your home directory.
Since you need to change to another drive, try doing the following instead:
Code:
D:
(yes, just type D followed by : and press enter)
and then
Code:
cd Programme\Bitcoin\daemon

By now the last line of the command line should read "D:\Programme\Bitcoin\daemon>".
Now type the bitcoind commands with .\ at the beginning like you were doing.
legendary
Activity: 1022
Merit: 1000
September 13, 2012, 01:41:24 PM
#17
cd to the daemon directory like Pieter Wuille said.
You're on Windows, so instead of ./ you should use backwards slashes instead: .\
You shouldn't be writing the $ as that is the end of the command line of Unix systems (> on Windows).

Anyway, try typing the bitcoind commands starting with .\ after changing directory to the Bitcoin directory. Like this:
Code:
cd D:\Programme\Bitcoin\daemon
.\bitcoind -daemon -rpc-user=Borg -rpc-password=Borg
.\bitcoind walletpassphrase 300
.\bitcoind importprivkey
...and so on.

Hmm, I think we are getting there. But cmd.exe seems not to recognize the new commands yet:

Code:
C:\Users\Sgt.Banana>.\bitcoind -daemon -rpc-user=Borg -rpc-password=Borg
Der Befehl ".\bitcoind" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.

Translation:
Code:
C:\Users\Sgt.Banana>.\bitcoind -daemon -rpc-user=Borg -rpc-password=Borg
The command ".\bitcoind" is either misspelled or couldnt be retrieved.
sr. member
Activity: 306
Merit: 250
Donations: http://tny.im/nx
September 13, 2012, 01:27:00 PM
#16
cd to the daemon directory like Pieter Wuille said.
You're on Windows, so instead of ./ you should use backwards slashes instead: .\
You shouldn't be writing the $ as that is the end of the command line of Unix systems (> on Windows).

Anyway, try typing the bitcoind commands starting with .\ after changing directory to the Bitcoin directory. Like this:
Code:
cd D:\Programme\Bitcoin\daemon
.\bitcoind -daemon -rpc-user=Borg -rpc-password=Borg
.\bitcoind walletpassphrase 300
.\bitcoind importprivkey
...and so on.
legendary
Activity: 1072
Merit: 1181
September 13, 2012, 01:21:13 PM
#15
The bitcoind executable is in the daemon directory. cd there first.
legendary
Activity: 1022
Merit: 1000
September 13, 2012, 01:13:32 PM
#14
but please understand that I am a complete !N00b! indeed. I have no idea what to make of the commands given above.
I guess that I have to goto "Start" (im using windows 7), click "Run.." enter "cmd.exe", click "OK" and then enter the commands from above followed by hitting the "Enter" key after each line. The only thing is it doesnt work. It says something like "the command is either misspelled or couldnt be retrieved" in the console.
Yes. You have the right idea. But what's likely happened is that bitcoind is not in the path and cannot be found. So you will need to change to the correct directory before you run it. I'm not on Windows any more so I'm not sure where it gets installed. But lets say that it is in the directory,

C:\Program Files\Bitcoin

then before running you would need to type,

cd "\Program Files\Bitcoin"

and then type the commands above (yes, with Enter after each one). The command line server wasn't really designed to be easy for new users but flexible for advanced ones.

Hmm, stil doesnt work. My install directory is in:
D:\Programme\Bitcoin

thats where the "bitcoin-qt.exe" together with the folders "daemon" and "src".

So I opened the cmd.exe and typed in:

Code:
cd D:\Programme\Bitcoin
hit enter

then nothing happens and a new line for me to enter anything appears right below. I also tried all other possible commands mentioned in this thread- without success. Have a look:


* "Der Befehl '...' ist entweder falsch geschrieben oder konnte nicht gefunden werden." is German and translates to: "The command is either misspelled or couldnt be retrieved."
full member
Activity: 213
Merit: 100
August 16, 2012, 08:35:08 PM
#13
Hey AdamstgBit, please check out my program which I feel can help you: https://bitcointalksearch.org/topic/add-new-address-private-key-easily-101161
hero member
Activity: 784
Merit: 1009
firstbits:1MinerQ
August 16, 2012, 06:53:52 PM
#12
but please understand that I am a complete !N00b! indeed. I have no idea what to make of the commands given above.
I guess that I have to goto "Start" (im using windows 7), click "Run.." enter "cmd.exe", click "OK" and then enter the commands from above followed by hitting the "Enter" key after each line. The only thing is it doesnt work. It says something like "the command is either misspelled or couldnt be retrieved" in the console.
Yes. You have the right idea. But what's likely happened is that bitcoind is not in the path and cannot be found. So you will need to change to the correct directory before you run it. I'm not on Windows any more so I'm not sure where it gets installed. But lets say that it is in the directory,

C:\Program Files\Bitcoin

then before running you would need to type,

cd "\Program Files\Bitcoin"

and then type the commands above (yes, with Enter after each one). The command line server wasn't really designed to be easy for new users but flexible for advanced ones.
hero member
Activity: 868
Merit: 1002
August 16, 2012, 02:16:03 PM
#11
Thanks for the instructions, guys. The website mentioned in the earlier post doesn't seem to work any more. Does anyone know if moved? I would definitely like to repost a client comparison for people.
legendary
Activity: 1022
Merit: 1000
August 16, 2012, 02:11:16 PM
#10
Thx for your replies guys,

but please understand that I am a complete !N00b! indeed. I have no idea what to make of the commands given above.
I guess that I have to goto "Start" (im using windows 7), click "Run.." enter "cmd.exe", click "OK" and then enter the commands from above followed by hitting the "Enter" key after each line. The only thing is it doesnt work. It says something like "the command is either misspelled or couldnt be retrieved" in the console.

So what do I need to do (in REAAAALY simple terms pls;)

Thx
hero member
Activity: 784
Merit: 1009
firstbits:1MinerQ
August 14, 2012, 02:57:44 AM
#9
I've done it this way without using a bitcoin.conf file just to test as I think it's the easiest non-tech step-by-step way. Everything below I just checked myself with version 6.3 to ensure it's not wrong. Using this way you only start the server and send it commands. The Gui client must not be running.

Open a terminal / command prompt and type these commands:

bitcoind -daemon -rpc-user=Borg -rpc-password=Borg
(This may take some time to start and be ready as it loads the blockchain)
(If you get messages for the next commands saying "cannot connect to server" then just wait)
(user and pwd are just arbitrary)

(If your wallet is encrypted you need this next command. 300 means unlock for 300 seconds.)
(For this command you will type/paste in your passphrase to unlock the wallet.)
bitcoind walletpassphrase 300

(For this command paste in your . Really, don't try typing it in.)
(This command also takes a long time usually)
bitcoind importprivkey

(If you gave a label above (optional) then you can quickly check it's there with this command)
bitcoind listaccounts

(Now shut down the server)
bitcoind stop

You can close the terminal and start your Gui client as usual and the key should be there.

I think the importprivkey does a rescan anyway so no need to do that, especially if you have never used the key/address yet. Well, I hope so since importprivkey takes so very long!




Pages:
Jump to: