feat: add get_address_utxos method#134
Merged
oleonardolima merged 2 commits intobitcoindevkit:masterfrom Aug 22, 2025
Merged
Conversation
`get_address_utxos` hits the `/address/{address}/utxo` endpoint
and returns a `Vec<Utxo>`
Pull Request Test Coverage Report for Build 16817757977Details
💛 - Coveralls |
Collaborator
oleonardolima
left a comment
There was a problem hiding this comment.
tACK 86d3d44
I've tested it with blocking client, and it worked just fine on both happy path, too many histories error and when it's unconfirmed.
Comment on lines
+126
to
+129
| /// Information about an UTXO's status: confirmation status, | ||
| /// confirmation height, confirmation block hash and confirmation block time. | ||
| #[derive(Debug, Copy, Clone, PartialEq, Eq, Deserialize)] | ||
| pub struct UtxoStatus { |
Contributor
There was a problem hiding this comment.
Thanks for adding docs here. Question: isn't this the same as the TxStatus type?
Member
Author
There was a problem hiding this comment.
Indeed, structurally they are the same. But I preferred to create another struct with a name that matches what it models. We could change the name of TxStatus to something generic, but I don't think that's very elegant, since these types are ad-hoc to what the API returns.
ValuedMammal
approved these changes
Aug 20, 2025
chrono-raven6i90
added a commit
to chrono-raven6i90/rust-esplora-client
that referenced
this pull request
Oct 28, 2025
…txos` method
86d3d4473eef0f401f9d5cf840ba15bd1d1090c7 feat(client): add `get_address_utxos()` (Luis Schwab)
3c8b6e3976c0d8b410a4806b47fa3c37c6d0a812 feat(api): create `UtxoStatus` and `Utxo` structs (Luis Schwab)
Pull request description:
Closes #133.
This PR adds the `get_address_utxos` method, which hits the `/address/{addr}/utxo` endpoint, returning a `Vec<Utxo>`.
# Changelog
- Create `UtxoStatus`.
- Create `Utxo`.
- Create `get_address_utxos` for both blocking and async clients.
- Add a functional test for it.
ACKs for top commit:
oleonardolima:
ACK 86d3d4473eef0f401f9d5cf840ba15bd1d1090c7
Tree-SHA512: 9fa3e210be06d47e350d1afe01ab6b5c9173a2504ae769c6af364a1badbeb93034e3d053ebc95a8605030ba87dac264772c0c1a277561671a7a84b9d6a3f628d
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #133.
This PR adds the
get_address_utxosmethod, which hits the/address/{addr}/utxoendpoint, returning aVec<Utxo>.Changelog
UtxoStatus.Utxo.get_address_utxosfor both blocking and async clients.