Skip to content

Conversation

@OttoAllmendinger
Copy link
Contributor

This PR implements several improvements to the transaction format handling
in the abstract-utxo module:

  • Add new 'psbt-lite' format type, a lightweight version of PSBT for
    transaction signing
  • Refactor transaction format decision logic into a dedicated method for
    better maintainability
  • Implement validation of txFormat parameters on testnet networks
  • Update format priority to respect explicitly requested formats
  • Force PSBT format for Bitcoin Testnet hot wallets, while handling Zcash
    separately
  • Force PSBT for testnet Bitcoin by rejecting 'legacy' format and
    defaulting to 'psbt-lite'
  • Add new error classes for handling validation and deprecated formats

Issue: BTC-2732

OttoAllmendinger and others added 5 commits November 12, 2025 14:51
Add a new type to tx format to support psbt-lite, a more lightweight
version of the PSBT format for transaction signing.

Issue: BTC-2732

Co-authored-by: llm-git <[email protected]>
Extract logic to determine transaction format into a dedicated method
to improve readability and maintainability. Now using explicit return
values instead of relying on a boolean evaluation for PSBT format.

Issue: BTC-2732

Co-authored-by: llm-git <[email protected]>
Validate that the txFormat parameter is one of the allowed values
for testnet networks to prevent invalid inputs. Added new utility
function and error class to handle validation.

Issue: BTC-2732

Co-authored-by: llm-git <[email protected]>
Refactor `getTxFormat` method to prioritize explicitly requested txFormat
when provided. Default to PSBT for certain wallet types only when no format
is specified.

Issue: BTC-2732

Co-authored-by: llm-git <[email protected]>
Forces PSBT format for Bitcoin Testnet hot wallets and explicitly handles
Zcash separately. This change maintains legacy format for Zcash while
ensuring all other UTXO-based coins on testnet use PSBT format.

Issue: BTC-2732

Co-authored-by: llm-git <[email protected]>
@OttoAllmendinger OttoAllmendinger changed the title feat(abstract-utxo): enhance transaction format handling with PSBT-lite support feat(abstract-utxo): deprecate 'legacy' txFormat on btc testnets Nov 12, 2025
Force PSBT for testnet Bitcoin by rejecting 'legacy' format and
defaulting to 'psbt-lite' for Bitcoin testnet networks. Add new error
class for deprecated transaction formats.

Issue: BTC-2732

Co-authored-by: llm-git <[email protected]>
@OttoAllmendinger OttoAllmendinger force-pushed the BTC-2732.force-psbt-in-bitcoin-testnet branch from 98e5df1 to 7410da3 Compare November 12, 2025 13:53
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.

2 participants