2023-03-02 16:23:06 +11:00
# BDK Esplora
2023-08-21 15:01:08 -05:00
BDK Esplora extends [`esplora-client` ] to update [`bdk_chain` ] structures
2023-03-10 13:40:27 +13:00
from an Esplora server.
## Usage
There are two versions of the extension trait (blocking and async).
For blocking-only:
```toml
2023-07-04 12:28:06 -05:00
bdk_esplora = { version = "0.3", features = ["blocking"] }
2023-03-10 13:40:27 +13:00
```
For async-only:
```toml
2023-07-04 12:28:06 -05:00
bdk_esplora = { version = "0.3", features = ["async"] }
2023-03-10 13:40:27 +13:00
```
For async-only (with https):
```toml
2023-07-04 12:28:06 -05:00
bdk_esplora = { version = "0.3", features = ["async-https"] }
2023-03-10 13:40:27 +13:00
```
2023-03-10 13:40:27 +13:00
To use the extension traits:
```rust
2023-03-10 13:40:27 +13:00
// for blocking
use bdk_esplora::EsploraExt;
// for async
2023-05-24 11:37:26 +08:00
// use bdk_esplora::EsploraAsyncExt;
2023-03-10 13:40:27 +13:00
```
2023-03-10 13:40:27 +13:00
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 ).
2023-08-21 15:01:08 -05:00
[`esplora-client` ]: https://docs.rs/esplora-client/
[`bdk_chain` ]: https://docs.rs/bdk-chain/