Skip to content

Conversation

@OttoAllmendinger
Copy link
Contributor

@OttoAllmendinger OttoAllmendinger commented Dec 5, 2025

This PR adds comprehensive support for wasm-utxo based PSBT handling and
transaction functions to the abstract-utxo module:

  • Add encodeTransaction helper function to convert transactions to Buffer
  • Extend DecodedTransaction to include wasm-utxo BitGoPsbt
  • Support wasm-utxo PSBTs in the getMusig2Nonces method
  • Enable signing PSBTs with wasm implementation
  • Add PSBT decoder selection capability with the decodeWith parameter
  • Update test suite to verify wasm-utxo transaction decoding

These changes enable compatibility between different PSBT implementations
and provide flexibility in choosing the appropriate decoder based on
requirements.

We use wasm-utxo in the case that the /tx/build route replies with a property "decodeWith": "utxo-wasm"

Issue: BTC-2806

OttoAllmendinger and others added 6 commits December 5, 2025 13:04
Add helper function to convert various transaction types to a Buffer

Issue: BTC-2806

Co-authored-by: llm-git <llm-git@ttll.de>
Support wasm-utxo based fixed script wallet PSBTs in the
getMusig2Nonces method by implementing Musig2Participant for both PSBT
types.

Issue: BTC-2806

Co-authored-by: llm-git <llm-git@ttll.de>
Update signTransaction to support wasm PSBT signing. Return Buffer instead of
Uint8Array for extracted transactions. Fix type signatures and parameter
structure in signPsbtWithMusig2ParticipantWasm to match other implementations.

Issue: BTC-2806

Co-authored-by: llm-git <llm-git@ttll.de>
…itGoPsbt

Issue: BTC-2806

Co-authored-by: llm-git <llm-git@ttll.de>
Add decodeWith parameter to specify which PSBT decoder to use
(utxolib or wasm-utxo). This allows switching between implementations
when needed, which is important for compatibility and testing.

Also add a helper function to validate decoder selection.

Issue: BTC-2806

Co-authored-by: llm-git <llm-git@ttll.de>
Add test scenarios that verify wasm-utxo as a transaction decoding backend.
Rework test suite structure for better readability and clearer test naming.
Skip tests for networks not supported by wasm-utxo.

Issue: BTC-2806

Co-authored-by: llm-git <llm-git@ttll.de>
@OttoAllmendinger OttoAllmendinger marked this pull request as ready for review December 5, 2025 12:48
@OttoAllmendinger OttoAllmendinger requested a review from a team as a code owner December 5, 2025 12:48
@OttoAllmendinger OttoAllmendinger merged commit 0fba61c into master Dec 5, 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