Skip to content

Commit ea0b137

Browse files
refactor(abstract-utxo): inline ScriptType2Of3 type definition
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
1 parent 9a81813 commit ea0b137

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

modules/abstract-utxo/src/abstractUtxoCoin.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import assert from 'assert';
22
import { randomBytes } from 'crypto';
33

44
import _ from 'lodash';
5-
import * as utxolib from '@bitgo/utxo-lib';
65
import { address as wasmAddress, BIP32, fixedScriptWallet, hasPsbtMagic } from '@bitgo/wasm-utxo';
76
import {
87
AddressCoinSpecific,
@@ -87,7 +86,7 @@ import { isUtxoWalletData, UtxoWallet } from './wallet';
8786
import { isDescriptorWalletData } from './descriptor/descriptorWallet';
8887
import type { Unspent } from './unspent';
8988

90-
import ScriptType2Of3 = utxolib.bitgo.outputScripts.ScriptType2Of3;
89+
type ScriptType2Of3 = 'p2sh' | 'p2shP2wsh' | 'p2wsh' | 'p2tr' | 'p2trMusig2';
9190

9291
export type TxFormat =
9392
// This is a legacy transaction format based around the bitcoinjs-lib serialization of unsigned transactions
@@ -133,8 +132,6 @@ type UtxoCustomSigningFunction<TNumber extends number | bigint> = {
133132
}): Promise<SignedTransaction>;
134133
};
135134

136-
const { ChainCode } = fixedScriptWallet;
137-
138135
/**
139136
* Check if a decoded transaction has at least one taproot key path spend (MuSig2) input.
140137
*/

0 commit comments

Comments
 (0)