Skip to content

Conversation

@OttoAllmendinger
Copy link
Contributor

This PR adds comprehensive PSBT (Partially Signed Bitcoin Transaction)
functionality to the wasm-utxo module, including:

  • New createEmpty static method to initialize empty PSBTs
  • Methods for adding transaction inputs with witness UTXO data
  • Methods for adding transaction outputs with proper derivation info
  • Support for both script path and key path spending
  • Replay protection input handling with P2SH-P2PK scripts
  • Transaction reconstruction from parsed data
  • Version and lockTime property getters
  • Low-level PSBT comparison utilities for testing with detailed error messages
  • Updated derivation path separator in test utils to match TypeScript (using
    periods instead of slashes)

BTC-2893

OttoAllmendinger and others added 4 commits December 18, 2025 17:20
Update the derivation path separator in the test wallet keys function to use
a period (.) instead of a slash (/) to match the TypeScript implementation
in keys.ts.

Issue: BTC-2893

Co-authored-by: llm-git <[email protected]>
Add methods to create empty PSBTs and manipulate them by adding
inputs and outputs. This extends the BitGoPsbt class with:
- `createEmpty` static method to create new PSBTs
- `addInput` method for adding transaction inputs with witness UTXO data
- `addOutput` method for adding transaction outputs

Issue: BTC-2893

Co-authored-by: llm-git <[email protected]>
Add low-level PSBT parsing and comparison utilities that work at the
key-value pair level. These utilities provide detailed error messages
showing exactly which fields differ between two PSBTs, making debugging
test failures much easier.

Issue: BTC-2893

Co-authored-by: llm-git <[email protected]>
Add complete API for PSBT construction with full wallet metadata:
- Add wallet inputs with script path or key path spending
- Add wallet outputs with proper derivation info
- Add replay protection inputs with P2SH-P2PK scripts
- Support transaction reconstruction from parsed data
- Include input sequence number in parsed input data
- Add version and lockTime getters to PSBT class

Issue: BTC-2893

Co-authored-by: llm-git <[email protected]>
@OttoAllmendinger OttoAllmendinger force-pushed the BTC-2893.add-inputs-outputs branch from a4b8411 to e615905 Compare December 18, 2025 16:28
@OttoAllmendinger OttoAllmendinger marked this pull request as ready for review December 18, 2025 17:04
@OttoAllmendinger OttoAllmendinger requested a review from a team as a code owner December 18, 2025 17:04
Copy link
Contributor

@lcovar lcovar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excellent

@OttoAllmendinger OttoAllmendinger merged commit c953971 into master Dec 18, 2025
1 check passed
@OttoAllmendinger OttoAllmendinger deleted the BTC-2893.add-inputs-outputs branch December 18, 2025 19:33
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