Refactor API and clean up house#157
Refactor API and clean up house#157luisschwab wants to merge 12 commits intobitcoindevkit:masterfrom
Conversation
1872024 to
dbbe555
Compare
Pull Request Test Coverage Report for Build 22006096792Details
💛 - Coveralls |
BlockSummary and PrevOut, rename scripthash_txs to get_scripthash_txsBlockSummary and PrevOut, rename scripthash_txs to get_scripthash_txs
oleonardolima
left a comment
There was a problem hiding this comment.
utACK eccf30d
I'm also wondering on how disruptive it'll be on downstream, see VM's comment, though it'll be in a major release.
|
Makes sense. We can remove the deprecated function on v14. |
eccf30d to
530ebea
Compare
BlockSummary and PrevOut, rename scripthash_txs to get_scripthash_txs|
I'll rebase this one since we decided to deprecate |
Removes `BlockSummary`, as it omitted information returned by Esplora. This removes `get_blocks` and adds `get_block_infos` (`get_blocks` was deprecated in v0.12.3).
The `PrevOut` struct is identical to `Vout`.
530ebea to
35c42b7
Compare
f2a2a16 to
8337a89
Compare
|
Pushed 8337a89 completing the work. It's a big one, but mostly documentation and moving things around. |
8337a89 to
ab5ea70
Compare
This commit: - Renames `Tx` to `EsploraTx`: more explicit. `Tx` is not precise about what it is. - Remove `EsploraTx::fee`, since the field is already public. - Implements `From<EsploraTx>`/`From<&EsploraTx>` to `Transaction` conversions. - Reorders structs into logical groups: Transaction, Block, Address, ScriptHash, UTXO, and Mempool. - Improves documentation. - Updates copyright notice to `2020-2026`.
This commit:
- Reorders methods into logical groups: transaction, block, address,
script hash, and mempool.
- Improves documentation throughout: clearer summaries, consistent
style, and proper intra-doc links.
- Moves `Sleeper`, `DefaultSleeper`, and `is_status_retryable` to the
top of the file for better readability.
- Updates return types from `Tx` to `EsploraTx` following the rename.
- Removes unused `log` imports.
- Updates copyright notice to `2020-2026`.
This commit: - Changes `get_fee_estimates` to return `HashMap<u16, FeeRate>` instead of `HashMap<u16, f64>`. - Changes `convert_fee_rate` to accept `HashMap<u16, FeeRate>` and return `Option<FeeRate>` instead of `Option<f32>`. - Adds `sat_per_vbyte_to_feerate` to `api.rs` to convert the raw `f64` sat/vbyte values returned by the Esplora API into `FeeRate`. - Updates the `feerate_parsing` test accordingly.
This commit:
- Rewrites crate-level docs:
- Cleaner structure
- Usage examples for async and blocking clients
- Feature table instead of a bullet list
- Improves `Builder` documentation
- Improves `Error` documentation
- Replaces `std::` with `core::` where applicable
- Updates copyright notice to `2020-2026`
ab5ea70 to
fe686f0
Compare
Re-add with a deprecation warning. These should be removed for the v0.14.0 release.
Only casting to `u64` would always round down. Rounding (`.round()`) and then casting to `u64` is more precise. Also updates the fee JSON on `test_feerate_parsing` with current values which include sub-1 sat fees: ``` curl https://mempool.space/api/fee-estimates | jq 'to_entries | sort_by(.key | tonumber) | from_entries' ```
|
I suggest reserving the "chore" label for tasks related to repo maintenance, not API or behavior changes. And changing the commits to |
Closes #142.
Closes #146.
Closes #148.
Closes #150.
This PR does a bunch of cleanup, standardizes and adds missing documentation, fixes inconsistencies and redundancies in the API, and uses
rust-bitcointypes where possible.Changelog