Importpubkey
importpubkey
Adds a public key (in hex) that can be watched as if it were in your wallet but cannot be used to spend. Requires a new wallet backup.
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
| 2 | label |
string | Optional | "" | See CLI help for details |
| 3 | rescan |
boolean | Optional | true | See CLI help for details |
Result
null (json null)
Examples
Import a public key with rescan
raptoreum-cli importpubkey "mypubkey"
Import using a label without rescan
raptoreum-cli importpubkey "mypubkey" "testing" false
As a JSON-RPC call
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importpubkey", "params": ["mypubkey", "testing", false] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/