scanblocks (27.0.0 RPC) blockchain dumptxoutset getbestblockhash getblock getblockchaininfo getblockcount getblockfilter getblockfrompeer getblockhash getblockheader getblockstats getchainstates getchaintips getchaintxstats getdeploymentinfo getdifficulty getmempoolancestors getmempooldescendants getmempoolentry getmempoolinfo getrawmempool gettxout gettxoutproof gettxoutsetinfo gettxspendingprevout importmempool loadtxoutset preciousblock pruneblockchain savemempool scanblocks scantxoutset verifychain verifytxoutproof control getmemoryinfo getrpcinfo help logging stop uptime mining getblocktemplate getmininginfo getnetworkhashps getprioritisedtransactions prioritisetransaction submitblock submitheader network addnode clearbanned disconnectnode getaddednodeinfo getaddrmaninfo getconnectioncount getnettotals getnetworkinfo getnodeaddresses getpeerinfo listbanned ping setban setnetworkactive rawtransactions analyzepsbt combinepsbt combinerawtransaction converttopsbt createpsbt createrawtransaction decodepsbt decoderawtransaction decodescript descriptorprocesspsbt finalizepsbt fundrawtransaction getrawtransaction joinpsbts sendrawtransaction signrawtransactionwithkey submitpackage testmempoolaccept utxoupdatepsbt signer enumeratesigners util createmultisig deriveaddresses estimatesmartfee getdescriptorinfo getindexinfo signmessagewithprivkey validateaddress verifymessage wallet abandontransaction abortrescan addmultisigaddress backupwallet bumpfee createwallet dumpprivkey dumpwallet encryptwallet getaddressesbylabel getaddressinfo getbalance getbalances getnewaddress getrawchangeaddress getreceivedbyaddress getreceivedbylabel gettransaction getunconfirmedbalance getwalletinfo importaddress importdescriptors importmulti importprivkey importprunedfunds importpubkey importwallet keypoolrefill listaddressgroupings listdescriptors listlabels listlockunspent listreceivedbyaddress listreceivedbylabel listsinceblock listtransactions listunspent listwalletdir listwallets loadwallet lockunspent migratewallet newkeypool psbtbumpfee removeprunedfunds rescanblockchain restorewallet send sendall sendmany sendtoaddress sethdseed setlabel settxfee setwalletflag signmessage signrawtransactionwithwallet simulaterawtransaction unloadwallet upgradewallet walletcreatefundedpsbt walletdisplayaddress walletlock walletpassphrase walletpassphrasechange walletprocesspsbt zmq getzmqnotifications scanblocks "action" ( [scanobjects,...] start_height stop_height "filtertype" options ) Return relevant blockhashes for given descriptors (requires blockfilterindex). This call may take several minutes. Make sure to use no RPC timeout (bitcoin-cli -rpcclienttimeout=0) Arguments: 1. action (string, 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 scan 2. scanobjects (json array, optional) Array of scan objects. Required for "start" action Every scan object is either a string descriptor or an object: [ "descriptor", (string) An output descriptor { (json object) An object with output descriptor and metadata "desc": "str", (string, required) An output descriptor "range": n or [n,n], (numeric or array, optional, default=1000) The range of HD chain indexes to explore (either end or [begin,end]) }, ... ] 3. start_height (numeric, optional, default=0) Height to start to scan from 4. stop_height (numeric, optional, default=chain tip) Height to stop to scan 5. filtertype (string, optional, default="basic") The type name of the filter 6. options (json object, optional) Options object that can be used to pass named arguments, listed below. Named Arguments: filter_false_positives (boolean, optional, default=false) Filter false positives (slower and may fail on pruned nodes). Otherwise they may occur at a rate of 1/M Result (when action=='status' and no scan is in progress - possibly already completed): null (json null) Result (When action=='start'; only returns after scan completes): { (json object) "from_height" : n, (numeric) The height we started the scan from "to_height" : n, (numeric) The height we ended the scan at "relevant_blocks" : [ (json array) Blocks that may have matched a scanobject. "hex", (string) A relevant blockhash ... ], "completed" : true|false (boolean) true if the scan process was not aborted } Result (when action=='status' and a scan is currently in progress): { (json object) "progress" : n, (numeric) Approximate percent complete "current_height" : n (numeric) Height of the block currently being scanned } Result (when action=='abort'): true|false (boolean) True if scan will be aborted (not necessarily before this RPC returns), or false if there is no scan to abort Examples: > bitcoin-cli scanblocks start '["addr(bcrt1q4u4nsgk6ug0sqz7r3rj9tykjxrsl0yy4d0wwte)"]' 300000 > bitcoin-cli scanblocks start '["addr(bcrt1q4u4nsgk6ug0sqz7r3rj9tykjxrsl0yy4d0wwte)"]' 100 150 basic > bitcoin-cli scanblocks status > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "scanblocks", "params": ["start", ["addr(bcrt1q4u4nsgk6ug0sqz7r3rj9tykjxrsl0yy4d0wwte)"], 300000]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "scanblocks", "params": ["start", ["addr(bcrt1q4u4nsgk6ug0sqz7r3rj9tykjxrsl0yy4d0wwte)"], 100, 150, "basic"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "scanblocks", "params": ["status"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/