/// See also [`FullScanRequest`].
#[must_use]
#[derive(Debug)]
-pub struct FullScanResult<K, A = ConfirmationBlockTime> {
+pub struct FullScanResponse<K, A = ConfirmationBlockTime> {
/// Relevant transaction data discovered during the scan.
pub tx_update: crate::TxUpdate<A>,
/// Last active indices for the corresponding keychains (`K`). An index is active if it had a
pub chain_update: Option<CheckPoint>,
}
-impl<K, A> Default for FullScanResult<K, A> {
+impl<K, A> Default for FullScanResponse<K, A> {
fn default() -> Self {
Self {
tx_update: Default::default(),
use bdk_core::{
bitcoin::{block::Header, BlockHash, OutPoint, ScriptBuf, Transaction, Txid},
collections::{BTreeMap, HashMap},
- spk_client::{FullScanRequest, FullScanResult, SyncRequest, SyncResponse},
+ spk_client::{FullScanRequest, FullScanResponse, SyncRequest, SyncResponse},
BlockId, CheckPoint, ConfirmationBlockTime, TxUpdate,
};
use electrum_client::{ElectrumApi, Error, HeaderNotification};
stop_gap: usize,
batch_size: usize,
fetch_prev_txouts: bool,
- ) -> Result<FullScanResult<K>, Error> {
+ ) -> Result<FullScanResponse<K>, Error> {
let mut request: FullScanRequest<K> = request.into();
let tip_and_latest_blocks = match request.chain_tip() {
_ => None,
};
- Ok(FullScanResult {
+ Ok(FullScanResponse {
tx_update,
chain_update,
last_active_indices,
//! This crate is used for returning updates from Electrum servers.
//!
//! Updates are returned as either a [`SyncResponse`] (if [`BdkElectrumClient::sync()`] is called),
-//! or a [`FullScanResult`] (if [`BdkElectrumClient::full_scan()`] is called).
+//! or a [`FullScanResponse`] (if [`BdkElectrumClient::full_scan()`] is called).
//!
//! In most cases [`BdkElectrumClient::sync()`] is used to sync the transaction histories of scripts
//! that the application cares about, for example the scripts for all the receive addresses of a
//!
//! [`example_electrum`]: https://github.com/bitcoindevkit/bdk/tree/master/example-crates/example_electrum
//! [`SyncResponse`]: bdk_core::spk_client::SyncResponse
-//! [`FullScanResult`]: bdk_core::spk_client::FullScanResult
+//! [`FullScanResponse`]: bdk_core::spk_client::FullScanResponse
#![warn(missing_docs)]
use async_trait::async_trait;
use bdk_core::collections::{BTreeMap, BTreeSet, HashSet};
-use bdk_core::spk_client::{FullScanRequest, FullScanResult, SyncRequest, SyncResponse};
+use bdk_core::spk_client::{FullScanRequest, FullScanResponse, SyncRequest, SyncResponse};
use bdk_core::{
bitcoin::{BlockHash, OutPoint, ScriptBuf, Txid},
BlockId, CheckPoint, ConfirmationBlockTime, Indexed, TxUpdate,
request: R,
stop_gap: usize,
parallel_requests: usize,
- ) -> Result<FullScanResult<K>, Error>;
+ ) -> Result<FullScanResponse<K>, Error>;
/// Sync a set of scripts, txids, and/or outpoints against Esplora.
///
request: R,
stop_gap: usize,
parallel_requests: usize,
- ) -> Result<FullScanResult<K>, Error> {
+ ) -> Result<FullScanResponse<K>, Error> {
let mut request = request.into();
let keychains = request.keychains();
_ => None,
};
- Ok(FullScanResult {
+ Ok(FullScanResponse {
chain_update,
tx_update,
last_active_indices,
use bdk_core::collections::{BTreeMap, BTreeSet, HashSet};
-use bdk_core::spk_client::{FullScanRequest, FullScanResult, SyncRequest, SyncResponse};
+use bdk_core::spk_client::{FullScanRequest, FullScanResponse, SyncRequest, SyncResponse};
use bdk_core::{
bitcoin::{BlockHash, OutPoint, ScriptBuf, Txid},
BlockId, CheckPoint, ConfirmationBlockTime, Indexed, TxUpdate,
request: R,
stop_gap: usize,
parallel_requests: usize,
- ) -> Result<FullScanResult<K>, Error>;
+ ) -> Result<FullScanResponse<K>, Error>;
/// Sync a set of scripts, txids, and/or outpoints against Esplora.
///
request: R,
stop_gap: usize,
parallel_requests: usize,
- ) -> Result<FullScanResult<K>, Error> {
+ ) -> Result<FullScanResponse<K>, Error> {
let mut request = request.into();
let chain_tip = request.chain_tip();
_ => None,
};
- Ok(FullScanResult {
+ Ok(FullScanResponse {
chain_update,
tx_update,
last_active_indices,
indexer::keychain_txout::KeychainTxOutIndex,
local_chain::{ApplyHeaderError, CannotConnectError, CheckPoint, CheckPointIter, LocalChain},
spk_client::{
- FullScanRequest, FullScanRequestBuilder, FullScanResult, SyncRequest, SyncRequestBuilder,
+ FullScanRequest, FullScanRequestBuilder, FullScanResponse, SyncRequest, SyncRequestBuilder,
SyncResponse,
},
tx_graph::{CalculateFeeError, CanonicalTx, TxGraph, TxUpdate},
pub chain: Option<CheckPoint>,
}
-impl From<FullScanResult<KeychainKind>> for Update {
- fn from(value: FullScanResult<KeychainKind>) -> Self {
+impl From<FullScanResponse<KeychainKind>> for Update {
+ fn from(value: FullScanResponse<KeychainKind>) -> Self {
Self {
last_active_indices: value.last_active_indices,
tx_update: value.tx_update,