Skip to content

Commit 2ae69ca

Browse files
authored
Merge pull request #889 from evanlinjin/add-async-syncing-esplora
Add docs for `EsploraAsyncExt` and make doctests runnable
2 parents 82f5d9c + 877b658 commit 2ae69ca

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

crates/bdk/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ To persist the `Wallet` on disk, `Wallet` needs to be constructed with a
6464

6565
**Example**
6666

67-
```rust,no_run
67+
```rust
6868
use bdk::{bitcoin::Network, wallet::{AddressIndex, Wallet}};
6969

7070
fn main() {

crates/esplora/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,12 @@ For async-only (with https):
2222
bdk_esplora = { version = "0.1", features = ["async-https"] }
2323
```
2424

25-
To use the extension trait:
26-
27-
```rust,no_run
25+
To use the extension traits:
26+
```rust
2827
// for blocking
2928
use bdk_esplora::EsploraExt;
3029
// for async
3130
use bdk_esplora::EsploraAsyncExt;
3231
```
3332

34-
<!-- BDK Esplora client library for updating the `bdk_chain` structures. -->
35-
36-
<!-- [`esplora_client`]: https://docs.rs/esplora-client/latest -->
33+
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).

crates/esplora/src/async_ext.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,13 @@ use futures::stream::{FuturesOrdered, TryStreamExt};
1212

1313
use crate::map_confirmation_time;
1414

15+
/// Trait to extend [`esplora_client::AsyncClient`] functionality.
16+
///
17+
/// This is the async version of [`EsploraExt`]. Refer to
18+
/// [crate-level documentation] for more.
19+
///
20+
/// [`EsploraExt`]: crate::EsploraExt
21+
/// [crate-level documentation]: crate
1522
#[cfg(feature = "async")]
1623
#[cfg_attr(target_arch = "wasm32", async_trait(?Send))]
1724
#[cfg_attr(not(target_arch = "wasm32"), async_trait)]

0 commit comments

Comments
 (0)