Skip to content

test(wasm-utxo): remove utxo-lib dependencies from fixed-script tests#169

Draft
OttoAllmendinger wants to merge 1 commit intomasterfrom
BTC-3047.de-utxolib-tests
Draft

test(wasm-utxo): remove utxo-lib dependencies from fixed-script tests#169
OttoAllmendinger wants to merge 1 commit intomasterfrom
BTC-3047.de-utxolib-tests

Conversation

@OttoAllmendinger
Copy link
Contributor

Remove utxo-lib dependencies from fixed-script PSBT tests and
implement fixture auto-generation. Tests now generate fixtures
on-demand when missing, ensuring consistency across all signature
states (unsigned, halfsigned, fullsigned).

Changes:

  • Implement fixture generation in generateFixture.ts
  • Update fixtureUtil to auto-generate missing fixtures
  • Remove utxo-lib network references, use NetworkName type
  • Remove txid validation against utxo-lib
  • Remove OP_RETURN output construction via utxo-lib
  • Update all test files to use async fixture loading
  • Switch to format validation for txids instead of
    cross-library checks

Issue: BTC-3047
Co-authored-by: llm-git llm-git@ttll.de

@OttoAllmendinger OttoAllmendinger force-pushed the BTC-3047.de-utxolib-tests branch 3 times, most recently from b81f07a to 0589ab8 Compare February 24, 2026 14:53
@OttoAllmendinger OttoAllmendinger force-pushed the BTC-3047.de-utxolib-tests branch 4 times, most recently from 29d0f6d to 35769a8 Compare March 5, 2026 11:09
Remove utxo-lib dependencies from fixed-script PSBT tests and implement
fixture auto-generation. Tests now generate fixtures on-demand when
missing, ensuring consistency across all signature states (unsigned,
halfsigned, fullsigned).

Changes:
- Implement fixture generation in generateFixture.ts
- Update fixtureUtil to auto-generate missing fixtures
- Remove utxo-lib network references, use NetworkName type
- Remove txid validation against utxo-lib
- Remove OP_RETURN output construction via utxo-lib
- Update all test files to use async fixture loading
- Switch to format validation for txids instead of cross-library checks

Issue: BTC-3047
Co-authored-by: llm-git <llm-git@ttll.de>

feat(wasm-utxo): attach non_witness_utxo to PSBT inputs in AcidTest

Use the new Transaction builder to construct a fake previous transaction
for each input when txFormat is "psbt", populating non_witness_utxo.

refactor(wasm-utxo): make txFormat a parameter in fixture generation

Accept txFormat in generateAllStates() and loadPsbtFixture() instead of
hardcoding "psbt-lite", enabling generation of both psbt and psbt-lite
fixtures from the same infrastructure.

test(wasm-utxo): run fixed-script tests across both psbt and psbt-lite formats

Iterate over txFormats in parseTransactionWithWalletKeys and
signAndVerifySignature, skipping psbt for zcash which doesn't support
non_witness_utxo.

update fixtures

test(wasm-utxo): add psbt-format fixtures for all 7 coins

Generate unsigned/halfsigned/fullsigned PSBT fixtures (with
non_witness_utxo) for bitcoin, bitcoincash, bitcoingold, dash,
dogecoin, ecash, and litecoin.
@OttoAllmendinger OttoAllmendinger force-pushed the BTC-3047.de-utxolib-tests branch from 35769a8 to 63c7108 Compare March 5, 2026 12:18
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.

1 participant