bitcoindevkit / rust-esplora-client

Bitcoin Esplora API client library. Supports plaintext, TLS and Onion servers. Blocking or async.
MIT License
28 stars 44 forks source link

Add https feature for minreq #84

Closed yancyribbens closed 4 months ago

yancyribbens commented 4 months ago

build_blocking seems to require the https feature for minreq

yancyribbens commented 4 months ago

nm, it looks like I can just do as follows:

[dependencies.esplora-client.minreq]
features = ["https"]
yancyribbens commented 4 months ago

Actually transitive deps work as follows:

[dependencies]
..
esplora-client = "0.7.0"

[dependencies.minreq]
features = ["https"]
oleonardolima commented 4 months ago

@yancyribbens If you want to use the rust-esplora-client BlockingClient with proxy and TLS (SSL) you need to use either one of the features: blocking-https, blocking-https-rustls, blocking-https-native or blocking-https-bundled.

I don't see the need to use the transitive deps approach, you can check more about the available features here: https://docs.rs/esplora-client/0.7.0/esplora_client/#features

example:

[dependencies]
esplora-client =  {version: "0.7.0", features = ["blocking-https"] }

--

NOTE: You should select which feature to use, depending if you want native minreq TLS, rustls, openssl, or both as better described on the docs.

yancyribbens commented 4 months ago

setting the feature "blocking-https" works also I guess. Note, this feature is not enabled by default,so I think the docs are wrong?

By default the library enables all features.