Skip to content

feat: add get_address_utxos method #134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

luisschwab
Copy link
Member

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.

`get_address_utxos` hits the `/address/{address}/utxo` endpoint
and returns a `Vec<Utxo>`
@luisschwab luisschwab added the enhancement New feature or request label Aug 7, 2025
@coveralls
Copy link

Pull Request Test Coverage Report for Build 16817757977

Details

  • 27 of 27 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 87.216%

Totals Coverage Status
Change from base Build 16626978737: 0.3%
Covered Lines: 1037
Relevant Lines: 1189

💛 - Coveralls

Copy link
Collaborator

@oleonardolima oleonardolima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 +1064 to +1066
assert_ne!(address_utxos_blocking.len(), 0);
assert_ne!(address_utxos_async.len(), 0);
assert_eq!(address_utxos_blocking, address_utxos_async);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also add assertions for each field.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Needs Review
Development

Successfully merging this pull request may close these issues.

feat: /address/:address/utxo
3 participants