Skip to content

feat(abstract-utxo): migrate recovery flows to wasm-utxo backend#8057

Merged
OttoAllmendinger merged 7 commits intomasterfrom
BTC-2891.wasm-utxo-full-backup-ccr
Feb 4, 2026
Merged

feat(abstract-utxo): migrate recovery flows to wasm-utxo backend#8057
OttoAllmendinger merged 7 commits intomasterfrom
BTC-2891.wasm-utxo-full-backup-ccr

Conversation

@OttoAllmendinger
Copy link
Contributor

This PR completes the migration of recovery flows to the wasm-utxo
backend, removing dependencies on the utxolib PSBT implementation.
Key changes:

  • Always use wasm-utxo backend for all recovery operations
  • Refactor backup key recovery to use WASM primitives
  • Replace utxolib dependencies in cross-chain recovery module
  • Improve Litecoin address conversion with WASM-based implementation
  • Fix script hash handling for testnet LTC addresses
  • Use PSBT's native getHalfSignedLegacyFormat method

The changes simplify the codebase by ensuring consistency across all
environments and properly handle address conversions for both mainnet
and testnet Litecoin addresses.

Issue: BTC-2891

@OttoAllmendinger OttoAllmendinger marked this pull request as ready for review February 4, 2026 12:25
@OttoAllmendinger OttoAllmendinger requested review from a team as code owners February 4, 2026 12:25
OttoAllmendinger and others added 7 commits February 4, 2026 13:40
Remove utxolib PSBT backend option and always use wasm-utxo for all
recoveries. This simplifies the code and ensures consistency across
all environments.

Issue: BTC-2891

Co-authored-by: llm-git <llm-git@ttll.de>
Use PSBT method directly instead of importing another utility function
that does the same thing.

Issue: BTC-2891

Co-authored-by: llm-git <llm-git@ttll.de>
Refactor the backup key recovery flow to use WASM primitives instead of
utxolib.

Issue: BTC-2891

Co-authored-by: llm-git <llm-git@ttll.de>
Replace utxolib dependencies with wasm-utxo equivalents in cross-chain
recovery module, including address handling, root wallet keys, and
transaction utilities.

Issue: BTC-2891

Co-authored-by: llm-git <llm-git@ttll.de>
Fix the cross-chain recovery address conversion to properly handle testnet
Litecoin addresses by using the correct script hash value. Previously, the
code was using Bitcoin mainnet's script hash for both mainnet and testnet
Litecoin addresses, which caused incorrect conversions for testnet.

Also added a check to skip processing for non-Litecoin coins and expanded
tests to verify both mainnet and testnet address conversions.

Issue: BTC-2891

Co-authored-by: llm-git <llm-git@ttll.de>
…ain recovery

Use WASM-based address conversion for more robust handling of P2SH
addresses between Litecoin and Bitcoin networks. The new implementation
correctly converts both mainnet (M→3) and testnet (Q→2) address formats.

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

Issue: BTC-2891
Remove @bitgo/unspents dependency as it's no longer needed with the
wasm-utxo implementation.

Issue: BTC-2891

Co-authored-by: llm-git <llm-git@ttll.de>
@OttoAllmendinger OttoAllmendinger force-pushed the BTC-2891.wasm-utxo-full-backup-ccr branch from 7447d8e to 92d3e52 Compare February 4, 2026 12:40
@OttoAllmendinger OttoAllmendinger merged commit 2e344af into master Feb 4, 2026
20 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