feat(wasm-utxo): improve transaction parsing with external outputs support#51
Merged
OttoAllmendinger merged 5 commits intomasterfrom Nov 10, 2025
Merged
Conversation
Update tests to expect external outputs in fixtures. The new fixtures contain 3 external outputs, which changes validation expectations and affects spend amount calculations. Issue: BTC-2652 Co-authored-by: llm-git <llm-git@ttll.de>
Update the ParsedInput/Output types to use stronger typing (non-optional address fields) and more explicit null values instead of undefined. Also add test coverage for OP_RETURN outputs in transaction parsing. Issue: BTC-2652 Co-authored-by: llm-git <llm-git@ttll.de>
Adds a new method to BitGoPsbt that allows parsing transaction outputs with wallet keys without requiring valid wallet inputs. This enables identification of which outputs belong to a given wallet, even if the inputs don't belong to the same wallet. The implementation reuses existing parsing logic and adds proper tests that verify outputs can be correctly identified when using different wallet keys. Issue: BTC-2652 Co-authored-by: llm-git <llm-git@ttll.de>
Refactor BitGoPsbt transaction parsing methods to use functional style with map/filter operations for improved readability and error handling. Extract helper methods for summing input and output values to reduce code duplication. Issue: BTC-2652 Co-authored-by: llm-git <llm-git@ttll.de>
Update documentation and implementation to follow a consistent naming convention where: - Rust WASM bindings use snake_case (Rust convention) - TypeScript wrappers convert to camelCase (JS convention) Update BitGoPsbt class implementation to follow this pattern and align method call sites with the new naming. Issue: BTC-2652 Co-authored-by: llm-git <llm-git@ttll.de>
b727900 to
a05e620
Compare
davidkaplanbitgo
approved these changes
Nov 10, 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 updates our UTXO transaction parsing capabilities with several
improvements for handling external outputs and better type definitions:
inputs, enabling identification of outputs belonging to a wallet
new fixtures
fields) and explicit null values
better readability and error handling
duplication
BTC-2652