[STACK nxrtmzsz] refactor(abstract-utxo): inline ScriptType2Of3 type definition#8915
Draft
OttoAllmendinger wants to merge 7 commits into
Draft
[STACK nxrtmzsz] refactor(abstract-utxo): inline ScriptType2Of3 type definition#8915OttoAllmendinger wants to merge 7 commits into
OttoAllmendinger wants to merge 7 commits into
Conversation
…tUtxoCoin The only remaining caller was the deleted fetchInputs and the doge override that just delegated to super. Remove the method, drop the doge override, and remove the now-unused createTransactionFromHex stubs from verifyTransaction tests. Refs: T1-3279
BitGoPsbt.fromBytes accepts NetworkName = UtxolibName | CoinName, so the round-trip through utxolib.getNetworkName is unnecessary. Drop the utxolib import from decode.ts. Refs: T1-3279
…h wasm/coinName equivalents - supportsBlockTarget: compare coinName instead of utxolib network objects - isSupportedScriptType: use fixedScriptWallet.supportsScriptType from wasm-utxo - postProcessPrebuild: delete the psbt-lite detection block and the allowNonSegwitSigningWithoutPrevTx flag end-to-end (wasm-utxo signing is permissive by default and never read the flag) Refs: T1-3279
…rmat Replace utxolib.addressFormat.toOutputScriptAndFormat / fromOutputScriptWithFormat with wasm-utxo's address.toOutputScriptWithCoin / fromOutputScriptWithCoin. Detect address format by trying each candidate and checking which round-trips byte-equal. Refs: T1-3279
…branches - isChainCode / scriptTypeForChain -> ChainCode.is / ChainCode.scriptType (wasm-utxo) - hasKeyPathSpendInput: drop unreachable utxolib.bitgo.UtxoPsbt branch and isTransactionWithKeyPathSpendInput call (DecodedTransaction is now BitGoPsbt only) - validAddressTypes: inline the 2-of-3 list instead of utxolib.outputScripts.scriptTypes2Of3 - Drop unused RootWalletKeys / UtxoNetwork type re-exports and the now-empty utxolib bitgo import Three utxolib references remain in abstractUtxoCoin: the ScriptType2Of3 type re-export, the deprecated network getter (still used by tests), and the top-level utxolib import that backs both. Refs: T1-3279
…orkFromCoinName Drop the deprecated coin.network getter from AbstractUtxoCoin and the getNetworkFromCoinName helper from names.ts. Tests that previously called coin.network now call the test-local getNetworkForCoinName(coin.name) from util/utxoCoins. With this, names.ts no longer depends on utxolib. Refs: T1-3279
Replace the utxolib.bitgo.outputScripts.ScriptType2Of3 type re-export with
an inline literal union. The values are identical to the utxolib export
('p2sh' | 'p2shP2wsh' | 'p2wsh' | 'p2tr' | 'p2trMusig2').
This removes the last utxolib type reference and the top-level utxolib import
from abstractUtxoCoin.ts.
Refs: T1-3279
c011adb to
f3ecc52
Compare
4b8b110 to
d5eb4fa
Compare
lcovar
approved these changes
Jun 2, 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
Mechanically replaces remaining
@bitgo/utxo-libcall sites inmodules/abstract-utxo/src/with@bitgo/wasm-utxoorcoinName-based equivalents. Stacks onotto/drop-fetchinputs.Changes, in order:
createTransactionFromHexfromAbstractUtxoCoin— last usage was already removed;backupKeyRecovery.tsmigrated to wasmTransaction.fromBytesBitGoPsbt.fromBytes— drops utxolib network lookupgetMainnet,isValidCoin,isValidScriptreplacedisValidAddressoffutxolib.addressFormat— now useswasmAddress.toOutputScriptWithCoinutxolib.bitgohelpers and drop dead branches — removes last bitgo-namespace call sitesnetworkgetter andgetNetworkFromCoinName— removes the two deprecated helpers and all callersScriptType2Of3type definition — drops the utxolib type import; type is now a local literal unionPR group context
Stack:
master → abstract-utxo-foundation → drop-fetchinputs → this PR → keychains-drop-utxolib → abstract-utxo-terminalTest plan
yarn tsc --noEmitclean inmodules/abstract-utxoyarn lintclean inmodules/abstract-utxo🤖 Generated with Claude Code