From f6dc6890c37752e80c86c68ae3ca3cc4fac6245e Mon Sep 17 00:00:00 2001 From: Wei Chen Date: Mon, 6 May 2024 16:51:19 +0800 Subject: [PATCH] docs(esplora): fixed `full_scan` and `sync` documentation --- crates/esplora/src/async_ext.rs | 14 ++++---------- crates/esplora/src/blocking_ext.rs | 14 ++++---------- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/crates/esplora/src/async_ext.rs b/crates/esplora/src/async_ext.rs index 2942d274..7c9e18bb 100644 --- a/crates/esplora/src/async_ext.rs +++ b/crates/esplora/src/async_ext.rs @@ -28,8 +28,8 @@ pub trait EsploraAsyncExt { /// Scan keychain scripts for transactions against Esplora, returning an update that can be /// applied to the receiving structures. /// - /// * `local_tip`: the previously seen tip from [`LocalChain::tip`]. - /// * `keychain_spks`: keychains that we want to scan transactions for + /// - `request`: struct with data required to perform a spk-based blockchain client full scan, + /// see [`FullScanRequest`] /// /// The full scan for each keychain stops after a gap of `stop_gap` script pubkeys with no /// associated transactions. `parallel_requests` specifies the max number of HTTP requests to @@ -47,8 +47,6 @@ pub trait EsploraAsyncExt { /// and [Sparrow](https://www.sparrowwallet.com/docs/faq.html#ive-restored-my-wallet-but-some-of-my-funds-are-missing). /// /// A `stop_gap` of 0 will be treated as a `stop_gap` of 1. - /// - /// [`LocalChain::tip`]: bdk_chain::local_chain::LocalChain::tip async fn full_scan( &self, request: FullScanRequest, @@ -59,16 +57,12 @@ pub trait EsploraAsyncExt { /// Sync a set of scripts with the blockchain (via an Esplora client) for the data /// specified and return a [`TxGraph`]. /// - /// * `local_tip`: the previously seen tip from [`LocalChain::tip`]. - /// * `misc_spks`: scripts that we want to sync transactions for - /// * `txids`: transactions for which we want updated [`ConfirmationTimeHeightAnchor`]s - /// * `outpoints`: transactions associated with these outpoints (residing, spending) that we - /// want to include in the update + /// - `request`: struct with data required to perform a spk-based blockchain client sync, see + /// [`SyncRequest`] /// /// If the scripts to sync are unknown, such as when restoring or importing a keychain that /// may include scripts that have been used, use [`full_scan`] with the keychain. /// - /// [`LocalChain::tip`]: bdk_chain::local_chain::LocalChain::tip /// [`full_scan`]: EsploraAsyncExt::full_scan async fn sync( &self, diff --git a/crates/esplora/src/blocking_ext.rs b/crates/esplora/src/blocking_ext.rs index 469ab52e..68cfb180 100644 --- a/crates/esplora/src/blocking_ext.rs +++ b/crates/esplora/src/blocking_ext.rs @@ -26,8 +26,8 @@ pub trait EsploraExt { /// Scan keychain scripts for transactions against Esplora, returning an update that can be /// applied to the receiving structures. /// - /// * `local_tip`: the previously seen tip from [`LocalChain::tip`]. - /// * `keychain_spks`: keychains that we want to scan transactions for + /// - `request`: struct with data required to perform a spk-based blockchain client full scan, + /// see [`FullScanRequest`] /// /// The full scan for each keychain stops after a gap of `stop_gap` script pubkeys with no /// associated transactions. `parallel_requests` specifies the max number of HTTP requests to @@ -45,8 +45,6 @@ pub trait EsploraExt { /// and [Sparrow](https://www.sparrowwallet.com/docs/faq.html#ive-restored-my-wallet-but-some-of-my-funds-are-missing). /// /// A `stop_gap` of 0 will be treated as a `stop_gap` of 1. - /// - /// [`LocalChain::tip`]: bdk_chain::local_chain::LocalChain::tip fn full_scan( &self, request: FullScanRequest, @@ -57,16 +55,12 @@ pub trait EsploraExt { /// Sync a set of scripts with the blockchain (via an Esplora client) for the data /// specified and return a [`TxGraph`]. /// - /// * `local_tip`: the previously seen tip from [`LocalChain::tip`]. - /// * `misc_spks`: scripts that we want to sync transactions for - /// * `txids`: transactions for which we want updated [`ConfirmationTimeHeightAnchor`]s - /// * `outpoints`: transactions associated with these outpoints (residing, spending) that we - /// want to include in the update + /// - `request`: struct with data required to perform a spk-based blockchain client sync, see + /// [`SyncRequest`] /// /// If the scripts to sync are unknown, such as when restoring or importing a keychain that /// may include scripts that have been used, use [`full_scan`] with the keychain. /// - /// [`LocalChain::tip`]: bdk_chain::local_chain::LocalChain::tip /// [`full_scan`]: EsploraExt::full_scan fn sync(&self, request: SyncRequest, parallel_requests: usize) -> Result; }