Skip to content

Conversation

@lserra-iov
Copy link
Contributor

@lserra-iov lserra-iov requested a review from Copilot November 19, 2025 19:32
@github-actions
Copy link

github-actions bot commented Nov 19, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new public method getAvailableUtxos to the PowPegSDK class that allows users to query unspent transaction outputs (UTXOs) for Bitcoin addresses with validation.

Key Changes:

  • Added getAvailableUtxos method with address validation
  • Refactored internal getUtxos method to support both string and AddressWithDetails inputs
  • Created new InvalidAddressError class for address validation failures

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/sdk/powpeg.ts Added getAvailableUtxos public method and refactored private getUtxos to accept string arrays; renamed bitcoinJsNetwork to btcNetworkConfig
src/sdk/powpeg.test.ts Added comprehensive test coverage for getAvailableUtxos including valid/invalid address scenarios
src/index.ts Exported errors module to make InvalidAddressError publicly available
src/errors.ts Created new InvalidAddressError class with customizable message and invalid addresses tracking
src/constants.ts Added isBtcAddress validation function to network configurations

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

alexjavabraz
alexjavabraz previously approved these changes Nov 19, 2025
annipi
annipi previously approved these changes Nov 19, 2025
Copy link
Collaborator

@annipi annipi left a comment

Choose a reason for hiding this comment

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

LGTM!

@lserra-iov lserra-iov dismissed stale reviews from annipi and alexjavabraz via 1853401 December 9, 2025 16:32
@lserra-iov lserra-iov requested a review from a team as a code owner December 9, 2025 16:32
@lserra-iov lserra-iov changed the title Add getAvailableUtxos UTXO selection Dec 9, 2025
@lserra-iov lserra-iov force-pushed the feat/get-available-utxos branch from 1853401 to 1a94e1c Compare December 9, 2025 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants