importaddress

importaddress "address" ( "label" rescan p2sh )

Adds an address or script (in hex) to be watched as if it were part of your wallet, but without the ability to spend from it. This action requires a new wallet backup.

Note: If rescan is set to true, this call can take over an hour to complete. During that time, other RPC calls may recognize the imported address, but related transactions may still be missing, causing temporarily incorrect or incomplete balances and unspent outputs until the rescan finishes.

If you have the full public key, use importpubkey instead of this.

Hint: Use importmulti to import more than one address at once.

Additional Notes:

Argument #1 – address

Type: string, required

The BitcoinEvo address (or hex-encoded script)

Argument #2 – label

Type: string, optional, default=””

An optional label

Argument #3 – rescan

Type: boolean, optional, default=true

Rescan the wallet for transactions

Argument #4 – p2sh

Type: boolean, optional, default=false

Add the P2SH version of the script as well

Result

null    (json null)

Examples

Import an address with rescan:

bitcoinevo-cli importaddress "myaddress"

Import using a label without rescan:

bitcoinevo-cli importaddress "myaddress" "testing" false

As a JSON-RPC call:

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "importaddress", "params": ["myaddress", "testing", false]}' -H 'content-type: text/plain;' http://127.0.0.1:7332/