Skip to content

Conversation

@OttoAllmendinger
Copy link
Contributor

This PR adds several enhancements to PSBT (Partially Signed Bitcoin
Transaction) functionality in utxo-lib:

  • Add tests for PSBTs without nonWitnessUtxo
  • Include extracted transaction data in psbt-lite fixtures
  • Add finalized input data to PSBT fixtures for better debugging
  • Add helper methods for handling proprietary keyvalues in PSBTs
  • Add structured musig2 data to fixtures for improved accessibility
  • Include serialized finalized PSBT in test fixtures
  • Add support for external wallet outputs and OP_RETURN outputs in PSBTs
  • Expose function to create wallet keys from custom seeds

These improvements enhance the test infrastructure and provide better
support for working with various PSBT scenarios.

Issue: BTC-2652, BTC-2742

OttoAllmendinger and others added 7 commits November 10, 2025 14:26
Add clonePsbtWithoutNonWitnessUtxo function to tests and run test
fixtures in both normal and 'lite' mode (without nonWitnessUtxo).

Issue: BTC-2652

Co-authored-by: llm-git <llm-git@ttll.de>
When a transaction is fully signed, include the extracted transaction in the
fixture data for testing and reference purposes.

Issue: BTC-2652

Co-authored-by: llm-git <llm-git@ttll.de>
Add `psbtInputsFinalized` property to PSBT fixtures that shows the state
of inputs after finalization but before extraction to a raw transaction.
This will help with debugging and testing PSBT finalization.

Issue: BTC-2652

Co-authored-by: llm-git <llm-git@ttll.de>
Add standalone utility functions to handle proprietary keyvalues in PSBT, making
them usable even without access to the PSBT methods. These helpers support the
getting, adding, updating, and deleting of proprietary keyvalues from unknown
keyvalues arrays.

Issue: BTC-2652

Co-authored-by: llm-git <llm-git@ttll.de>
Add fields for musig2Participants, musig2Nonces, and musig2PartialSigs to
PSBT fixtures that makes the data structure more accessible and easier to
understand compared to the raw key-value pairs.

Issue: BTC-2652

Co-authored-by: llm-git <llm-git@ttll.de>
Include finalized PSBT in base64 format in test fixtures when available
to help with debugging and verification.

Issue: BTC-2742

Co-authored-by: llm-git <llm-git@ttll.de>
Add option to disable derivation info on outputs, allowing creation
of external wallet outputs in PSBTs. Also add support for creating
OP_RETURN outputs in test utilities and expose a function to create
wallet keys from custom seeds.

Issue: BTC-2742

Co-authored-by: llm-git <llm-git@ttll.de>
@OttoAllmendinger OttoAllmendinger marked this pull request as ready for review November 10, 2025 16:41
@OttoAllmendinger OttoAllmendinger requested a review from a team as a code owner November 10, 2025 16:41
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 86b44b1 into master Nov 11, 2025
13 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