]> Untitled Git - bdk/commitdiff
Add docs for `EsploraAsyncExt` and make doctests runnable
author志宇 <hello@evanlinjin.me>
Fri, 10 Mar 2023 00:40:27 +0000 (13:40 +1300)
committer志宇 <hello@evanlinjin.me>
Thu, 16 Mar 2023 05:08:42 +0000 (13:08 +0800)
crates/bdk/README.md
crates/esplora/README.md
crates/esplora/src/async_ext.rs

index 00ce504a4e2f7e5db0d8cc12642d6efb75bfdef0..9a5bd9986b2414d8c67f462a3546421f8681a9e4 100644 (file)
@@ -64,7 +64,7 @@ To persist the `Wallet` on disk, `Wallet` needs to be constructed with a
 
 **Example**
 
-```rust,no_run
+```rust
 use bdk::{bitcoin::Network, wallet::{AddressIndex, Wallet}};
 
 fn main() {
index 9880115b12e92d1d03faaf0d406ed71eae96f913..253832a87746ef7b84aae932406152b295b9a08c 100644 (file)
@@ -22,15 +22,12 @@ For async-only (with https):
 bdk_esplora = { version = "0.1", features = ["async-https"] }
 ```
 
-To use the extension trait:
-
-```rust,no_run
+To use the extension traits:
+```rust
 // for blocking
 use bdk_esplora::EsploraExt;
 // for async
 use bdk_esplora::EsploraAsyncExt;
 ```
 
-<!-- BDK Esplora client library for updating the `bdk_chain` structures. -->
-
-<!-- [`esplora_client`]: https://docs.rs/esplora-client/latest -->
+For full examples, refer to [`example-crates/wallet_esplora`](https://github.com/bitcoindevkit/bdk/tree/master/example-crates/wallet_esplora) (blocking) and [`example-crates/wallet_esplora_async`](https://github.com/bitcoindevkit/bdk/tree/master/example-crates/wallet_esplora_async).
index cd0d0e0f5f97f5c11771d475780bf975988cd0ad..266fd30b69c20b451d6867253f4c59f85939e201 100644 (file)
@@ -12,6 +12,13 @@ use futures::stream::{FuturesOrdered, TryStreamExt};
 
 use crate::map_confirmation_time;
 
+/// Trait to extend [`esplora_client::AsyncClient`] functionality.
+///
+/// This is the async version of [`EsploraExt`]. Refer to
+/// [crate-level documentation] for more.
+///
+/// [`EsploraExt`]: crate::EsploraExt
+/// [crate-level documentation]: crate
 #[cfg(feature = "async")]
 #[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
 #[cfg_attr(not(target_arch = "wasm32"), async_trait)]