Skip to content

feat(abstract-utxo): enhance BIP-322 verification in wasm-utxo#8653

Merged
OttoAllmendinger merged 2 commits intomasterfrom
BTC-0.bip322-fixes
Apr 29, 2026
Merged

feat(abstract-utxo): enhance BIP-322 verification in wasm-utxo#8653
OttoAllmendinger merged 2 commits intomasterfrom
BTC-0.bip322-fixes

Conversation

@OttoAllmendinger
Copy link
Copy Markdown
Contributor

@OttoAllmendinger OttoAllmendinger commented Apr 29, 2026

Extend explainPsbtWasm to count valid signatures per input:

  • Add scriptId to ExplainedInput (from parseTransactionWithWalletKeys)
  • Add signedBy map showing validation status for each key
  • Extract BIP-322 messages with bip322.getBip322Message()

Replace BIP-322 test fixtures with dynamic PSBT generation using
wasm-utxo. Remove fixtures/bip322/fixtures.ts and inline PSBT
construction directly in tests. Call explainPsbtWasm with BitGoPsbt
instances instead of serializing via coin.explainTransaction.

Remove utxolib dependency from BIP-322 tests. Use @bitgo/wasm-utxo
directly for key generation, address creation, and signature
verification. Rewrite p2trMusig2 sighashType test as pure wasm-utxo
round-trip.

Issue: BTC-2650

@OttoAllmendinger OttoAllmendinger changed the title feat(abstract-utxo): enhance BIP-322 verification and bump wasm-utxo feat(abstract-utxo): enhance BIP-322 verification in wasm-utxo Apr 29, 2026
Extend explainPsbtWasm to count valid signatures per input:
- Add scriptId to ExplainedInput (from parseTransactionWithWalletKeys)
- Add signedBy map showing validation status for each key
- Extract BIP-322 messages with bip322.getBip322Message()
- Count signatures via bip322.verifyBip322PsbtInput()

Replace BIP-322 test fixtures with dynamic PSBT generation using
wasm-utxo. Remove fixtures/bip322/fixtures.ts and inline PSBT
construction directly in tests. Call explainPsbtWasm with BitGoPsbt
instances instead of serializing via coin.explainTransaction.

Remove utxolib dependency from BIP-322 tests. Use @bitgo/wasm-utxo
directly for key generation, address creation, and signature
verification. Rewrite p2trMusig2 sighashType test as pure wasm-utxo
round-trip.

Add cross-library compatibility test verifying utxolib-created BIP-322
PSBTs can be signed by wasm-utxo and validated by utxolib.

Issue: BTC-2650

Co-authored-by: llm-git <llm-git@ttll.de>
@OttoAllmendinger OttoAllmendinger marked this pull request as ready for review April 29, 2026 11:45
@OttoAllmendinger OttoAllmendinger requested a review from a team as a code owner April 29, 2026 11:45
@OttoAllmendinger OttoAllmendinger merged commit 98f844b into master Apr 29, 2026
22 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.

2 participants