feat(abstract-utxo): improve transaction parsing and structure#7539
Merged
OttoAllmendinger merged 6 commits intomasterfrom Nov 18, 2025
Merged
feat(abstract-utxo): improve transaction parsing and structure#7539OttoAllmendinger merged 6 commits intomasterfrom
OttoAllmendinger merged 6 commits intomasterfrom
Conversation
Update the comments about the pay-as-you-go fee logic in the transaction parsing code to indicate that it has become obsolete with the introduction of `utxocore.paygo.verifyPayGoAddressProof()`. Issue: BTC-2732 Co-authored-by: llm-git <llm-git@ttll.de>
Add unit tests for parsePsbt functionality, covering transaction parsing with various recipient configurations. Tests verify proper output classification and spend amount calculations. Issue: BTC-2732 Co-authored-by: llm-git <llm-git@ttll.de>
Add isScriptRecipient check to BCH's canonicalAddress function to properly handle script recipients. Remove redundant implementation from BCHA as it now inherits the corrected functionality from BCH. Issue: BTC-2732 Co-authored-by: llm-git <llm-git@ttll.de>
Refactor transaction-related types out of abstractUtxoCoin.ts into a new transaction/types.ts file. This helps organize code better and reduces coupling between modules. Move BaseOutput, FixedScriptWalletOutput, Output, BaseParsedTransactionOutputs, BaseParsedTransaction, and ParsedTransaction to the new file. Also moved isWalletOutput helper to its relevant module. Issue: BTC-2732 Co-authored-by: llm-git <llm-git@ttll.de>
Simplify test structure by moving explanation creation inside the test helper function, which allows inferring txParams directly from explanation. This avoids passing explanation as a separate parameter and makes tests more self-contained. Issue: BTC-2732 Co-authored-by: llm-git <llm-git@ttll.de>
Implement parsing support for legacy transactions in addition to PSBT format. Add helper function to extract change information from PSBTs for use with legacy transaction parsing. Issue: BTC-2732 Co-authored-by: llm-git <llm-git@ttll.de>
d833292 to
2d36d4e
Compare
davidkaplanbitgo
approved these changes
Nov 18, 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 contains several improvements to the abstract-utxo module:
improve code organization
The changes focus on enhancing transaction parsing capabilities while
improving the overall code structure and testability.
Issue: BTC-2732