4141//! specific features, set `default-features` to `false` in your `Cargo.toml`
4242//! and specify the features you want. This will look like this:
4343//!
44- //! `esplora-client = { version = "*", default-features = false, features = ["blocking"] }`
44+ //! `esplora-client = { version = "*", default-features = false, features =
45+ //! ["blocking"] }`
4546//!
4647//! * `blocking` enables [`minreq`], the blocking client with proxy.
47- //! * `blocking-https` enables [`minreq`], the blocking client with proxy and TLS (SSL)
48- //! capabilities using the default [`minreq`] backend.
49- //! * `blocking-https-rustls` enables [`minreq`], the blocking client with proxy and TLS (SSL)
50- //! capabilities using the `rustls` backend.
51- //! * `blocking-https-native` enables [`minreq`], the blocking client with proxy and TLS (SSL)
52- //! capabilities using the platform's native TLS backend (likely OpenSSL).
53- //! * `blocking-https-bundled` enables [`minreq`], the blocking client with proxy and TLS (SSL)
54- //! capabilities using a bundled OpenSSL library backend.
48+ //! * `blocking-https` enables [`minreq`], the blocking client with proxy and
49+ //! TLS (SSL) capabilities using the default [`minreq`] backend.
50+ //! * `blocking-https-rustls` enables [`minreq`], the blocking client with proxy
51+ //! and TLS (SSL) capabilities using the `rustls` backend.
52+ //! * `blocking-https-native` enables [`minreq`], the blocking client with proxy
53+ //! and TLS (SSL) capabilities using the platform's native TLS backend (likely
54+ //! OpenSSL).
55+ //! * `blocking-https-bundled` enables [`minreq`], the blocking client with
56+ //! proxy and TLS (SSL) capabilities using a bundled OpenSSL library backend.
5557//! * `async` enables [`reqwest`], the async client with proxy capabilities.
56- //! * `async-https` enables [`reqwest`], the async client with support for proxying and TLS (SSL)
57- //! using the default [`reqwest`] TLS backend.
58- //! * `async-https-native` enables [`reqwest`], the async client with support for proxying and TLS
59- //! (SSL) using the platform's native TLS backend (likely OpenSSL).
60- //! * `async-https-rustls` enables [`reqwest`], the async client with support for proxying and TLS
61- //! (SSL) using the `rustls` TLS backend.
62- //! * `async-https-rustls-manual-roots` enables [`reqwest`], the async client with support for
63- //! proxying and TLS (SSL) using the ` rustls` TLS backend without using its the default root
64- //! certificates.
65- //!
58+ //! * `async-https` enables [`reqwest`], the async client with support for
59+ //! proxying and TLS (SSL) using the default [`reqwest`] TLS backend.
60+ //! * `async-https-native` enables [`reqwest`], the async client with support
61+ //! for proxying and TLS (SSL) using the platform's native TLS backend (likely
62+ //! OpenSSL).
63+ //! * `async-https-rustls` enables [`reqwest`], the async client with support
64+ //! for proxying and TLS (SSL) using the `rustls` TLS backend.
65+ //! * `async-https- rustls-manual-roots` enables [`reqwest`], the async client
66+ //! with support for proxying and TLS (SSL) using the `rustls` TLS backend
67+ //! without using its the default root certificates.
6668//!
6769
6870#![ allow( clippy:: result_large_err) ]
@@ -89,7 +91,8 @@ pub use r#async::AsyncClient;
8991/// Get a fee value in sats/vbytes from the estimates
9092/// that matches the confirmation target set as parameter.
9193///
92- /// Returns `None` if no feerate estimate is found at or below `target` confirmations.
94+ /// Returns `None` if no feerate estimate is found at or below `target`
95+ /// confirmations.
9396pub fn convert_fee_rate ( target : usize , estimates : HashMap < u16 , f64 > ) -> Option < f32 > {
9497 estimates
9598 . into_iter ( )
@@ -103,11 +106,13 @@ pub struct Builder {
103106 pub base_url : String ,
104107 /// Optional URL of the proxy to use to make requests to the Esplora server
105108 ///
106- /// The string should be formatted as: `<protocol>://<user>:<password>@host:<port>`.
109+ /// The string should be formatted as:
110+ /// `<protocol>://<user>:<password>@host:<port>`.
107111 ///
108- /// Note that the format of this value and the supported protocols change slightly between the
109- /// blocking version of the client (using `minreq`) and the async version (using `reqwest`). For more
110- /// details check with the documentation of the two crates. Both of them are compiled with
112+ /// Note that the format of this value and the supported protocols change
113+ /// slightly between the blocking version of the client (using `minreq`)
114+ /// and the async version (using `reqwest`). For more details check with
115+ /// the documentation of the two crates. Both of them are compiled with
111116 /// the `socks` feature enabled.
112117 ///
113118 /// The proxy is ignored when targeting `wasm32`.
@@ -594,8 +599,8 @@ mod test {
594599 #[ cfg( all( feature = "blocking" , feature = "async" ) ) ]
595600 #[ tokio:: test]
596601 async fn test_get_non_existing_block_status ( ) {
597- // Esplora returns the same status for orphaned blocks as for non-existing blocks:
598- // non-existing: https://blockstream.info/api/block/0000000000000000000000000000000000000000000000000000000000000000/status
602+ // Esplora returns the same status for orphaned blocks as for non-existing
603+ // blocks: non-existing: https://blockstream.info/api/block/0000000000000000000000000000000000000000000000000000000000000000/status
599604 // orphaned: https://blockstream.info/api/block/000000000000000000181b1a2354620f66868a723c0c4d5b24e4be8bdfc35a7f/status
600605 // (Here the block is cited as orphaned: https://bitcoinchain.com/block_explorer/block/000000000000000000181b1a2354620f66868a723c0c4d5b24e4be8bdfc35a7f/ )
601606 // For this reason, we only test for the non-existing case here.
0 commit comments