-
Notifications
You must be signed in to change notification settings - Fork 0
UTXO selection #80
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
base: main
Are you sure you want to change the base?
UTXO selection #80
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this 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
getAvailableUtxosmethod with address validation - Refactored internal
getUtxosmethod to support both string andAddressWithDetailsinputs - Created new
InvalidAddressErrorclass 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.
annipi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Leverages existing logic to add support for non-native pegin PSBT creation
1853401 to
1a94e1c
Compare
SUP-339