Skip to content

Commit 0fa57dd

Browse files
OttoAllmendingerllm-git
andcommitted
fix(utxo-lib): refactor imports to remove circular dependencies
Issue: BTC-1966 Co-authored-by: llm-git <[email protected]>
1 parent f25907c commit 0fa57dd

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

modules/utxo-lib/src/bitgo/outputScripts.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import * as assert from 'assert';
22
import * as bitcoinjs from 'bitcoinjs-lib';
33

4-
import { Network, p2trPayments, supportsSegwit, supportsTaproot, taproot } from '..';
4+
import { Network, supportsSegwit, supportsTaproot } from '../networks';
5+
import * as p2trPayments from '../payments';
6+
import * as taproot from '../taproot';
57

68
import { isTriple, Triple, Tuple } from './types';
79

modules/utxo-lib/src/bitgo/wallet/WalletOutput.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1+
import * as assert from 'assert';
2+
13
import { Payment, taproot } from 'bitcoinjs-lib';
24
import { PsbtOutput, PsbtOutputUpdate } from 'bip174/src/lib/interfaces';
35
import { UtxoPsbt } from '../UtxoPsbt';
46
import { RootWalletKeys, DerivedWalletKeys } from './WalletKeys';
57
import { ChainCode, scriptTypeForChain } from './chains';
6-
import { createOutputScript2of3, createPaymentP2tr, createPaymentP2trMusig2, toXOnlyPublicKey } from '../outputScripts';
78
import { getScriptIdFromPath, ScriptId } from './ScriptId';
8-
import * as assert from 'node:assert';
9+
import { createOutputScript2of3, createPaymentP2tr, createPaymentP2trMusig2, toXOnlyPublicKey } from '../outputScripts';
910

1011
/**
1112
* Get the BIP32 derivation data for a PSBT output.

modules/utxo-lib/src/testutil/keys.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { BIP32API, BIP32Factory, BIP32Interface } from 'bip32';
22
import * as crypto from 'crypto';
33

4-
import { Triple } from '../bitgo';
5-
import { RootWalletKeys } from '../bitgo';
4+
import { Triple } from '../bitgo/types';
5+
import { RootWalletKeys } from '../bitgo/wallet/WalletKeys';
66
import { ecc, ECPair, ECPairInterface } from '../noble_ecc';
77
import { networks } from '../networks';
88

0 commit comments

Comments
 (0)