fullScan

abstract fun fullScan(request: FullScanRequest, stopGap: ULong, batchSize: ULong, fetchPrevTxouts: Boolean): Update(source)

Full scan the keychain scripts specified with the blockchain (via an Electrum client) and returns updates for bdk_chain data structures.

  • request: struct with data required to perform a spk-based blockchain client full scan, see FullScanRequest.

  • stop_gap: the full scan for each keychain stops after a gap of script pubkeys with no associated transactions.

  • batch_size: specifies the max number of script pubkeys to request for in a single batch request.

  • fetch_prev_txouts: specifies whether we want previous TxOuts for fee calculation. Note that this requires additional calls to the Electrum server, but is necessary for calculating the fee on a transaction if your wallet does not own the inputs. Methods like Wallet.calculate_fee and Wallet.calculate_fee_rate will return a CalculateFeeError::MissingTxOut error if those TxOuts are not present in the transaction graph.