Importprivkey: Difference between revisions

From Bitcoin Wiki
Jump to navigation Jump to search
Casascius (talk | contribs)
Created page with "'''importprivkey''' is an RPC command on bitcoind that allows a private key to be added to a wallet. As of September 2011, this command exists only in the form of a p..."
 
No edit summary
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
'''importprivkey''' is an RPC command on [[bitcoind]] that allows a [[private key]] to be added to a wallet.
'''importprivkey''' is an RPC command on [[bitcoind]] that allows a [[private key]] to be added to a wallet.


As of September 2011, this command exists only in the form of a patch that must be applied to the main client.
This is a Bitcoin 0.6.0 feature and is available in the 0.6 release candidates and later.


==How to get the patched source==
<pre>
If you are able to compile the source in Linux, you can download and compile the patched source.
$ bitcoind help
[...]
  importprivkey <bitcoinprivkey> [label]
</pre>


First, use git to get the unpatched source:
== See also ==
 
* [[Sweepprivkey proposal]]
git clone git://github.com/bitcoin/bitcoin.git
 
Then, change into the source subdirectory within the tree.
 
cd bitcoin/src
 
Then, download the patch:
 
curl https://github.com/bitcoin/bitcoin/pull/220.diff > 220.diff
 
Then apply the patch:
 
git apply < 220.diff
 
Then compile the source
 
make -f makefile.unix bitcoind

Latest revision as of 13:06, 19 March 2012

importprivkey is an RPC command on bitcoind that allows a private key to be added to a wallet.

This is a Bitcoin 0.6.0 feature and is available in the 0.6 release candidates and later.

$ bitcoind help
[...]
  importprivkey <bitcoinprivkey> [label]

See also