scantxoutset
Summary
Scans the unspent transaction output set for entries that match certain output descriptors.
Description
Scans the unspent transaction output set for entries that match certain output descriptors. Examples of output descriptors are: addr(
) Outputs whose output script corresponds to the specified address (does not include P2PK) raw(In the above,
Arguments
action(STR, required): The action to execute "start" for starting a scan "abort" for aborting the current scan (returns true when abort was successful) "status" for progress report (in %) of the current scanscanobjects(ARR): Array of scan objects. Required for "start" action Every scan object is either a string descriptor or an object:descriptor(STR): An output descriptorvalue(OBJ): An object with output descriptor and metadatadesc(STR, required): An output descriptorrange(RANGE): The range of HD chain indexes to explore (either end or [begin,end])
Results
value(OBJ): No description.success(BOOL): Whether the scan was completedtxouts(NUM): The number of unspent transaction outputs scannedheight(NUM): The block height at which the scan was donebestblock(STR_HEX): The hash of the block at the tip of the chainunspents(ARR): No description.value(OBJ): No description.txid(STR_HEX): The transaction idvout(NUM): The vout valuescriptPubKey(STR_HEX): The output scriptdesc(STR): A specialized descriptor for the matched output scriptamount(STR_AMOUNT): The total amount in QBT of the unspent outputcoinbase(BOOL): Whether this is a coinbase outputheight(NUM): Height of the unspent transaction outputblockhash(STR_HEX): Blockhash of the unspent transaction outputconfirmations(NUM): Number of confirmations of the unspent transaction output when the scan was done
total_amount(STR_AMOUNT): The total amount of all found unspent outputs in QBTsuccess(BOOL): True if scan will be aborted (not necessarily before this RPC returns), or false if there is no scan to abortvalue(OBJ): No description.progress(NUM): Approximate percent completevalue(NONE): No description.
Examples
qbit-cli scantxoutset start '["raw(76a91411b366edfc0a8b66feebae5c2e25a7b6a5d1cf3188ac)#fm24fxxy"]'
qbit-cli scantxoutset status
qbit-cli scantxoutset abort
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "scantxoutset", "params": ["start", ["raw(76a91411b366edfc0a8b66feebae5c2e25a7b6a5d1cf3188ac)#fm24fxxy"]]}' -H 'content-type: application/json' http://127.0.0.1:8352/
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "scantxoutset", "params": ["status"]}' -H 'content-type: application/json' http://127.0.0.1:8352/
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "scantxoutset", "params": ["abort"]}' -H 'content-type: application/json' http://127.0.0.1:8352/