Skip to content

Conversation

@OttoAllmendinger
Copy link
Contributor

This PR contains several improvements to the abstract-utxo module:

  • Move transaction types to a dedicated file (transaction/types.ts) to
    improve code organization
  • Implement parsing support for legacy transactions in addition to PSBT
  • Update transaction parsing comments related to pay-as-you-go fee logic
  • Handle script recipients correctly in BCH canonicalAddress
  • Add comprehensive PSBT parsing tests
  • Refactor parsePsbt test structure for better reusability

The changes focus on enhancing transaction parsing capabilities while
improving the overall code structure and testability.

Issue: BTC-2732

OttoAllmendinger and others added 6 commits November 17, 2025 16:58
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>
@OttoAllmendinger OttoAllmendinger marked this pull request as ready for review November 18, 2025 09:06
@OttoAllmendinger OttoAllmendinger requested a review from a team as a code owner November 18, 2025 09:06
@OttoAllmendinger OttoAllmendinger merged commit 1923280 into master Nov 18, 2025
14 checks passed
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.

3 participants