z_importviewingkey - Pastel RPC
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 Note: This call can take minutes to complete if rescan is true. Result: { "type" : "xxxx", (string) "sprout" or "sapling" "address" : "address|DefaultAddress", (string) The address corresponding to the viewing key (for Sapling, this is the default address). } Examples: Import a viewing key > pastel-cli z_importviewingkey "vkey" Import the viewing key without rescan > pastel-cli z_importviewingkey "vkey", no Import the viewing key with partial rescan > pastel-cli z_importviewingkey "vkey" whenkeyisnew 30000 Re-import the viewing key with longer partial rescan > pastel-cli z_importviewingkey "vkey" yes 20000 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:9932/
Maintained by Pastel Network; license of the docs is MIT (see pastel repo)
Generated from a mainnet node
Addressindex
Blockchain
Control
Generating
Mining
Mnode
Network
Rawtransactions
Wallet
addmultisigaddress
backupwallet
dumpprivkey
dumpwallet
encryptwallet
fixmissingtxs
getaccount
getaccountaddress
getaddressesbyaccount
getbalance
getnewaddress
getrawchangeaddress
getreceivedbyaccount
getreceivedbyaddress
gettransaction
gettxfee
getunconfirmedbalance
getwalletinfo
importaddress
importprivkey
importwallet
keypoolrefill
listaccounts
listaddressamounts
listaddressgroupings
listlockunspent
listreceivedbyaccount
listreceivedbyaddress
listsinceblock
listtransactions
listunspent
lockunspent
move
scanburntransactions
scanformissingtxs
sendfrom
sendmany
sendtoaddress
setaccount
settxfee
signmessage
z_exportkey
z_exportviewingkey
z_exportwallet
z_getbalance
z_getnewaddress(type)
z_getnotescount
z_getoperationresult
z_getoperationstatus
z_gettotalbalance
z_importkey
z_importviewingkey
z_importwallet
z_listaddresses
z_listoperationids
z_listreceivedbyaddress
z_listunspent
z_mergetoaddress
z_sendmany
z_sendmanywithchangetosender
z_shieldcoinbase
z_viewtransaction
zcbenchmark