z_importviewingkey - Spacecoin RPC Docs


z_importviewingkey "vkey" ( rescan startHeight )

Adds a viewing key (as returned by z_exportviewingkey) to your wallet.

Arguments:
1. "vkey"             (string, required) The viewing key (see z_exportviewingkey)
2. rescan             (string, optional, default="whenkeyisnew") Rescan the wallet for transactions - can be "yes", "no" or "whenkeyisnew"
3. startHeight        (numeric, optional, default=0) Block height to start rescan from
4. zaddr               (string, optional, default="") zaddr in case of importing viewing key for Sapling

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

Examples:

Import a viewing key
> spacecoin-cli z_importviewingkey "vkey"

Import the viewing key without rescan
> spacecoin-cli z_importviewingkey "vkey", no

Import the viewing key with partial rescan
> spacecoin-cli z_importviewingkey "vkey" whenkeyisnew 30000

Re-import the viewing key with longer partial rescan
> spacecoin-cli z_importviewingkey "vkey" yes 20000

Import the viewing key for Sapling address
> spacecoin-cli z_importviewingkey "vkey" no 0 "zaddr"

As a JSON-RPC call
> curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "z_importviewingkey", "params": ["vkey", "no"] }' -H 'content-type: text/plain;' http://127.0.0.1:35593/


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

Spacecoin Logo



Auction











Lotto