I've noticed that a few people using the crypto-currency, Bitcoin are having issues importing private keys to their Bitcoin wallet. This is easy to do and doesn't require anything other than your Bitcoin client/daemon (as of ver0.6.0 ) and the command line.
The first thing we need to do is make sure that a bitcoin.conf file is present so that the daemon can connect using the RPC connection...
- Open My Computer
- Navigate to your C: drive
- Open the Users folder and open the folder with your username
- Open the folder named AppData
(If there is no AppData directory, right-click the empty space in the directory of your username, click Properties and tick the Attributes box titled Hidden)
- Open the Roaming folder and navigate to the Bitcoin folder
You may, or may not see a bitcoin.conf configuration file in this folder so if not, here is a link to a template config file: bitcoin.conf template
Save the sample text as bitcoin.conf (Save As Type: All Files)
- Open the bitcoin.conf file with notepad
- Un-comment (remove the #) the server=1 line
- Un-comment the rpcuser=... line
- Un-comment the rpcpassword=... line
Type in a username and password on the lines you just un-commented. Save and exit the file.
Now that we have the config file ready it's time to get to the Bitcoin daemon using the command line (cmd.exe)...
- Open up command line (Run: cmd.exe or Search: cmd)
We need to change to the directory of the Bitcoin daemon so we'll cd to the folder which contains the bitcoind command...
- Type - cd C:\Program Files (x86)\Bitcoin\daemon
- Press Enter
You should now be in your Bitcoin daemon directory providing this is where your Bitcoin daemon is installed. (If you're on a 32-bit system, remove the (x86)).
It's finally time to import your private key so that your Bitcoin client will be updated with the associated wallet address...
In the daemon directory using command line:
- Type - bitcoind -rpcuser=<yourusername> -rpcpassword=<yourpass> importprivkey <yourprivatekey>
(Note: You don't type the "<>" characters)
- Press Enter and if all has gone well, it should now start processing the private key.
The process can take a little while but you will know when it is done as the command line will return to the daemon directory and allow another command to be processed. Also, the associated wallet address will appear in your Bitcoin client.
(Always keep your private keys secret - It's the key to your wallet!)
It’s Black Friday week in the Gadget Hacks shop! Huge sales on Bluetooth speakers, phone mounts, online courses, and more. The biggest discounts are on online classes, and we’ve hand-picked our 10 favorites for you. Check them out!