refactor(abstract-utxo): remove @bitgo/utxo-lib as a runtime dependency#8987
Merged
Conversation
Closed
3 tasks
f28a293 to
b70b574
Compare
6f4898f to
50b7f4e
Compare
3 tasks
Switch the instanceof check and Triple<BIP32> conversion path to use
fixedScriptWallet.RootWalletKeys from wasm-utxo. The other input shapes
(UtxoNamedKeychains, Triple<{pub}>, string[]) continue to work via the
existing toKeychainTriple/string-array branches.
Refs: T1-3279
Remove the unused toWasmECPair / ECPairKey helper (no src callers) and inline the isUtxoLibPsbt type guard into toWasmPsbt's narrowing branch. The file remains a bridge between utxolib and wasm-utxo types — its remaining callers (offlineVault/OfflineVaultHalfSigned.ts, impl/btc/inscriptionBuilder.ts, transaction/descriptor/parse.ts, transaction/fixedScript/signPsbtWasm.ts) still pass utxolib instances. Refs: T1-3279
…time deps All callers have been migrated off the wasmUtil bridge. Delete the file and move @bitgo/utxo-lib from dependencies to devDependencies in package.json. The dep is still required for tests (utxolib.testutil.AcidTest, network constants, BIP32 helpers). Refs: T1-3279
b70b574 to
45f0338
Compare
davidkaplanbitgo
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Completes the removal of `@bitgo/utxo-lib` as a runtime dependency from `modules/abstract-utxo`. The previous PR (#8915) migrated all call sites in `abstractUtxoCoin.ts` — this PR finishes the job in the adjacent files and drops `utxo-lib` from `dependencies` entirely.
Changes, in order:
Follows #8915 which removed the runtime dependency from `abstractUtxoCoin.ts`.
Test plan
Refs: T1-3279
🤖 Generated with Claude Code