bdk/crates/esplora/README.md

37 lines
989 B
Markdown
Raw Normal View History

# 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
```
To use the extension traits:
```rust
2023-03-10 13:40:27 +13:00
// for blocking
use bdk_esplora::EsploraExt;
// for async
// use bdk_esplora::EsploraAsyncExt;
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/