]> Untitled Git - bdk/commitdiff
docs(esplora): Simplify crate docs
author志宇 <hello@evanlinjin.me>
Sun, 21 Jul 2024 13:51:00 +0000 (13:51 +0000)
committer志宇 <hello@evanlinjin.me>
Wed, 14 Aug 2024 08:16:57 +0000 (08:16 +0000)
crates/esplora/README.md
crates/esplora/src/lib.rs

index 96d92c76c88f86e7164073cb7c51256e3544c36e..d61b09aa63885539359ff8c468a7725fc9149c7d 100644 (file)
@@ -1,11 +1,12 @@
 # BDK Esplora
 
-BDK Esplora extends [`esplora-client`] to update [`bdk_chain`] structures
-from an Esplora server.
+BDK Esplora extends [`esplora-client`] (with extension traits: [`EsploraExt`] and
+[`EsploraAsyncExt`]) to update [`bdk_chain`] structures from an Esplora server.
 
-## Usage
+The extension traits are primarily intended to satisfy [`SyncRequest`]s with [`sync`] and
+[`FullScanRequest`]s with [`full_scan`].
 
-There are two versions of the extension trait (blocking and async).
+## Usage
 
 For blocking-only:
 ```toml
@@ -26,7 +27,7 @@ To use the extension traits:
 ```rust
 // for blocking
 use bdk_esplora::EsploraExt;
-// for async
+// // for async
 // use bdk_esplora::EsploraAsyncExt;
 ```
 
@@ -34,3 +35,9 @@ For full examples, refer to [`example-crates/wallet_esplora_blocking`](https://g
 
 [`esplora-client`]: https://docs.rs/esplora-client/
 [`bdk_chain`]: https://docs.rs/bdk-chain/
+[`EsploraExt`]: crate::EsploraExt
+[`EsploraAsyncExt`]: crate::EsploraAsyncExt
+[`SyncRequest`]: bdk_chain::spk_client::SyncRequest
+[`FullScanRequest`]: bdk_chain::spk_client::FullScanRequest
+[`sync`]: crate::EsploraExt::sync
+[`full_scan`]: crate::EsploraExt::full_scan
index 2c0e62b7e44f515000745fcbebc9c88592de2673..9ce0c7be188f49177cb71bcbfa1ecec352c16694 100644 (file)
@@ -1,21 +1,4 @@
 #![doc = include_str!("../README.md")]
-
-//! # Primary Methods
-//!
-//! The two primary methods are [`EsploraExt::sync`] and [`EsploraExt::full_scan`].
-//!
-//! [`EsploraExt::sync`] is used to sync against a subset of wallet data. For example, transaction
-//! histories of revealed and unused script from the external (public) keychain and/or statuses of
-//! wallet-owned UTXOs and spending transactions from them. The policy of what to sync against can
-//! be customized.
-//!
-//! [`EsploraExt::full_scan`] is designed to be used when importing or restoring a keychain where
-//! the range of possibly used scripts is not known. In this case it is necessary to scan all
-//! keychain scripts until a number (the `stop_gap`) of unused scripts is discovered.
-//!
-//! For a sync or full scan, the user receives relevant blockchain data and output updates for
-//! [`bdk_chain`] .
-//!
 //! # Low-Level Methods
 //!
 //! [`EsploraExt::sync`] and [`EsploraExt::full_scan`] returns updates which are *complete* and can