importprivkey - Spacecoin RPC Docs

importprivkey "komodoprivkey" ( "label" rescan height secret_key)

Adds a private key (as returned by dumpprivkey) to your wallet.

1. "komodoprivkey"   (string, required) The private key (see dumpprivkey)
2. "label"            (string, optional, default="") An optional label
3. rescan               (boolean, optional, default=true) Rescan the wallet for transactions
4. height               (integer, optional, default=0) start at block height?
5. secret_key           (integer, optional, default=188) used to import WIFs of other coins

Note: This call can take minutes to complete if rescan is true.


Dump a private key
> spacecoin-cli dumpprivkey "myaddress"

Import the private key with rescan
> spacecoin-cli importprivkey "mykey"

Import using a label and without rescan
> spacecoin-cli importprivkey "mykey" "testing" false

As a JSON-RPC call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importprivkey", "params": ["mykey", "testing", false] }' -H 'content-type: text/plain;'

Import with rescan from a block height
> spacecoin-cli importprivkey "mykey" "testing" true 1000

Import a BTC WIF with rescan
> spacecoin-cli importprivkey "BTCWIF" "testing" true 0 128

Import a BTC WIF without rescan
> spacecoin-cli importprivkey "BTCWIF" "testing" false 0 128

As a JSON-RPC call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importprivkey", "params": ["mykey", "testing", true, 1000] }' -H 'content-type: text/plain;'

Learn more about spacecoin at
Docs generated by spacecoin v0.6.1.
Find this github repo at spacecoinSPACE/spacecoin-rpc-docs.

Spacecoin Logo