Skip to content

Commit 8e8fd49

Browse files
committed
Merge #764: Use the esplora client crate
d7bfe68 Fix broken nightly docs (Alekos Filini) b11c86d Rename internal esplora modules, fix docs (Alekos Filini) b5b9224 Rename esplora features to -async and -blocking (Alekos Filini) cf2bc38 Re-export `esplora_client` (Elias Rohrer) 5baf46f Use the external esplora client library (Alekos Filini) Pull request description: ### Description Use the external esplora client crate now that it's published ### Changelog notice - Start using the external esplora client crate - Deprecate the `use-esplora-reqwest` and `use-esplora-ureq` features in favor of `use-esplora-async` and `use-esplora-blocking` ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing #### New Features: * [ ] I've added tests for the new feature * [ ] I've added docs for the new feature #### Bugfixes: * [ ] This pull request breaks the existing API * [ ] I've added tests to reproduce the issue which are now passing * [ ] I'm linking the issue being fixed by this PR ACKs for top commit: notmandatory: ACK d7bfe68 Tree-SHA512: 23bd47536fe6f723602cbcc51d909eb9aed28376430f4453eea832e30a587be3d312cdca993d114391132bfb39c48637030f974ab1a742f7defe44f40a82ef8b
2 parents a8cf34e + d7bfe68 commit 8e8fd49

File tree

9 files changed

+116
-611
lines changed

9 files changed

+116
-611
lines changed

.github/workflows/cont_integration.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ jobs:
1717
- default
1818
- minimal
1919
- all-keys
20-
- minimal,use-esplora-ureq
20+
- minimal,use-esplora-blocking
2121
- key-value-db
2222
- electrum
2323
- compact_filters
24-
- esplora,ureq,key-value-db,electrum
24+
- use-esplora-blocking,key-value-db,electrum
2525
- compiler
2626
- rpc
2727
- verify
2828
- async-interface
29-
- use-esplora-reqwest
29+
- use-esplora-async
3030
- sqlite
3131
- sqlite-bundled
3232
steps:
@@ -100,10 +100,10 @@ jobs:
100100
features: test-rpc-legacy
101101
- name: esplora
102102
testprefix: esplora
103-
features: test-esplora,use-esplora-reqwest,verify
103+
features: test-esplora,use-esplora-async,verify
104104
- name: esplora
105105
testprefix: esplora
106-
features: test-esplora,use-esplora-ureq,verify
106+
features: test-esplora,use-esplora-blocking,verify
107107
steps:
108108
- name: Checkout
109109
uses: actions/checkout@v2
@@ -154,7 +154,7 @@ jobs:
154154
- name: Update toolchain
155155
run: rustup update
156156
- name: Check
157-
run: cargo check --target wasm32-unknown-unknown --features use-esplora-reqwest --no-default-features
157+
run: cargo check --target wasm32-unknown-unknown --features use-esplora-async --no-default-features
158158

159159
fmt:
160160
name: Rust fmt

.github/workflows/nightly_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Update toolchain
2525
run: rustup update
2626
- name: Build docs
27-
run: cargo rustdoc --verbose --features=compiler,electrum,esplora,ureq,compact_filters,key-value-db,all-keys,sqlite -- --cfg docsrs -Dwarnings
27+
run: cargo rustdoc --verbose --features=compiler,electrum,esplora,use-esplora-blocking,compact_filters,rpc,key-value-db,sqlite,all-keys,verify,hardware-signer -- --cfg docsrs -Dwarnings
2828
- name: Upload artifact
2929
uses: actions/upload-artifact@v2
3030
with:

Cargo.toml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,9 @@ rand = "^0.7"
2323
# Optional dependencies
2424
sled = { version = "0.34", optional = true }
2525
electrum-client = { version = "0.11", optional = true }
26+
esplora-client = { version = "0.1.1", default-features = false, optional = true }
2627
rusqlite = { version = "0.27.0", optional = true }
2728
ahash = { version = "0.7.6", optional = true }
28-
reqwest = { version = "0.11", optional = true, default-features = false, features = ["json"] }
29-
ureq = { version = "~2.2.0", features = ["json"], optional = true }
3029
futures = { version = "0.3", optional = true }
3130
async-trait = { version = "0.1", optional = true }
3231
rocksdb = { version = "0.14", default-features = false, features = ["snappy"], optional = true }
@@ -69,23 +68,26 @@ hardware-signer = ["hwi"]
6968
#
7069
# - Users wanting asynchronous HTTP calls should enable `async-interface` to get
7170
# access to the asynchronous method implementations. Then, if Esplora is wanted,
72-
# enable `esplora` AND `reqwest` (`--features=use-esplora-reqwest`).
71+
# enable the `use-esplora-async` feature.
7372
# - Users wanting blocking HTTP calls can use any of the other blockchain
7473
# implementations (`compact_filters`, `electrum`, or `esplora`). Users wanting to
75-
# use Esplora should enable `esplora` AND `ureq` (`--features=use-esplora-ureq`).
74+
# use Esplora should enable the `use-esplora-blocking` feature.
7675
#
7776
# WARNING: Please take care with the features below, various combinations will
7877
# fail to build. We cannot currently build `bdk` with `--all-features`.
7978
async-interface = ["async-trait"]
8079
electrum = ["electrum-client"]
8180
# MUST ALSO USE `--no-default-features`.
82-
use-esplora-reqwest = ["esplora", "reqwest", "reqwest/socks", "futures"]
83-
use-esplora-ureq = ["esplora", "ureq", "ureq/socks"]
81+
use-esplora-async = ["esplora", "esplora-client/async", "futures"]
82+
use-esplora-blocking = ["esplora", "esplora-client/blocking"]
83+
# Deprecated aliases
84+
use-esplora-reqwest = ["use-esplora-async"]
85+
use-esplora-ureq = ["use-esplora-blocking"]
8486
# Typical configurations will not need to use `esplora` feature directly.
8587
esplora = []
8688

87-
# Use below feature with `use-esplora-reqwest` to enable reqwest default TLS support
88-
reqwest-default-tls = ["reqwest/default-tls"]
89+
# Use below feature with `use-esplora-async` to enable reqwest default TLS support
90+
reqwest-default-tls = ["esplora-client/async-https"]
8991

9092
# Debug/Test features
9193
test-blockchains = ["bitcoincore-rpc", "electrum-client"]
@@ -129,6 +131,6 @@ required-features = ["electrum"]
129131
[workspace]
130132
members = ["macros"]
131133
[package.metadata.docs.rs]
132-
features = ["compiler", "electrum", "esplora", "use-esplora-ureq", "compact_filters", "rpc", "key-value-db", "sqlite", "all-keys", "verify", "hardware-signer"]
134+
features = ["compiler", "electrum", "esplora", "use-esplora-blocking", "compact_filters", "rpc", "key-value-db", "sqlite", "all-keys", "verify", "hardware-signer"]
133135
# defines the configuration attribute `docsrs`
134136
rustdoc-args = ["--cfg", "docsrs"]

src/blockchain/esplora/api.rs

Lines changed: 0 additions & 117 deletions
This file was deleted.

0 commit comments

Comments
 (0)