]> Untitled Git - bdk/commitdiff
Disable reqwest's default features
authorThomas Eizinger <thomas@eizinger.io>
Tue, 7 Dec 2021 05:34:03 +0000 (16:34 +1100)
committerThomas Eizinger <thomas@eizinger.io>
Mon, 10 Jan 2022 02:57:22 +0000 (13:57 +1100)
By default, reqwest uses openssl for TLS. Any consumer wanting to use
rustls will thus pull in unnecessary dependencies. To make getting started
with bdk and reqwest easier, we add a `reqwest-default-tls` feature
that can be used to activate reqwest's `default-tls` feature. TLS is
necessary for the esplora integration. Adding this feature makes it possible
for people to use bdk with esplora without adding a reqwest dependency to
their manifest.

CHANGELOG.md
Cargo.toml

index f9fe4e79ea7b8194ad79bb943c271064646fe55b..5e833ab66f29b3cf220b80c0a9ec12f713ed2cc2 100644 (file)
@@ -10,6 +10,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 - Unify ureq and reqwest esplora backends to have the same configuration parameters. This means reqwest now has a timeout parameter and ureq has a concurrency parameter.
 - Fixed esplora fee estimation.
 - Fixed generating WIF in the correct network format.
+- Disable `reqwest` default features.
+- Added `reqwest-default-tls` feature: Use this to restore the TLS defaults of reqwest if you don't want to add a dependency to it in your own manifest.
 
 ## [v0.14.0] - [v0.13.0]
 
index f97f3f13b87850ba00644864eca72f0b9aff8775..ef7fc9b31a5d89221b8fa8aa2f850188483887f7 100644 (file)
@@ -25,7 +25,7 @@ sled = { version = "0.34", optional = true }
 electrum-client = { version = "0.8", optional = true }
 rusqlite = { version = "0.25.3", optional = true }
 ahash = { version = "=0.7.4", optional = true }
-reqwest = { version = "0.11", optional = true, features = ["json"] }
+reqwest = { version = "0.11", optional = true, default-features = false, features = ["json"] }
 ureq = { version = "~2.2.0", features = ["json"], optional = true }
 futures = { version = "0.3", optional = true }
 async-trait = { version = "0.1", optional = true }
@@ -82,6 +82,8 @@ use-esplora-ureq = ["esplora", "ureq", "ureq/socks"]
 # Typical configurations will not need to use `esplora` feature directly.
 esplora = []
 
+# Use below feature with `use-esplora-reqwest` to enable reqwest default TLS support
+reqwest-default-tls = ["reqwest/default-tls"]
 
 # Debug/Test features
 test-blockchains = ["bitcoincore-rpc", "electrum-client"]