Skip to content

Commit b70ae1c

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 d37fef1 commit b70ae1c

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,
@@ -86,7 +85,7 @@ import { isUtxoWalletData, UtxoWallet } from './wallet';
8685
import { isDescriptorWalletData } from './descriptor/descriptorWallet';
8786
import type { Unspent } from './unspent';
8887

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

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

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

0 commit comments

Comments
 (0)