Skip to content

Importprivkey

importprivkey

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

Arguments

Position Name Type Required Default Description
2 label string Optional current label if address exists, otherwise "" See CLI help for details
3 rescan boolean Optional true See CLI help for details

Result

null    (json null)

Examples

Dump a private key
 raptoreum-cli dumpprivkey "myaddress"
Import the private key with rescan
 raptoreum-cli importprivkey "mykey"
Import using a label and without rescan
 raptoreum-cli importprivkey "mykey" "testing" false
Import using default blank label and without rescan
 raptoreum-cli importprivkey "mykey" "" 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;' http://127.0.0.1:10225/