feat(utxo-lib,abstract-utxo): enhance PSBT testing and transaction explanation utilities#7478
Merged
OttoAllmendinger merged 8 commits intomasterfrom Nov 11, 2025
Merged
Conversation
Add a test to ensure PSBTs can be serialized to buffer and back without any loss of information. Issue: BTC-2732 Co-authored-by: llm-git <llm-git@ttll.de>
Creates a utility class for testing that generates PSBTs with all supported input and output types for a given network. The AcidTest class can create PSBTs with: - All wallet script types supported by the network - p2shP2pk inputs (for replay protection) - Various output types including those from another wallet - OP_RETURN outputs Refactors existing tests to use this utility, making them more comprehensive and maintainable. Issue: BTC-2732 Co-authored-by: llm-git <llm-git@ttll.de>
…ions Split the combined test file into two separate files - one for PSBT operations and another for legacy transaction signing and verification. Issue: BTC-2732 Co-authored-by: llm-git <llm-git@ttll.de>
Adds a utility function to generate a comprehensive test suite for PSBT functionality across networks, sign stages, and tx formats. Improves test organization by using const arrays and type refinements, and adds a name getter to AcidTest for better test reporting. Issue: BTC-2732 Co-authored-by: llm-git <llm-git@ttll.de>
Add unit test for the explainPsbt utility function using AcidTest framework from utxo-lib. Tests ensure that transaction explanations correctly include output amounts, change outputs, and signature counts across different signing stages. Issue: BTC-2732 Co-authored-by: llm-git <llm-git@ttll.de>
Extracted helper functions from the main explainPsbt function to improve readability and maintainability. Updated getRootWalletKeys to properly handle RootWalletKeys instances and added proper typing throughout the codebase. Issue: BTC-2732 Co-authored-by: llm-git <llm-git@ttll.de>
Simplify the explainPsbt function by removing unnecessary type parameters since the types can be inferred from the UtxoPsbt. Issue: BG-59313 Co-authored-by: llm-git <llm-git@ttll.de>
Adjust TransactionExplanation interface to allow for undefined locktime and parameterized fee type to support both string and undefined return types. This change helps with different use cases across the codebase. Issue: BTC-2732 Co-authored-by: llm-git <llm-git@ttll.de>
3c6d2f1 to
0912ec0
Compare
davidkaplanbitgo
approved these changes
Nov 11, 2025
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.
This PR adds comprehensive PSBT testing capabilities and refines transaction
explanation utilities across the codebase:
PSBT Testing Enhancements
input/output types and networks
Transaction Explanation Improvements
Type System Improvements
BTC-2732, BG-59313