diff --git a/.github/workflows/cont_integration.yml b/.github/workflows/cont_integration.yml index d85144b..daf274d 100644 --- a/.github/workflows/cont_integration.yml +++ b/.github/workflows/cont_integration.yml @@ -117,3 +117,26 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-features --all-targets -- -D warnings + + docs: + name: Rust Docs + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Install Rust Toolchain + uses: dtolnay/rust-toolchain@v1 + with: + toolchain: stable + - name: Rust Cache + uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-docs-${{ hashFiles('**/Cargo.toml','**/Cargo.lock') }} + - name: Build documentation + run: cargo doc --all-features --no-deps + env: + RUSTDOCFLAGS: -D warnings diff --git a/justfile b/justfile index 164abe4..eebb3e5 100644 --- a/justfile +++ b/justfile @@ -11,11 +11,12 @@ _default: build: cargo build -# Check code: formatting, compilation, linting, and commit signature +# Check code: formatting, compilation, linting, doc comments, and commit signature check: cargo +nightly fmt --all -- --check cargo check --all-features --all-targets cargo clippy --all-features --all-targets -- -D warnings + RUSTDOCFLAGS="-D warnings" cargo doc --all-features --no-deps @[ "$(git log --pretty='format:%G?' -1 HEAD)" = "N" ] && \ echo "\n⚠️ Unsigned commit: BDK requires that commits be signed." || \ true diff --git a/src/api.rs b/src/api.rs index dbae03b..b3cca4d 100644 --- a/src/api.rs +++ b/src/api.rs @@ -1,3 +1,14 @@ +// Bitcoin Dev Kit +// Written in 2020 by Alekos Filini +// +// Copyright (c) 2020-2025 Bitcoin Dev Kit Developers +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license +// , at your option. +// You may not use this file except in accordance with one or both of these +// licenses. + //! Structs from the Esplora API //! //! See: @@ -6,116 +17,157 @@ use bitcoin::hash_types; use serde::Deserialize; pub use bitcoin::consensus::{deserialize, serialize}; +use bitcoin::hash_types::TxMerkleNode; pub use bitcoin::hex::FromHex; pub use bitcoin::{ - absolute, block, transaction, Amount, Block, BlockHash, CompactTarget, OutPoint, Script, - ScriptBuf, ScriptHash, Transaction, TxIn, TxOut, Txid, Weight, Witness, + absolute, block, transaction, Address, Amount, Block, BlockHash, CompactTarget, OutPoint, + Script, ScriptBuf, ScriptHash, Transaction, TxIn, TxOut, Txid, Weight, Witness, }; +/// Information about a previous output. #[derive(Deserialize, Clone, Debug, PartialEq, Eq)] pub struct PrevOut { + /// The value of the previous output, in satoshis. pub value: u64, + /// The ScriptPubKey that the previous output is locked to, as a [`ScriptBuf`]. pub scriptpubkey: ScriptBuf, } +/// Information about an input from a [`Transaction`]. #[derive(Deserialize, Clone, Debug, PartialEq, Eq)] pub struct Vin { + /// The [`Txid`] of the [`Transaction`] that created this [`TxOut`]. pub txid: Txid, + /// The output index of the previous output in the [`Transaction`] that created it. pub vout: u32, - // None if coinbase + /// Information about this [`TxOut`]'s amount and ScriptPubKey. + /// `None` if this is a coinbase output. pub prevout: Option, + /// The ScriptSig that allows spending this [`TxOut`]. pub scriptsig: ScriptBuf, + /// The Witness that allows spending this [`TxOut`], if this is a SegWit output. #[serde(deserialize_with = "deserialize_witness", default)] pub witness: Vec>, + /// The sequence value for this input, used to set RBF and Locktime behavior. pub sequence: u32, + /// Whether this input is a coinbase output. pub is_coinbase: bool, } +/// Information about a [`Transaction`]s output. #[derive(Deserialize, Clone, Debug, PartialEq, Eq)] pub struct Vout { + /// The value of the output, in satoshis. pub value: u64, + /// The ScriptPubKey that the output is locked to, as a [`ScriptBuf`]. pub scriptpubkey: ScriptBuf, } +/// The confirmation status of a [`Transaction`]. #[derive(Deserialize, Clone, Debug, PartialEq, Eq)] pub struct TxStatus { + /// Whether the [`Transaction`] is confirmed or not. pub confirmed: bool, + /// The block height the [`Transaction`] was confirmed in. pub block_height: Option, + /// The [`BlockHash`] of the block the [`Transaction`] was confirmed in. pub block_hash: Option, + /// The time that the block was mined at, as a UNIX timestamp. + /// Note: this timestamp is set by the miner and may not reflect the exact time of mining. pub block_time: Option, } +/// A Merkle inclusion proof for a transaction, given it's [`Txid`]. #[derive(Deserialize, Clone, Debug, PartialEq, Eq)] pub struct MerkleProof { + /// The height of the block the [`Transaction`] was confirmed in. pub block_height: u32, + /// A list of transaction hashes the current hash is paired with, + /// recursively, in order to trace up to obtain the Merkle root of the + /// [`Block`], deepest pairing first. pub merkle: Vec, + /// The 0-based index of the position of the [`Transaction`] in the + /// ordered list of [`Transaction`]s in the [`Block`]. pub pos: usize, } +/// The spend status of a [`TxOut`]. #[derive(Deserialize, Clone, Debug, PartialEq, Eq)] pub struct OutputStatus { + /// Whether the [`TxOut`] is spent or not. pub spent: bool, + /// The [`Txid`] that spent this [`TxOut`]. pub txid: Option, + /// The input index of this [`TxOut`] in the [`Transaction`] that spent it. pub vin: Option, + /// Information about the [`Transaction`] that created this [`TxOut`]. pub status: Option, } +/// Information about a [`Block`]s status. #[derive(Deserialize, Clone, Debug, PartialEq, Eq)] pub struct BlockStatus { + /// Whether this [`Block`] belongs to the chain with the most + /// Proof-of-Work (false for [`Block`]s that belong to a stale chain). pub in_best_chain: bool, + /// The height of this [`Block`]. pub height: Option, + /// The [`BlockHash`] of the [`Block`] that builds on top of this one. pub next_best: Option, } +/// A [`Transaction`] in the format returned by Esplora. #[derive(Deserialize, Clone, Debug, PartialEq, Eq)] pub struct Tx { + /// The [`Txid`] of the [`Transaction`]. pub txid: Txid, + /// The version number of the [`Transaction`]. pub version: i32, + /// The locktime of the [`Transaction`]. + /// Sets a time or height after which the [`Transaction`] can be mined. pub locktime: u32, + /// The array of inputs in the [`Transaction`]. pub vin: Vec, + /// The array of outputs in the [`Transaction`]. pub vout: Vec, - /// Transaction size in raw bytes (NOT virtual bytes). + /// The [`Transaction`] size in raw bytes (NOT virtual bytes). pub size: usize, - /// Transaction weight units. + /// The [`Transaction`]'s weight units. pub weight: u64, + /// The confirmation status of the [`Transaction`]. pub status: TxStatus, + /// The fee amount paid by the [`Transaction`], in satoshis. pub fee: u64, } -#[derive(Deserialize, Clone, Debug, PartialEq, Eq)] -pub struct BlockTime { - pub timestamp: u64, - pub height: u32, -} - /// Information about a bitcoin [`Block`]. #[derive(Debug, Clone, Deserialize)] pub struct BlockInfo { - /// The block's [`BlockHash`]. + /// The [`Block`]'s [`BlockHash`]. pub id: BlockHash, - /// The block's height. + /// The [`Block`]'s height. pub height: u32, - /// The block's version. + /// The [`Block`]'s version. pub version: block::Version, - /// The block's timestamp. + /// The [`Block`]'s UNIX timestamp. pub timestamp: u64, - /// The block's transaction count. + /// The [`Block`]'s [`Transaction`] count. pub tx_count: u64, - /// The block's size, in bytes. + /// The [`Block`]'s size, in bytes. pub size: usize, - /// The block's weight. + /// The [`Block`]'s weight. pub weight: u64, - /// The merkle root of the transactions in the block. + /// The Merkle root of the transactions in the block. pub merkle_root: hash_types::TxMerkleNode, - /// The [`BlockHash`] of the previous block (`None` for the genesis block). + /// The [`BlockHash`] of the previous [`Block`] (`None` for the genesis block). pub previousblockhash: Option, - /// The block's MTP (Median Time Past). + /// The [`Block`]'s MTP (Median Time Past). pub mediantime: u64, - /// The block's nonce value. + /// The [`Block`]'s nonce value. pub nonce: u32, - /// The block's `bits` value as a [`CompactTarget`]. + /// The [`Block`]'s `bits` value as a [`CompactTarget`]. pub bits: CompactTarget, - /// The block's difficulty target value. + /// The [`Block`]'s difficulty target value. pub difficulty: f64, } @@ -141,94 +193,107 @@ impl PartialEq for BlockInfo { } impl Eq for BlockInfo {} +/// Time-related information about a [`Block`]. +#[derive(Deserialize, Clone, Debug, PartialEq, Eq)] +pub struct BlockTime { + /// The [`Block`]'s timestamp. + pub timestamp: u64, + /// The [`Block`]'s height. + pub height: u32, +} + +/// Summary about a [`Block`]. #[derive(Debug, Clone, Deserialize, PartialEq, Eq)] pub struct BlockSummary { + /// The [`Block`]'s hash. pub id: BlockHash, + /// The [`Block`]'s timestamp and height. #[serde(flatten)] pub time: BlockTime, - /// Hash of the previous block, will be `None` for the genesis block. - pub previousblockhash: Option, - pub merkle_root: bitcoin::hash_types::TxMerkleNode, + /// The [`BlockHash`] of the previous [`Block`] (`None` for the genesis [`Block`]). + pub previousblockhash: Option, + /// The Merkle root of the [`Block`]'s [`Transaction`]'s. + pub merkle_root: TxMerkleNode, } -/// Address statistics, includes the address, and the utxo information for the address. +/// Statistics about an [`Address`]. #[derive(Debug, Clone, Deserialize, PartialEq, Eq)] pub struct AddressStats { - /// The address. + /// The [`Address`]. pub address: String, - /// The summary of transactions for this address, already on chain. + /// The summary of confirmed [`Transaction`]s for this [`Address`]. pub chain_stats: AddressTxsSummary, - /// The summary of transactions for this address, currently in the mempool. + /// The summary of mempool [`Transaction`]s for this [`Address`]. pub mempool_stats: AddressTxsSummary, } -/// Contains a summary of the transactions for an address. +/// A summary of [`Transaction`]s which an [`Address`] was involved. #[derive(Debug, Copy, Clone, PartialEq, Eq, Deserialize)] pub struct AddressTxsSummary { - /// The number of funded transaction outputs. + /// The number of funded [`TxOut`]s. pub funded_txo_count: u32, - /// The sum of the funded transaction outputs, in satoshis. + /// The sum of the funded [`TxOut`]s, in satoshis. pub funded_txo_sum: u64, - /// The number of spent transaction outputs. + /// The number of spent [`TxOut`]s. pub spent_txo_count: u32, - /// The sum of the spent transaction outputs, in satoshis. + /// The sum of the spent [`TxOut`]s, in satoshis. pub spent_txo_sum: u64, - /// The total number of transactions. + /// The total number of [`Transaction`]s. pub tx_count: u32, } /// Statistics about a particular [`Script`] hash's confirmed and mempool transactions. #[derive(Debug, Copy, Clone, PartialEq, Eq, Deserialize)] pub struct ScriptHashStats { - /// The summary of confirmed transactions for this [`Script`] hash. + /// The summary of confirmed [`Transaction`]s for this [`Script`] hash. pub chain_stats: ScriptHashTxsSummary, - /// The summary of mempool transactions for this [`Script`] hash. + /// The summary of mempool [`Transaction`]s for this [`Script`] hash. pub mempool_stats: ScriptHashTxsSummary, } -/// Contains a summary of the transactions for a particular [`Script`] hash. +/// Contains a summary of the [`Transaction`]s for a particular [`Script`] hash. pub type ScriptHashTxsSummary = AddressTxsSummary; -/// Information about an UTXO's status: confirmation status, +/// Information about a [`TxOut`]'s status: confirmation status, /// confirmation height, confirmation block hash and confirmation block time. #[derive(Debug, Copy, Clone, PartialEq, Eq, Deserialize)] pub struct UtxoStatus { - /// Whether or not the UTXO is confirmed. + /// Whether or not the [`TxOut`] is confirmed. pub confirmed: bool, - /// The block height in which the UTXO was confirmed. + /// The block height in which the [`TxOut`] was confirmed. pub block_height: Option, - /// The block hash in which the UTXO was confirmed. + /// The block hash in which the [`TxOut`] was confirmed. pub block_hash: Option, - /// The UNIX timestamp in which the UTXO was confirmed. + /// The UNIX timestamp in which the [`TxOut`] was confirmed. pub block_time: Option, } -/// Information about an UTXO's outpoint, confirmation status and value. +/// Information about an [`TxOut`]'s outpoint, confirmation status and value. #[derive(Debug, Copy, Clone, PartialEq, Eq, Deserialize)] pub struct Utxo { - /// The [`Txid`] of the transaction that created the UTXO. + /// The [`Txid`] of the [`Transaction`] that created the [`TxOut`]. pub txid: Txid, - /// The output index of the UTXO on the transaction that created the it. + /// The output index of the [`TxOut`] in the [`Transaction`] that created the it. pub vout: u32, - /// The confirmation status of the UTXO. + /// The confirmation status of the [`TxOut`]. pub status: UtxoStatus, - /// The value of the UTXO as an [`Amount`]. + /// The value of the [`TxOut`] as an [`Amount`]. pub value: Amount, } /// Statistics about the mempool. #[derive(Clone, Debug, PartialEq, Deserialize)] pub struct MempoolStats { - /// The number of transactions in the mempool. + /// The number of [`Transaction`]s in the mempool. pub count: usize, - /// The total size of mempool transactions in virtual bytes. + /// The total size of mempool [`Transaction`]s, in virtual bytes. pub vsize: usize, - /// The total fee paid by mempool transactions, in sats. + /// The total fee paid by mempool [`Transaction`]s, in satoshis. pub total_fee: u64, /// The mempool's fee rate distribution histogram. /// /// An array of `(feerate, vsize)` tuples, where each entry's `vsize` is the total vsize - /// of transactions paying more than `feerate` but less than the previous entry's `feerate` + /// of [`Transaction`]s paying more than `feerate` but less than the previous entry's `feerate` /// (except for the first entry, which has no upper bound). pub fee_histogram: Vec<(f64, usize)>, } @@ -236,17 +301,19 @@ pub struct MempoolStats { /// A [`Transaction`] that recently entered the mempool. #[derive(Clone, Debug, PartialEq, Eq, Deserialize)] pub struct MempoolRecentTx { - /// Transaction ID as a [`Txid`]. + /// The [`Transaction`]'s ID, as a [`Txid`]. pub txid: Txid, - /// [`Amount`] of fees paid by the transaction, in satoshis. + /// The [`Amount`] of fees paid by the transaction, in satoshis. pub fee: u64, - /// The transaction size, in virtual bytes. + /// The [`Transaction`]'s size, in virtual bytes. pub vsize: usize, - /// Combined [`Amount`] of the transaction, in satoshis. + /// Combined [`Amount`] of the [`Transaction`], in satoshis. pub value: u64, } impl Tx { + /// Convert a transaction from the format returned by Esplora into a `rust-bitcoin` + /// [`Transaction`]. pub fn to_tx(&self) -> Transaction { Transaction { version: transaction::Version::non_standard(self.version), @@ -277,6 +344,7 @@ impl Tx { } } + /// Get the confirmation time from a [`Tx`]. pub fn confirmation_time(&self) -> Option { match self.status { TxStatus { @@ -289,6 +357,7 @@ impl Tx { } } + /// Get a list of the [`Tx`]'s previous outputs. pub fn previous_outputs(&self) -> Vec> { self.vin .iter() @@ -302,10 +371,12 @@ impl Tx { .collect() } + /// Get the weight of a [`Tx`]. pub fn weight(&self) -> Weight { Weight::from_wu(self.weight) } + /// Get the fee paid by a [`Tx`]. pub fn fee(&self) -> Amount { Amount::from_sat(self.fee) } diff --git a/src/async.rs b/src/async.rs index 91a64a8..ee8c95a 100644 --- a/src/async.rs +++ b/src/async.rs @@ -1,7 +1,7 @@ // Bitcoin Dev Kit // Written in 2020 by Alekos Filini // -// Copyright (c) 2020-2021 Bitcoin Dev Kit Developers +// Copyright (c) 2020-2025 Bitcoin Dev Kit Developers // // This file is licensed under the Apache License, Version 2.0 or the MIT license @@ -14,6 +14,7 @@ use std::collections::HashMap; use std::marker::PhantomData; use std::str::FromStr; +use std::time::Duration; use bitcoin::block::Header as BlockHeader; use bitcoin::consensus::{deserialize, serialize, Decodable, Encodable}; @@ -32,6 +33,7 @@ use crate::{ BASE_BACKOFF_MILLIS, RETRYABLE_ERROR_CODES, }; +/// An async client for interacting with an Esplora API server. #[derive(Debug, Clone)] pub struct AsyncClient { /// The URL of the Esplora Server. @@ -40,13 +42,12 @@ pub struct AsyncClient { client: Client, /// Number of times to retry a request max_retries: usize, - /// Marker for the type of sleeper used marker: PhantomData, } impl AsyncClient { - /// Build an async client from a builder + /// Build an [`AsyncClient`] from a [`Builder`]. pub fn from_builder(builder: Builder) -> Result { let mut client_builder = Client::builder(); @@ -80,6 +81,7 @@ impl AsyncClient { }) } + /// Build an [`AsyncClient`] from a [`Client`]. pub fn from_client(url: String, client: Client) -> Self { AsyncClient { url, @@ -308,12 +310,12 @@ impl AsyncClient { self.get_response_json(&format!("/tx/{txid}/status")).await } - /// Get transaction info given it's [`Txid`]. + /// Get transaction info given its [`Txid`]. pub async fn get_tx_info(&self, txid: &Txid) -> Result, Error> { self.get_opt_response_json(&format!("/tx/{txid}")).await } - /// Get the spend status of a [`Transaction`]'s outputs, given it's [`Txid`]. + /// Get the spend status of a [`Transaction`]'s outputs, given its [`Txid`]. pub async fn get_tx_outspends(&self, txid: &Txid) -> Result, Error> { self.get_response_json(&format!("/tx/{txid}/outspends")) .await @@ -458,7 +460,7 @@ impl AsyncClient { self.get_response_json("/mempool").await } - // Get a list of the last 10 [`Transaction`]s to enter the mempool. + /// Get a list of the last 10 [`Transaction`]s to enter the mempool. pub async fn get_mempool_recent_txs(&self) -> Result, Error> { self.get_response_json("/mempool/recent").await } @@ -470,13 +472,13 @@ impl AsyncClient { self.get_response_json("/mempool/txids").await } - /// Get an map where the key is the confirmation target (in number of + /// Get a map where the key is the confirmation target (in number of /// blocks) and the value is the estimated feerate (in sat/vB). pub async fn get_fee_estimates(&self) -> Result, Error> { self.get_response_json("/fee-estimates").await } - /// Get a summary about a [`Block`], given it's [`BlockHash`]. + /// Get a summary about a [`Block`], given its [`BlockHash`]. pub async fn get_block_info(&self, blockhash: &BlockHash) -> Result { let path = format!("/block/{blockhash}"); @@ -490,7 +492,7 @@ impl AsyncClient { self.get_response_json(&path).await } - /// Get up to 25 [`Transaction`]s from a [`Block`], given it's [`BlockHash`], + /// Get up to 25 [`Transaction`]s from a [`Block`], given its [`BlockHash`], /// beginning at `start_index` (starts from 0 if `start_index` is `None`). /// /// The `start_index` value MUST be a multiple of 25, @@ -573,11 +575,15 @@ fn is_status_retryable(status: reqwest::StatusCode) -> bool { RETRYABLE_ERROR_CODES.contains(&status.as_u16()) } +/// Sleeper trait that allows any async runtime to be used. pub trait Sleeper: 'static { + /// The `Future` type returned by the sleep function. type Sleep: std::future::Future; - fn sleep(dur: std::time::Duration) -> Self::Sleep; + /// Create a `Future` that completes after the specified [`Duration`]. + fn sleep(dur: Duration) -> Self::Sleep; } +/// The default `Sleeper` implementation using the underlying async runtime. #[derive(Debug, Clone, Copy)] pub struct DefaultSleeper; diff --git a/src/blocking.rs b/src/blocking.rs index ed1e828..3ec0aae 100644 --- a/src/blocking.rs +++ b/src/blocking.rs @@ -1,7 +1,7 @@ // Bitcoin Dev Kit // Written in 2020 by Alekos Filini // -// Copyright (c) 2020-2021 Bitcoin Dev Kit Developers +// Copyright (c) 2020-2025 Bitcoin Dev Kit Developers // // This file is licensed under the Apache License, Version 2.0 or the MIT license @@ -33,6 +33,7 @@ use crate::{ BASE_BACKOFF_MILLIS, RETRYABLE_ERROR_CODES, }; +/// A blocking client for interacting with an Esplora API server. #[derive(Debug, Clone)] pub struct BlockingClient { /// The URL of the Esplora server. @@ -222,17 +223,17 @@ impl BlockingClient { self.get_response_json(&format!("/tx/{txid}/status")) } - /// Get transaction info given it's [`Txid`]. + /// Get transaction info given its [`Txid`]. pub fn get_tx_info(&self, txid: &Txid) -> Result, Error> { self.get_opt_response_json(&format!("/tx/{txid}")) } - /// Get the spend status of a [`Transaction`]'s outputs, given it's [`Txid`]. + /// Get the spend status of a [`Transaction`]'s outputs, given its [`Txid`]. pub fn get_tx_outspends(&self, txid: &Txid) -> Result, Error> { self.get_response_json(&format!("/tx/{txid}/outspends")) } - /// Get a [`BlockHeader`] given a particular block hash. + /// Get a [`BlockHeader`] given a particular [`BlockHash`]. pub fn get_header_by_hash(&self, block_hash: &BlockHash) -> Result { self.get_response_hex(&format!("/block/{block_hash}/header")) } @@ -321,7 +322,7 @@ impl BlockingClient { self.get_response_json("/mempool") } - // Get a list of the last 10 [`Transaction`]s to enter the mempool. + /// Get a list of the last 10 [`Transaction`]s to enter the mempool. pub fn get_mempool_recent_txs(&self) -> Result, Error> { self.get_response_json("/mempool/recent") } @@ -333,7 +334,7 @@ impl BlockingClient { self.get_response_json("/mempool/txids") } - /// Get an map where the key is the confirmation target (in number of + /// Get a map where the key is the confirmation target (in number of /// blocks) and the value is the estimated feerate (in sat/vB). pub fn get_fee_estimates(&self) -> Result, Error> { self.get_response_json("/fee-estimates") @@ -404,7 +405,7 @@ impl BlockingClient { self.get_response_json(&path) } - /// Get a summary about a [`Block`], given it's [`BlockHash`]. + /// Get a summary about a [`Block`], given its [`BlockHash`]. pub fn get_block_info(&self, blockhash: &BlockHash) -> Result { let path = format!("/block/{blockhash}"); @@ -418,7 +419,7 @@ impl BlockingClient { self.get_response_json(&path) } - /// Get up to 25 [`Transaction`]s from a [`Block`], given it's [`BlockHash`], + /// Get up to 25 [`Transaction`]s from a [`Block`], given its [`BlockHash`], /// beginning at `start_index` (starts from 0 if `start_index` is `None`). /// /// The `start_index` value MUST be a multiple of 25, diff --git a/src/lib.rs b/src/lib.rs index 1e9b0ed..d5bb38c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -61,13 +61,14 @@ //! * `async-https-rustls` enables [`reqwest`], the async client with support for proxying and TLS //! (SSL) using the `rustls` TLS backend. //! * `async-https-rustls-manual-roots` enables [`reqwest`], the async client with support for -//! proxying and TLS (SSL) using the `rustls` TLS backend without using its the default root +//! proxying and TLS (SSL) using the `rustls` TLS backend without using the default root //! certificates. //! //! [`dont remove this line or cargo doc will break`]: https://example.com #![cfg_attr(not(feature = "minreq"), doc = "[`minreq`]: https://docs.rs/minreq")] #![cfg_attr(not(feature = "reqwest"), doc = "[`reqwest`]: https://docs.rs/reqwest")] #![allow(clippy::result_large_err)] +#![warn(missing_docs)] use std::collections::HashMap; use std::fmt; @@ -115,6 +116,7 @@ pub fn convert_fee_rate(target: usize, estimates: HashMap) -> Option