diff --git a/modules/abstract-utxo/src/impl/bch/bch.ts b/modules/abstract-utxo/src/impl/bch/bch.ts index f96a6e11cc..dda7c96f3f 100644 --- a/modules/abstract-utxo/src/impl/bch/bch.ts +++ b/modules/abstract-utxo/src/impl/bch/bch.ts @@ -1,4 +1,4 @@ -import { BitGoBase, BaseCoin } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { AbstractUtxoCoin, UtxoNetwork } from '../../abstractUtxoCoin'; @@ -8,7 +8,7 @@ export class Bch extends AbstractUtxoCoin { super(bitgo, network || utxolib.networks.bitcoincash); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Bch { return new Bch(bitgo); } diff --git a/modules/abstract-utxo/src/impl/bch/tbch.ts b/modules/abstract-utxo/src/impl/bch/tbch.ts index a027d127bf..ca10b5f380 100644 --- a/modules/abstract-utxo/src/impl/bch/tbch.ts +++ b/modules/abstract-utxo/src/impl/bch/tbch.ts @@ -1,7 +1,7 @@ /** * @prettier */ -import { BaseCoin, BitGoBase } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as bitcoin from '@bitgo/utxo-lib'; import { Bch } from './bch'; @@ -11,7 +11,7 @@ export class Tbch extends Bch { super(bitgo, bitcoin.networks.bitcoincashTestnet); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Tbch { return new Tbch(bitgo); } } diff --git a/modules/abstract-utxo/src/impl/bcha/bcha.ts b/modules/abstract-utxo/src/impl/bcha/bcha.ts index 76dd8bd0d3..7b8203f800 100644 --- a/modules/abstract-utxo/src/impl/bcha/bcha.ts +++ b/modules/abstract-utxo/src/impl/bcha/bcha.ts @@ -1,4 +1,4 @@ -import { BitGoBase, BaseCoin } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { Bch } from '../bch/bch'; @@ -9,7 +9,7 @@ export class Bcha extends Bch { super(bitgo, network || utxolib.networks.ecash); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Bcha { return new Bcha(bitgo); } diff --git a/modules/abstract-utxo/src/impl/bcha/tbcha.ts b/modules/abstract-utxo/src/impl/bcha/tbcha.ts index b22dad0e1d..3403631159 100644 --- a/modules/abstract-utxo/src/impl/bcha/tbcha.ts +++ b/modules/abstract-utxo/src/impl/bcha/tbcha.ts @@ -1,7 +1,7 @@ /** * @prettier */ -import { BitGoBase, BaseCoin } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { Bcha } from './bcha'; @@ -11,7 +11,7 @@ export class Tbcha extends Bcha { super(bitgo, utxolib.networks.ecashTest); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Tbcha { return new Tbcha(bitgo); } } diff --git a/modules/abstract-utxo/src/impl/bsv/bsv.ts b/modules/abstract-utxo/src/impl/bsv/bsv.ts index a0659e688f..2570c6b73d 100644 --- a/modules/abstract-utxo/src/impl/bsv/bsv.ts +++ b/modules/abstract-utxo/src/impl/bsv/bsv.ts @@ -1,4 +1,4 @@ -import { BitGoBase, BaseCoin } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { UtxoNetwork } from '../../abstractUtxoCoin'; @@ -9,7 +9,7 @@ export class Bsv extends Bch { super(bitgo, network || utxolib.networks.bitcoinsv); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Bsv { return new Bsv(bitgo); } } diff --git a/modules/abstract-utxo/src/impl/bsv/tbsv.ts b/modules/abstract-utxo/src/impl/bsv/tbsv.ts index 83f05f47ad..d3cfac98bf 100644 --- a/modules/abstract-utxo/src/impl/bsv/tbsv.ts +++ b/modules/abstract-utxo/src/impl/bsv/tbsv.ts @@ -1,7 +1,7 @@ /** * @prettier */ -import { BitGoBase, BaseCoin } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { Bsv } from './bsv'; @@ -11,7 +11,7 @@ export class Tbsv extends Bsv { super(bitgo, utxolib.networks.bitcoinsvTestnet); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Tbsv { return new Tbsv(bitgo); } } diff --git a/modules/abstract-utxo/src/impl/btc/btc.ts b/modules/abstract-utxo/src/impl/btc/btc.ts index 29a6c0f55e..26bb29edb7 100644 --- a/modules/abstract-utxo/src/impl/btc/btc.ts +++ b/modules/abstract-utxo/src/impl/btc/btc.ts @@ -1,6 +1,5 @@ import { BitGoBase, - BaseCoin, VerifyRecoveryTransactionOptions as BaseVerifyRecoveryTransactionOptions, Wallet, } from '@bitgo/sdk-core'; @@ -19,7 +18,7 @@ export class Btc extends AbstractUtxoCoin { super(bitgo, network || utxolib.networks.bitcoin); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Btc { return new Btc(bitgo); } diff --git a/modules/abstract-utxo/src/impl/btc/tbtc.ts b/modules/abstract-utxo/src/impl/btc/tbtc.ts index c16072a9f7..7d8c84bcaa 100644 --- a/modules/abstract-utxo/src/impl/btc/tbtc.ts +++ b/modules/abstract-utxo/src/impl/btc/tbtc.ts @@ -1,7 +1,7 @@ /** * @prettier */ -import { BaseCoin, BitGoBase } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { Btc } from './btc'; @@ -11,7 +11,7 @@ export class Tbtc extends Btc { super(bitgo, utxolib.networks.testnet); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Tbtc { return new Tbtc(bitgo); } } diff --git a/modules/abstract-utxo/src/impl/btc/tbtc4.ts b/modules/abstract-utxo/src/impl/btc/tbtc4.ts index d33c51dad7..c4052c9e54 100644 --- a/modules/abstract-utxo/src/impl/btc/tbtc4.ts +++ b/modules/abstract-utxo/src/impl/btc/tbtc4.ts @@ -1,7 +1,7 @@ /** * @prettier */ -import { BaseCoin, BitGoBase } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { Btc } from './btc'; @@ -11,7 +11,7 @@ export class Tbtc4 extends Btc { super(bitgo, utxolib.networks.bitcoinTestnet4); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Tbtc4 { return new Tbtc4(bitgo); } } diff --git a/modules/abstract-utxo/src/impl/btc/tbtcbgsig.ts b/modules/abstract-utxo/src/impl/btc/tbtcbgsig.ts index 9adf43a4f0..20927abff1 100644 --- a/modules/abstract-utxo/src/impl/btc/tbtcbgsig.ts +++ b/modules/abstract-utxo/src/impl/btc/tbtcbgsig.ts @@ -1,7 +1,7 @@ /** * @prettier */ -import { BaseCoin, BitGoBase } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { Btc } from './btc'; @@ -11,7 +11,7 @@ export class Tbtcbgsig extends Btc { super(bitgo, utxolib.networks.bitcoinBitGoSignet); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Tbtcbgsig { return new Tbtcbgsig(bitgo); } } diff --git a/modules/abstract-utxo/src/impl/btc/tbtcsig.ts b/modules/abstract-utxo/src/impl/btc/tbtcsig.ts index dd6b5d16e9..5e886497c6 100644 --- a/modules/abstract-utxo/src/impl/btc/tbtcsig.ts +++ b/modules/abstract-utxo/src/impl/btc/tbtcsig.ts @@ -1,7 +1,7 @@ /** * @prettier */ -import { BaseCoin, BitGoBase } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { Btc } from './btc'; @@ -11,7 +11,7 @@ export class Tbtcsig extends Btc { super(bitgo, utxolib.networks.bitcoinPublicSignet); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Tbtcsig { return new Tbtcsig(bitgo); } } diff --git a/modules/abstract-utxo/src/impl/btg/btg.ts b/modules/abstract-utxo/src/impl/btg/btg.ts index e1aa1c248a..3fdbba425e 100644 --- a/modules/abstract-utxo/src/impl/btg/btg.ts +++ b/modules/abstract-utxo/src/impl/btg/btg.ts @@ -1,4 +1,4 @@ -import { BitGoBase, BaseCoin } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { AbstractUtxoCoin, UtxoNetwork } from '../../abstractUtxoCoin'; @@ -8,7 +8,7 @@ export class Btg extends AbstractUtxoCoin { super(bitgo, network || utxolib.networks.bitcoingold); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Btg { return new Btg(bitgo); } } diff --git a/modules/abstract-utxo/src/impl/dash/dash.ts b/modules/abstract-utxo/src/impl/dash/dash.ts index 68dff15c59..0fb80f5242 100644 --- a/modules/abstract-utxo/src/impl/dash/dash.ts +++ b/modules/abstract-utxo/src/impl/dash/dash.ts @@ -1,4 +1,4 @@ -import { BitGoBase, BaseCoin } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { AbstractUtxoCoin, UtxoNetwork } from '../../abstractUtxoCoin'; @@ -8,7 +8,7 @@ export class Dash extends AbstractUtxoCoin { super(bitgo, network || utxolib.networks.dash); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Dash { return new Dash(bitgo); } } diff --git a/modules/abstract-utxo/src/impl/dash/tdash.ts b/modules/abstract-utxo/src/impl/dash/tdash.ts index 955a0e79bd..e908d4efd3 100644 --- a/modules/abstract-utxo/src/impl/dash/tdash.ts +++ b/modules/abstract-utxo/src/impl/dash/tdash.ts @@ -1,7 +1,7 @@ /** * @prettier */ -import { BitGoBase, BaseCoin } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { Dash } from './dash'; @@ -10,7 +10,7 @@ export class Tdash extends Dash { constructor(bitgo: BitGoBase) { super(bitgo, utxolib.networks.dashTest); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Tdash { return new Tdash(bitgo); } } diff --git a/modules/abstract-utxo/src/impl/doge/doge.ts b/modules/abstract-utxo/src/impl/doge/doge.ts index 0574070460..551dec78b6 100644 --- a/modules/abstract-utxo/src/impl/doge/doge.ts +++ b/modules/abstract-utxo/src/impl/doge/doge.ts @@ -1,4 +1,4 @@ -import { BaseCoin, BitGoBase, HalfSignedUtxoTransaction, SignedTransaction } from '@bitgo/sdk-core'; +import { BitGoBase, HalfSignedUtxoTransaction, SignedTransaction } from '@bitgo/sdk-core'; import { bitgo, networks } from '@bitgo/utxo-lib'; import { @@ -60,7 +60,7 @@ export class Doge extends AbstractUtxoCoin { super(bitgo, network || networks.dogecoin, 'bigint'); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Doge { return new Doge(bitgo); } diff --git a/modules/abstract-utxo/src/impl/doge/tdoge.ts b/modules/abstract-utxo/src/impl/doge/tdoge.ts index eaedc19e6a..d85afa97d4 100644 --- a/modules/abstract-utxo/src/impl/doge/tdoge.ts +++ b/modules/abstract-utxo/src/impl/doge/tdoge.ts @@ -1,7 +1,7 @@ /** * @prettier */ -import { BitGoBase, BaseCoin } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { Doge } from './doge'; @@ -10,7 +10,7 @@ export class Tdoge extends Doge { constructor(bitgo: BitGoBase) { super(bitgo, utxolib.networks.dogecoinTest); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Tdoge { return new Tdoge(bitgo); } } diff --git a/modules/abstract-utxo/src/impl/ltc/ltc.ts b/modules/abstract-utxo/src/impl/ltc/ltc.ts index c1cf24952b..68229bf8d9 100644 --- a/modules/abstract-utxo/src/impl/ltc/ltc.ts +++ b/modules/abstract-utxo/src/impl/ltc/ltc.ts @@ -1,4 +1,4 @@ -import { BitGoBase, BaseCoin } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { AbstractUtxoCoin, UtxoNetwork } from '../../abstractUtxoCoin'; @@ -12,7 +12,7 @@ export class Ltc extends AbstractUtxoCoin { this.supportAltScriptDestination = false; } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Ltc { return new Ltc(bitgo); } } diff --git a/modules/abstract-utxo/src/impl/ltc/tltc.ts b/modules/abstract-utxo/src/impl/ltc/tltc.ts index 70c41eb181..055228bda6 100644 --- a/modules/abstract-utxo/src/impl/ltc/tltc.ts +++ b/modules/abstract-utxo/src/impl/ltc/tltc.ts @@ -1,4 +1,4 @@ -import { BitGoBase, BaseCoin } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { Ltc } from './ltc'; @@ -10,7 +10,7 @@ export class Tltc extends Ltc { // support alt destinations on test this.supportAltScriptDestination = false; } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Tltc { return new Tltc(bitgo); } } diff --git a/modules/abstract-utxo/src/impl/zec/tzec.ts b/modules/abstract-utxo/src/impl/zec/tzec.ts index 29f5ffe40b..4cf80e0fc0 100644 --- a/modules/abstract-utxo/src/impl/zec/tzec.ts +++ b/modules/abstract-utxo/src/impl/zec/tzec.ts @@ -1,4 +1,4 @@ -import { BaseCoin, BitGoBase } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { Zec } from './zec'; @@ -8,7 +8,7 @@ export class Tzec extends Zec { super(bitgo, utxolib.networks.zcashTest); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Tzec { return new Tzec(bitgo); } } diff --git a/modules/abstract-utxo/src/impl/zec/zec.ts b/modules/abstract-utxo/src/impl/zec/zec.ts index ac35e5197f..9254e320da 100644 --- a/modules/abstract-utxo/src/impl/zec/zec.ts +++ b/modules/abstract-utxo/src/impl/zec/zec.ts @@ -1,7 +1,7 @@ /** * @prettier */ -import { BitGoBase, BaseCoin } from '@bitgo/sdk-core'; +import { BitGoBase } from '@bitgo/sdk-core'; import * as utxolib from '@bitgo/utxo-lib'; import { AbstractUtxoCoin, UtxoNetwork } from '../../abstractUtxoCoin'; @@ -11,7 +11,7 @@ export class Zec extends AbstractUtxoCoin { super(bitgo, network || utxolib.networks.zcash); } - static createInstance(bitgo: BitGoBase): BaseCoin { + static createInstance(bitgo: BitGoBase): Zec { return new Zec(bitgo); } } diff --git a/modules/bitgo/test/v2/unit/coins/abstractUtxoCoin.ts b/modules/abstract-utxo/test/unit/abstractUtxoCoin.ts similarity index 94% rename from modules/bitgo/test/v2/unit/coins/abstractUtxoCoin.ts rename to modules/abstract-utxo/test/unit/abstractUtxoCoin.ts index 53b51823d0..d4b2441373 100644 --- a/modules/bitgo/test/v2/unit/coins/abstractUtxoCoin.ts +++ b/modules/abstract-utxo/test/unit/abstractUtxoCoin.ts @@ -2,16 +2,16 @@ import * as utxolib from '@bitgo/utxo-lib'; import should = require('should'); import * as sinon from 'sinon'; import { Wallet, UnexpectedAddressError, VerificationOptions, Triple } from '@bitgo/sdk-core'; -import { TestBitGo } from '@bitgo/sdk-test'; -import { BitGo } from '../../../../src/bitgo'; -import { psbtTxHex } from './payGoPSBTHexFixture/psbtHexProof'; -import { bip322Fixtures } from '../../fixtures/bip322/fixtures'; -import { AbstractUtxoCoin, UtxoWallet, Output, TransactionExplanation, TransactionParams } from '@bitgo/abstract-utxo'; + +import { UtxoWallet, Output, TransactionExplanation, TransactionParams } from '../../src'; + +import { bip322Fixtures } from './fixtures/bip322/fixtures'; +import { psbtTxHex } from './fixtures/psbtHexProof'; +import { defaultBitGo, getUtxoCoin } from './util'; describe('Abstract UTXO Coin:', () => { describe('Parse Transaction:', () => { - const bitgo: BitGo = TestBitGo.decorate(BitGo, { env: 'mock' }); - const coin = bitgo.coin('tbtc') as AbstractUtxoCoin; + const coin = getUtxoCoin('tbtc'); /* * mock objects which get passed into parse transaction. @@ -117,8 +117,7 @@ describe('Abstract UTXO Coin:', () => { }); describe('Custom Change Wallets', () => { - const bitgo: BitGo = TestBitGo.decorate(BitGo, { env: 'mock' }); - const coin = bitgo.coin('tbtc') as AbstractUtxoCoin; + const coin = getUtxoCoin('tbtc'); const keys = { send: { @@ -249,8 +248,7 @@ describe('Abstract UTXO Coin:', () => { }); describe('Verify Transaction', () => { - const bitgo: BitGo = TestBitGo.decorate(BitGo, { env: 'mock' }); - const coin = bitgo.coin('tbtc') as AbstractUtxoCoin; + const coin = getUtxoCoin('tbtc'); const userKeychain = coin.keychains().create(); const otherKeychain = coin.keychains().create(); @@ -277,7 +275,7 @@ describe('Abstract UTXO Coin:', () => { // user public key swapped out user: { pub: otherKeychain.pub, - encryptedPrv: bitgo.encrypt({ + encryptedPrv: defaultBitGo.encrypt({ input: userKeychain.prv, password: passphrase, }), @@ -547,7 +545,7 @@ describe('Abstract UTXO Coin:', () => { it('should work with bigint amounts', async () => { // need a coin that uses bigint - const bigintCoin = bitgo.coin('tdoge') as AbstractUtxoCoin; + const bigintCoin = getUtxoCoin('tdoge'); const coinMock = sinon.stub(bigintCoin, 'parseTransaction').resolves({ keychains: {} as any, @@ -596,12 +594,7 @@ describe('Abstract UTXO Coin:', () => { describe('Explain Transaction', function () { describe('Verify paygo output when explaining psbt transaction', function () { - const bitgo: BitGo = TestBitGo.decorate(BitGo, { env: 'mock' }); - let coin: AbstractUtxoCoin; - - beforeEach(() => { - coin = bitgo.coin('tbtc4') as AbstractUtxoCoin; - }); + const coin = getUtxoCoin('tbtc4'); it('should detect and verify paygo address proof in PSBT', async function () { // Call explainTransaction @@ -610,14 +603,9 @@ describe('Abstract UTXO Coin:', () => { }); describe('BIP322 Proof', function () { - const bitgo: BitGo = TestBitGo.decorate(BitGo, { env: 'mock' }); - let coin: AbstractUtxoCoin; + const coin = getUtxoCoin('btc'); const pubs = bip322Fixtures.valid.rootWalletKeys.triple.map((b) => b.neutered().toBase58()) as Triple; - beforeEach(() => { - coin = bitgo.coin('btc') as AbstractUtxoCoin; - }); - it('should successfully run with a user nonce', async function () { const psbtHex = bip322Fixtures.valid.userNonce; const result = await coin.explainTransaction({ txHex: psbtHex, pubs }); diff --git a/modules/bitgo/test/v2/unit/coins/utxo/address.ts b/modules/abstract-utxo/test/unit/address.ts similarity index 98% rename from modules/bitgo/test/v2/unit/coins/utxo/address.ts rename to modules/abstract-utxo/test/unit/address.ts index 0dfbd58ab2..153f91fd49 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/address.ts +++ b/modules/abstract-utxo/test/unit/address.ts @@ -1,12 +1,10 @@ -/** - * @prettier - */ import 'should'; import * as assert from 'assert'; + import * as utxolib from '@bitgo/utxo-lib'; const { chainCodes } = utxolib.bitgo; -import { AbstractUtxoCoin, GenerateFixedScriptAddressOptions } from '@bitgo/abstract-utxo'; +import { AbstractUtxoCoin, GenerateFixedScriptAddressOptions } from '../../src'; import { utxoCoins, keychains as keychainsBip32, getFixture, shouldEqualJSON } from './util'; diff --git a/modules/bitgo/test/v2/unit/coins/utxo/coins.ts b/modules/abstract-utxo/test/unit/coins.ts similarity index 99% rename from modules/bitgo/test/v2/unit/coins/utxo/coins.ts rename to modules/abstract-utxo/test/unit/coins.ts index 349f028b47..449edbc157 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/coins.ts +++ b/modules/abstract-utxo/test/unit/coins.ts @@ -1,4 +1,5 @@ import * as assert from 'assert'; + import * as utxolib from '@bitgo/utxo-lib'; import { getUtxoCoinForNetwork, utxoCoins } from './util'; diff --git a/modules/abstract-utxo/test/unit/customSigner.ts b/modules/abstract-utxo/test/unit/customSigner.ts new file mode 100644 index 0000000000..d8ad50e996 --- /dev/null +++ b/modules/abstract-utxo/test/unit/customSigner.ts @@ -0,0 +1,103 @@ +import * as utxoLib from '@bitgo/utxo-lib'; +import 'should'; +import 'should-sinon'; +import nock = require('nock'); +import * as sinon from 'sinon'; +import { CustomSigningFunction, common } from '@bitgo/sdk-core'; + +import { defaultBitGo, getDefaultWalletKeys, getUtxoCoin, getUtxoWallet } from './util'; + +nock.disableNetConnect(); + +const bgUrl = common.Environments[defaultBitGo.getEnv()].uri; +const basecoin = getUtxoCoin('tbtc'); +const wallet = getUtxoWallet(basecoin, { + id: '5b34252f1bf349930e34020a', + coin: 'tbtc', + keys: ['5b3424f91bf349930e340175', '5b3424f91bf349930e340176', '5b3424f91bf349930e340177'], +}); + +describe('UTXO Custom Signer Function', function () { + const recipients = [ + { address: 'abc', amount: 123 }, + { address: 'def', amount: 456 }, + ]; + const rootWalletKey = getDefaultWalletKeys(); + let customSigningFunction: CustomSigningFunction; + let stubs: sinon.SinonStub[]; + + beforeEach(function () { + customSigningFunction = sinon.stub().returns({ + txHex: 'this-is-a-tx', + }); + stubs = [ + sinon.stub(wallet.baseCoin, 'postProcessPrebuild').returnsArg(0), + sinon.stub(wallet.baseCoin, 'verifyTransaction').resolves(true), + sinon.stub(wallet.baseCoin, 'signTransaction').resolves({ txHex: 'this-is-a-tx' }), + ]; + }); + + afterEach(function () { + stubs.forEach((s) => s.restore()); + nock.cleanAll(); + }); + + function nocks(txPrebuild: { txHex: string }) { + nock(bgUrl) + .post(`/api/v2/${wallet.coin()}/wallet/${wallet.id()}/tx/build`) + .reply(200, { ...txPrebuild, txInfo: {} }); + nock(bgUrl).get(`/api/v2/${wallet.coin()}/public/block/latest`).reply(200, { height: 1000 }); + nock(bgUrl).persist().get(`/api/v2/${wallet.coin()}/key/${wallet.keyIds()[0]}`).reply(200, { pub: 'pub' }); + nock(bgUrl).persist().get(`/api/v2/${wallet.coin()}/key/${wallet.keyIds()[1]}`).reply(200, { pub: 'pub' }); + nock(bgUrl).persist().get(`/api/v2/${wallet.coin()}/key/${wallet.keyIds()[2]}`).reply(200, { pub: 'pub' }); + return nock(bgUrl).post(`/api/v2/${wallet.coin()}/wallet/${wallet.id()}/tx/send`).reply(200, { ok: true }); + } + + it('should use a custom signing function if provided for PSBT with taprootKeyPathSpend input', async function () { + const psbt = utxoLib.testutil.constructPsbt( + [{ scriptType: 'taprootKeyPathSpend', value: BigInt(1000) }], + [{ scriptType: 'p2sh', value: BigInt(900) }], + basecoin.network, + rootWalletKey, + 'unsigned' + ); + const scope = nocks({ txHex: psbt.toHex() }); + const result = await wallet.sendMany({ recipients, customSigningFunction }); + + result.should.have.property('ok', true); + customSigningFunction.should.have.been.calledTwice(); + scope.done(); + }); + + it('should use a custom signing function if provided for PSBT without taprootKeyPathSpend input', async function () { + const psbt = utxoLib.testutil.constructPsbt( + [{ scriptType: 'p2wsh', value: BigInt(1000) }], + [{ scriptType: 'p2sh', value: BigInt(900) }], + basecoin.network, + rootWalletKey, + 'unsigned' + ); + const scope = nocks({ txHex: psbt.toHex() }); + const result = await wallet.sendMany({ recipients, customSigningFunction }); + + result.should.have.property('ok', true); + customSigningFunction.should.have.been.calledOnce(); + scope.done(); + }); + + it('should use a custom signing function if provided for Tx without taprootKeyPathSpend input', async function () { + const tx = utxoLib.testutil.constructTxnBuilder( + [{ scriptType: 'p2wsh', value: BigInt(1000) }], + [{ scriptType: 'p2sh', value: BigInt(900) }], + basecoin.network, + rootWalletKey, + 'unsigned' + ); + const scope = nocks({ txHex: tx.buildIncomplete().toHex() }); + const result = await wallet.sendMany({ recipients, customSigningFunction }); + + result.should.have.property('ok', true); + customSigningFunction.should.have.been.calledOnce(); + scope.done(); + }); +}); diff --git a/modules/bitgo/test/v2/unit/coins/utxo/descriptorAddress.ts b/modules/abstract-utxo/test/unit/descriptorAddress.ts similarity index 91% rename from modules/bitgo/test/v2/unit/coins/utxo/descriptorAddress.ts rename to modules/abstract-utxo/test/unit/descriptorAddress.ts index f9577d07e2..6f53adb389 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/descriptorAddress.ts +++ b/modules/abstract-utxo/test/unit/descriptorAddress.ts @@ -1,11 +1,11 @@ import * as assert from 'node:assert'; -import { TestBitGo } from '@bitgo/sdk-test'; -import { AbstractUtxoCoin, descriptor as utxod } from '@bitgo/abstract-utxo'; import * as utxolib from '@bitgo/utxo-lib'; import { IWallet, WalletCoinSpecific } from '@bitgo/sdk-core'; -import { BitGo } from '../../../../../src'; +import { descriptor as utxod } from '../../src'; + +import { getUtxoCoin } from './util'; export function getDescriptorAddress(d: string, index: number, network: utxolib.Network): string { const derivedScript = Buffer.from( @@ -15,8 +15,7 @@ export function getDescriptorAddress(d: string, index: number, network: utxolib. } describe('descriptor wallets', function () { - const bitgo: BitGo = TestBitGo.decorate(BitGo, { env: 'mock' }); - const coin = bitgo.coin('tbtc') as AbstractUtxoCoin; + const coin = getUtxoCoin('tbtc'); const xpubs = utxolib.testutil.getKeyTriple('setec astronomy').map((k) => k.neutered().toBase58()); function withChecksum(descriptor: string): string { diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/bch/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/bch/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/bch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/bch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/bch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/bch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/bch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/bch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/bch/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/bch/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/bch/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/bch/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/bch/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/bch/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/bch/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/bch/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/transactions-replayProtection-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/bch/transactions-replayProtection-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bch/transactions-replayProtection-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/bch/transactions-replayProtection-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bcha/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/bcha/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bcha/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/bcha/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/bcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/bcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/bcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/bcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/bcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/bcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bcha/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/bcha/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bcha/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/bcha/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bcha/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/bcha/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bcha/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/bcha/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bcha/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/bcha/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bcha/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/bcha/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bcha/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/bcha/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bcha/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/bcha/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/fixtures/bip322/fixtures.ts b/modules/abstract-utxo/test/unit/fixtures/bip322/fixtures.ts similarity index 100% rename from modules/bitgo/test/v2/fixtures/bip322/fixtures.ts rename to modules/abstract-utxo/test/unit/fixtures/bip322/fixtures.ts diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/bsv/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/bsv/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/bsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/bsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/bsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/bsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/bsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/bsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/bsv/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/bsv/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/bsv/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/bsv/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/bsv/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/bsv/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/bsv/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/bsv/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/transactions-replayProtection-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/bsv/transactions-replayProtection-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/bsv/transactions-replayProtection-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/bsv/transactions-replayProtection-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/btc/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/btc/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2tr-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2tr-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2tr-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2tr-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2tr-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2tr-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2tr-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2tr-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2trMusig2-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/btc/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/btc/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/btc/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/transactions-p2shP2wsh-p2shP2wsh.json b/modules/abstract-utxo/test/unit/fixtures/btc/transactions-p2shP2wsh-p2shP2wsh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/transactions-p2shP2wsh-p2shP2wsh.json rename to modules/abstract-utxo/test/unit/fixtures/btc/transactions-p2shP2wsh-p2shP2wsh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/transactions-p2tr-p2tr.json b/modules/abstract-utxo/test/unit/fixtures/btc/transactions-p2tr-p2tr.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/transactions-p2tr-p2tr.json rename to modules/abstract-utxo/test/unit/fixtures/btc/transactions-p2tr-p2tr.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/transactions-p2wsh-p2wsh.json b/modules/abstract-utxo/test/unit/fixtures/btc/transactions-p2wsh-p2wsh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btc/transactions-p2wsh-p2wsh.json rename to modules/abstract-utxo/test/unit/fixtures/btc/transactions-p2wsh-p2wsh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/btg/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/btg/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/btg/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/btg/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/btg/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/transactions-p2shP2wsh-p2shP2wsh.json b/modules/abstract-utxo/test/unit/fixtures/btg/transactions-p2shP2wsh-p2shP2wsh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/transactions-p2shP2wsh-p2shP2wsh.json rename to modules/abstract-utxo/test/unit/fixtures/btg/transactions-p2shP2wsh-p2shP2wsh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/transactions-p2wsh-p2wsh.json b/modules/abstract-utxo/test/unit/fixtures/btg/transactions-p2wsh-p2wsh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/btg/transactions-p2wsh-p2wsh.json rename to modules/abstract-utxo/test/unit/fixtures/btg/transactions-p2wsh-p2wsh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/dash/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/dash/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/dash/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/dash/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/dash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/dash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/dash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/dash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/dash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/dash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/dash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/dash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/dash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/dash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/dash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/dash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/dash/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/dash/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/dash/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/dash/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/dash/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/dash/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/dash/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/dash/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/dash/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/dash/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/dash/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/dash/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/dash/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/dash/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/dash/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/dash/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/doge/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/doge/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/doge/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/doge/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/doge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/doge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/doge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/doge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/doge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/doge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/doge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/doge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/doge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/doge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/doge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/doge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/doge/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/doge/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/doge/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/doge/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/doge/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/doge/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/doge/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/doge/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/doge/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/doge/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/doge/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/doge/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/doge/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/doge/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/doge/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/doge/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/ltc/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/ltc/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/transactions-p2shP2wsh-p2shP2wsh.json b/modules/abstract-utxo/test/unit/fixtures/ltc/transactions-p2shP2wsh-p2shP2wsh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/transactions-p2shP2wsh-p2shP2wsh.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/transactions-p2shP2wsh-p2shP2wsh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/transactions-p2wsh-p2wsh.json b/modules/abstract-utxo/test/unit/fixtures/ltc/transactions-p2wsh-p2wsh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/ltc/transactions-p2wsh-p2wsh.json rename to modules/abstract-utxo/test/unit/fixtures/ltc/transactions-p2wsh-p2wsh.json diff --git a/modules/bitgo/test/v2/unit/coins/payGoPSBTHexFixture/psbtHexProof.ts b/modules/abstract-utxo/test/unit/fixtures/psbtHexProof.ts similarity index 100% rename from modules/bitgo/test/v2/unit/coins/payGoPSBTHexFixture/psbtHexProof.ts rename to modules/abstract-utxo/test/unit/fixtures/psbtHexProof.ts diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/tbch/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/tbch/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbch/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbch/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbch/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tbch/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tbch/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbch/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbch/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/tbch/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/tbch/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/transactions-replayProtection-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/tbch/transactions-replayProtection-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbch/transactions-replayProtection-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/tbch/transactions-replayProtection-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbcha/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/tbcha/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbcha/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/tbcha/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbcha/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbcha/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/tbcha/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbcha/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/tbcha/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/tbsv/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/tbsv/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbsv/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/tbsv/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/tbsv/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/transactions-replayProtection-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/tbsv/transactions-replayProtection-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbsv/transactions-replayProtection-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/tbsv/transactions-replayProtection-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2tr-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2trMusig2-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/transactions-p2shP2wsh-p2shP2wsh.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/transactions-p2shP2wsh-p2shP2wsh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/transactions-p2shP2wsh-p2shP2wsh.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/transactions-p2shP2wsh-p2shP2wsh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/transactions-p2tr-p2tr.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/transactions-p2tr-p2tr.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/transactions-p2tr-p2tr.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/transactions-p2tr-p2tr.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/transactions-p2wsh-p2wsh.json b/modules/abstract-utxo/test/unit/fixtures/tbtc/transactions-p2wsh-p2wsh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc/transactions-p2wsh-p2wsh.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc/transactions-p2wsh-p2wsh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2tr-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2trMusig2-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/transactions-p2shP2wsh-p2shP2wsh.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/transactions-p2shP2wsh-p2shP2wsh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/transactions-p2shP2wsh-p2shP2wsh.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/transactions-p2shP2wsh-p2shP2wsh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/transactions-p2tr-p2tr.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/transactions-p2tr-p2tr.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/transactions-p2tr-p2tr.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/transactions-p2tr-p2tr.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/transactions-p2wsh-p2wsh.json b/modules/abstract-utxo/test/unit/fixtures/tbtc4/transactions-p2wsh-p2wsh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtc4/transactions-p2wsh-p2wsh.json rename to modules/abstract-utxo/test/unit/fixtures/tbtc4/transactions-p2wsh-p2wsh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2tr-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2trMusig2-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/transactions-p2shP2wsh-p2shP2wsh.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/transactions-p2shP2wsh-p2shP2wsh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/transactions-p2shP2wsh-p2shP2wsh.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/transactions-p2shP2wsh-p2shP2wsh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/transactions-p2tr-p2tr.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/transactions-p2tr-p2tr.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/transactions-p2tr-p2tr.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/transactions-p2tr-p2tr.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/transactions-p2wsh-p2wsh.json b/modules/abstract-utxo/test/unit/fixtures/tbtcsig/transactions-p2wsh-p2wsh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tbtcsig/transactions-p2wsh-p2wsh.json rename to modules/abstract-utxo/test/unit/fixtures/tbtcsig/transactions-p2wsh-p2wsh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdash/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/tdash/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdash/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/tdash/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tdash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tdash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tdash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tdash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tdash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tdash/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdash/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tdash/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdash/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tdash/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdash/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tdash/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdash/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tdash/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdash/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tdash/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdash/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tdash/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdash/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/tdash/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdash/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/tdash/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdoge/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/tdoge/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdoge/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/tdoge/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tdoge/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdoge/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/tdoge/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tdoge/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/tdoge/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/tltc/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2shP2wsh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/recovery/backupKeyRecovery-p2wsh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/tltc/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/transactions-p2shP2wsh-p2shP2wsh.json b/modules/abstract-utxo/test/unit/fixtures/tltc/transactions-p2shP2wsh-p2shP2wsh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/transactions-p2shP2wsh-p2shP2wsh.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/transactions-p2shP2wsh-p2shP2wsh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/transactions-p2wsh-p2wsh.json b/modules/abstract-utxo/test/unit/fixtures/tltc/transactions-p2wsh-p2wsh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tltc/transactions-p2wsh-p2wsh.json rename to modules/abstract-utxo/test/unit/fixtures/tltc/transactions-p2wsh-p2wsh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tzec/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/tzec/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tzec/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/tzec/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tzec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/tzec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tzec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/tzec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tzec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/tzec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tzec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/tzec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tzec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tzec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tzec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tzec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tzec/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/tzec/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tzec/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/tzec/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tzec/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/tzec/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tzec/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/tzec/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tzec/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/tzec/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tzec/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/tzec/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/tzec/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/tzec/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/tzec/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/tzec/transactions-p2sh-p2sh.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/zec/addresses-by-chain.json b/modules/abstract-utxo/test/unit/fixtures/zec/addresses-by-chain.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/zec/addresses-by-chain.json rename to modules/abstract-utxo/test/unit/fixtures/zec/addresses-by-chain.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/zec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json b/modules/abstract-utxo/test/unit/fixtures/zec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/zec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json rename to modules/abstract-utxo/test/unit/fixtures/zec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-customUserKeyPath.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/zec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json b/modules/abstract-utxo/test/unit/fixtures/zec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/zec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json rename to modules/abstract-utxo/test/unit/fixtures/zec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery-fixedFeeRate.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/zec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/zec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/zec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/zec/recovery/backupKeyRecovery-p2sh-fullSignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/zec/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json b/modules/abstract-utxo/test/unit/fixtures/zec/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/zec/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json rename to modules/abstract-utxo/test/unit/fixtures/zec/recovery/backupKeyRecovery-p2sh-keyRecoveryService-dai.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/zec/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json b/modules/abstract-utxo/test/unit/fixtures/zec/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/zec/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json rename to modules/abstract-utxo/test/unit/fixtures/zec/recovery/backupKeyRecovery-p2sh-keyRecoveryService-keyternal.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/zec/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json b/modules/abstract-utxo/test/unit/fixtures/zec/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/zec/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json rename to modules/abstract-utxo/test/unit/fixtures/zec/recovery/backupKeyRecovery-p2sh-unsignedRecovery.json diff --git a/modules/bitgo/test/v2/unit/coins/utxo/fixtures/zec/transactions-p2sh-p2sh.json b/modules/abstract-utxo/test/unit/fixtures/zec/transactions-p2sh-p2sh.json similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/fixtures/zec/transactions-p2sh-p2sh.json rename to modules/abstract-utxo/test/unit/fixtures/zec/transactions-p2sh-p2sh.json diff --git a/modules/abstract-utxo/test/unit/impl/bch/unit/bch.ts b/modules/abstract-utxo/test/unit/impl/bch/unit/bch.ts index 08e2be2f4d..258f4a5799 100644 --- a/modules/abstract-utxo/test/unit/impl/bch/unit/bch.ts +++ b/modules/abstract-utxo/test/unit/impl/bch/unit/bch.ts @@ -1,6 +1,3 @@ -/** - * @prettier - */ import { BitGoAPI } from '@bitgo/sdk-api'; import { TestBitGo, TestBitGoAPI } from '@bitgo/sdk-test'; diff --git a/modules/bitgo/test/v2/unit/coins/utxo/keySignatures.ts b/modules/abstract-utxo/test/unit/keySignatures.ts similarity index 94% rename from modules/bitgo/test/v2/unit/coins/utxo/keySignatures.ts rename to modules/abstract-utxo/test/unit/keySignatures.ts index 4c03cc2dd6..fec84ef3eb 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/keySignatures.ts +++ b/modules/abstract-utxo/test/unit/keySignatures.ts @@ -1,7 +1,9 @@ import * as assert from 'assert'; -import { AbstractUtxoCoin } from '@bitgo/abstract-utxo'; + import { Keychain } from '@bitgo/sdk-core'; +import { AbstractUtxoCoin } from '../../src'; + import { utxoCoins } from './util'; function describeWithCoin(coin: AbstractUtxoCoin) { diff --git a/modules/bitgo/test/v2/unit/coins/utxo/keychains.ts b/modules/abstract-utxo/test/unit/keychains.ts similarity index 87% rename from modules/bitgo/test/v2/unit/coins/utxo/keychains.ts rename to modules/abstract-utxo/test/unit/keychains.ts index fad51bcb68..321288c37b 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/keychains.ts +++ b/modules/abstract-utxo/test/unit/keychains.ts @@ -1,6 +1,8 @@ import * as assert from 'assert'; + import 'should'; -import { AbstractUtxoCoin } from '@bitgo/abstract-utxo'; +import { AbstractUtxoCoin } from '../../src'; + import { utxoCoins } from './util'; function run(coin: AbstractUtxoCoin) { diff --git a/modules/bitgo/test/v2/unit/coins/utxo/prebuildAndSign.ts b/modules/abstract-utxo/test/unit/prebuildAndSign.ts similarity index 96% rename from modules/bitgo/test/v2/unit/coins/utxo/prebuildAndSign.ts rename to modules/abstract-utxo/test/unit/prebuildAndSign.ts index d9893ddc53..ab021a6f15 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/prebuildAndSign.ts +++ b/modules/abstract-utxo/test/unit/prebuildAndSign.ts @@ -1,16 +1,13 @@ -/** - * @prettier - */ import * as assert from 'assert'; -import { AbstractUtxoCoin, getReplayProtectionAddresses } from '@bitgo/abstract-utxo'; import * as utxolib from '@bitgo/utxo-lib'; import nock = require('nock'); - -import { encryptKeychain, getDefaultWalletKeys, getUtxoWallet, keychainsBase58, utxoCoins } from './util'; import { common, HalfSignedUtxoTransaction, Wallet } from '@bitgo/sdk-core'; -import { getSeed, TestBitGo } from '@bitgo/sdk-test'; -import { BitGo } from '../../../../../src'; +import { getSeed } from '@bitgo/sdk-test'; + +import { AbstractUtxoCoin, getReplayProtectionAddresses } from '../../src'; + +import { defaultBitGo, encryptKeychain, getDefaultWalletKeys, getUtxoWallet, keychainsBase58, utxoCoins } from './util'; const txFormats = ['legacy', 'psbt'] as const; export type TxFormat = (typeof txFormats)[number]; @@ -181,8 +178,7 @@ function run(coin: AbstractUtxoCoin, inputScripts: ScriptType[], txFormat: TxFor id: 'walletId', }); - const bitgo = TestBitGo.decorate(BitGo, { env: 'mock' }); - const bgUrl = common.Environments[bitgo.getEnv()].uri; + const bgUrl = common.Environments[defaultBitGo.getEnv()].uri; let prebuild: utxolib.bitgo.UtxoPsbt; let recipient: { address: string; amount: string }; let addressInfo: Record; diff --git a/modules/bitgo/test/v2/unit/coins/utxo/recovery/backupKeyRecovery.ts b/modules/abstract-utxo/test/unit/recovery/backupKeyRecovery.ts similarity index 98% rename from modules/bitgo/test/v2/unit/coins/utxo/recovery/backupKeyRecovery.ts rename to modules/abstract-utxo/test/unit/recovery/backupKeyRecovery.ts index 2f07d2ad59..e9d09aa351 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/recovery/backupKeyRecovery.ts +++ b/modules/abstract-utxo/test/unit/recovery/backupKeyRecovery.ts @@ -1,27 +1,18 @@ -/** - * @prettier - */ import 'should'; import * as mocha from 'mocha'; import * as sinon from 'sinon'; import nock = require('nock'); import { BIP32Interface } from '@bitgo/utxo-lib'; - import * as utxolib from '@bitgo/utxo-lib'; -const { toOutput, outputScripts } = utxolib.bitgo; -type WalletUnspent = utxolib.bitgo.WalletUnspent; -type RootWalletKeys = utxolib.bitgo.RootWalletKeys; -type ScriptType2Of3 = utxolib.bitgo.outputScripts.ScriptType2Of3; +import { Config, krsProviders, Triple } from '@bitgo/sdk-core'; -import { Config } from '../../../../../../src/config'; import { AbstractUtxoCoin, backupKeyRecovery, BackupKeyRecoveryTransansaction, CoingeckoApi, FormattedOfflineVaultTxInfo, -} from '@bitgo/abstract-utxo'; - +} from '../../../src'; import { defaultBitGo, encryptKeychain, @@ -36,7 +27,11 @@ import { } from '../util'; import { MockRecoveryProvider } from './mock'; -import { krsProviders, Triple } from '@bitgo/sdk-core'; + +const { toOutput, outputScripts } = utxolib.bitgo; +type WalletUnspent = utxolib.bitgo.WalletUnspent; +type RootWalletKeys = utxolib.bitgo.RootWalletKeys; +type ScriptType2Of3 = utxolib.bitgo.outputScripts.ScriptType2Of3; const config = { krsProviders }; diff --git a/modules/bitgo/test/v2/unit/coins/utxo/recovery/crossChainRecovery.ts b/modules/abstract-utxo/test/unit/recovery/crossChainRecovery.ts similarity index 99% rename from modules/bitgo/test/v2/unit/coins/utxo/recovery/crossChainRecovery.ts rename to modules/abstract-utxo/test/unit/recovery/crossChainRecovery.ts index f482ac0501..6e5269d540 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/recovery/crossChainRecovery.ts +++ b/modules/abstract-utxo/test/unit/recovery/crossChainRecovery.ts @@ -1,11 +1,19 @@ -/** - * @prettier - */ import * as assert from 'assert'; + import should = require('should'); import nock = require('nock'); import * as utxolib from '@bitgo/utxo-lib'; import { Triple } from '@bitgo/sdk-core'; +import { getSeed } from '@bitgo/sdk-test'; +import * as sinon from 'sinon'; + +import { + AbstractUtxoCoin, + CrossChainRecoverySigned, + CrossChainRecoveryUnsigned, + getWallet, + supportedCrossChainRecoveries, +} from '../../../src'; import { getFixture, keychainsBase58, @@ -18,19 +26,11 @@ import { defaultBitGo, getUtxoCoin, } from '../util'; -import { getSeed } from '@bitgo/sdk-test'; import { nockBitGo } from '../util/nockBitGo'; import { createFullSignedTransaction } from '../util/transaction'; import { getDefaultWalletUnspentSigner } from '../util/keychains'; + import { MockCrossChainRecoveryProvider } from './mock'; -import { - AbstractUtxoCoin, - CrossChainRecoverySigned, - CrossChainRecoveryUnsigned, - getWallet, - supportedCrossChainRecoveries, -} from '@bitgo/abstract-utxo'; -import * as sinon from 'sinon'; type WalletUnspent = utxolib.bitgo.WalletUnspent; diff --git a/modules/bitgo/test/v2/unit/coins/utxo/recovery/mock.ts b/modules/abstract-utxo/test/unit/recovery/mock.ts similarity index 95% rename from modules/bitgo/test/v2/unit/coins/utxo/recovery/mock.ts rename to modules/abstract-utxo/test/unit/recovery/mock.ts index ccb7fe771e..3922ed9e26 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/recovery/mock.ts +++ b/modules/abstract-utxo/test/unit/recovery/mock.ts @@ -1,12 +1,10 @@ -/** - * @prettier - */ import { bitgo } from '@bitgo/utxo-lib'; import { AddressInfo, TransactionIO } from '@bitgo/blockapis'; -import { AbstractUtxoCoin, RecoveryProvider } from '@bitgo/abstract-utxo'; import * as utxolib from '@bitgo/utxo-lib'; -import { Bch } from '@bitgo/sdk-coin-bch'; -import { Bsv } from '@bitgo/sdk-coin-bsv'; + +import { AbstractUtxoCoin, RecoveryProvider } from '../../../src'; +import { Bch } from '../../../src/impl/bch'; +import { Bsv } from '../../../src/impl/bsv'; type Unspent = bitgo.Unspent; export class MockRecoveryProvider implements RecoveryProvider { diff --git a/modules/bitgo/test/v2/unit/coins/utxo/transaction.ts b/modules/abstract-utxo/test/unit/transaction.ts similarity index 98% rename from modules/bitgo/test/v2/unit/coins/utxo/transaction.ts rename to modules/abstract-utxo/test/unit/transaction.ts index 3b30f218c4..01b071bad0 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/transaction.ts +++ b/modules/abstract-utxo/test/unit/transaction.ts @@ -1,14 +1,19 @@ -/** - * @prettier - */ import 'mocha'; -import * as _ from 'lodash'; import * as assert from 'assert'; + +import * as _ from 'lodash'; import * as utxolib from '@bitgo/utxo-lib'; import nock = require('nock'); import { BIP32Interface, bitgo, testutil } from '@bitgo/utxo-lib'; +import { + common, + FullySignedTransaction, + HalfSignedUtxoTransaction, + Triple, + WalletSignTransactionOptions, +} from '@bitgo/sdk-core'; -import { AbstractUtxoCoin, getReplayProtectionAddresses } from '@bitgo/abstract-utxo'; +import { AbstractUtxoCoin, getReplayProtectionAddresses } from '../../src'; import { utxoCoins, @@ -25,18 +30,9 @@ import { getUtxoCoin, keychainsBase58, getWalletKeys, + defaultBitGo, } from './util'; -import { - common, - FullySignedTransaction, - HalfSignedUtxoTransaction, - Triple, - WalletSignTransactionOptions, -} from '@bitgo/sdk-core'; -import { TestBitGo } from '@bitgo/sdk-test'; -import { BitGo } from '../../../../../src'; - type Unspent = bitgo.Unspent; type WalletUnspent = bitgo.WalletUnspent; @@ -45,7 +41,7 @@ function getScriptTypes2Of3() { } describe(`UTXO coin signTransaction`, async function () { - const bgUrl = common.Environments[TestBitGo.decorate(BitGo, { env: 'mock' }).getEnv()].uri; + const bgUrl = common.Environments[defaultBitGo.getEnv()].uri; const coin = getUtxoCoin('btc'); const wallet = getUtxoWallet(coin, { id: '5b34252f1bf349930e34020a00000000', coin: coin.getChain() }); @@ -280,7 +276,7 @@ function run( describe(`Transaction Stages ${coin.getChain()} (${amountType}) scripts=${inputScripts.join( ',' )} txFormat=${txFormat}`, function () { - const bgUrl = common.Environments[TestBitGo.decorate(BitGo, { env: 'mock' }).getEnv()].uri; + const bgUrl = common.Environments[defaultBitGo.getEnv()].uri; const isTransactionWithKeyPathSpend = inputScripts.some((s) => s === 'taprootKeyPathSpend'); const isTransactionWithReplayProtection = inputScripts.some((s) => s === 'p2shP2pk'); diff --git a/modules/bitgo/test/v2/unit/coins/utxo/util/fixtures.ts b/modules/abstract-utxo/test/unit/util/fixtures.ts similarity index 91% rename from modules/bitgo/test/v2/unit/coins/utxo/util/fixtures.ts rename to modules/abstract-utxo/test/unit/util/fixtures.ts index a5a5c2bde9..56c60dd237 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/util/fixtures.ts +++ b/modules/abstract-utxo/test/unit/util/fixtures.ts @@ -1,11 +1,8 @@ -/** - * @prettier - */ import 'should'; -import * as fs from 'fs-extra'; import * as mpath from 'path'; +import * as fs from 'fs/promises'; -import { AbstractUtxoCoin } from '@bitgo/abstract-utxo'; +import { AbstractUtxoCoin } from '../../../src'; function serializeBigInt(k: string, v: any): string | number { if (typeof v === 'bigint') { @@ -24,7 +21,7 @@ async function getFixtureWithName(name: string, defaultValue: T, rawCoinName: if (e.code !== 'ENOENT') { throw e; } - await fs.mkdirp(dirname); + await fs.mkdir(dirname, { recursive: true }); } try { let textContent = await fs.readFile(path, 'utf8'); diff --git a/modules/bitgo/test/v2/unit/coins/utxo/util/index.ts b/modules/abstract-utxo/test/unit/util/index.ts similarity index 100% rename from modules/bitgo/test/v2/unit/coins/utxo/util/index.ts rename to modules/abstract-utxo/test/unit/util/index.ts diff --git a/modules/bitgo/test/v2/unit/coins/utxo/util/keychains.ts b/modules/abstract-utxo/test/unit/util/keychains.ts similarity index 99% rename from modules/bitgo/test/v2/unit/coins/utxo/util/keychains.ts rename to modules/abstract-utxo/test/unit/util/keychains.ts index b40c6008bc..4d9a3063ec 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/util/keychains.ts +++ b/modules/abstract-utxo/test/unit/util/keychains.ts @@ -1,6 +1,3 @@ -/** - * @prettier - */ import { Triple } from '@bitgo/sdk-core'; import { encrypt } from '@bitgo/sdk-api'; import { getSeed } from '@bitgo/sdk-test'; diff --git a/modules/bitgo/test/v2/unit/coins/utxo/util/nockBitGo.ts b/modules/abstract-utxo/test/unit/util/nockBitGo.ts similarity index 99% rename from modules/bitgo/test/v2/unit/coins/utxo/util/nockBitGo.ts rename to modules/abstract-utxo/test/unit/util/nockBitGo.ts index 536f3fa221..cd4cbd7983 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/util/nockBitGo.ts +++ b/modules/abstract-utxo/test/unit/util/nockBitGo.ts @@ -1,5 +1,6 @@ import nock = require('nock'); import { Environment, Environments } from '@bitgo/sdk-core'; + import { defaultBitGo } from './utxoCoins'; export function nockBitGo(bitgo = defaultBitGo): nock.Scope { diff --git a/modules/bitgo/test/v2/unit/coins/utxo/util/nockIndexerAPI.ts b/modules/abstract-utxo/test/unit/util/nockIndexerAPI.ts similarity index 94% rename from modules/bitgo/test/v2/unit/coins/utxo/util/nockIndexerAPI.ts rename to modules/abstract-utxo/test/unit/util/nockIndexerAPI.ts index 418e6a4907..0ebf5754ca 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/util/nockIndexerAPI.ts +++ b/modules/abstract-utxo/test/unit/util/nockIndexerAPI.ts @@ -1,9 +1,8 @@ -/** - * @prettier - */ import nock = require('nock'); import * as utxolib from '@bitgo/utxo-lib'; -import { AbstractUtxoCoin } from '@bitgo/abstract-utxo'; + +import { AbstractUtxoCoin } from '../../../src'; + import { nockBitGo } from './nockBitGo'; interface ImsUnspent { diff --git a/modules/bitgo/test/v2/unit/coins/utxo/util/transaction.ts b/modules/abstract-utxo/test/unit/util/transaction.ts similarity index 99% rename from modules/bitgo/test/v2/unit/coins/utxo/util/transaction.ts rename to modules/abstract-utxo/test/unit/util/transaction.ts index 6bf3078ba9..7ca5fa150b 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/util/transaction.ts +++ b/modules/abstract-utxo/test/unit/util/transaction.ts @@ -1,6 +1,3 @@ -/** - * @prettier - */ import * as utxolib from '@bitgo/utxo-lib'; const { isWalletUnspent, signInputWithUnspent } = utxolib.bitgo; type RootWalletKeys = utxolib.bitgo.RootWalletKeys; diff --git a/modules/bitgo/test/v2/unit/coins/utxo/util/unspents.ts b/modules/abstract-utxo/test/unit/util/unspents.ts similarity index 97% rename from modules/bitgo/test/v2/unit/coins/utxo/util/unspents.ts rename to modules/abstract-utxo/test/unit/util/unspents.ts index 49477647ef..dbb8cd7a29 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/util/unspents.ts +++ b/modules/abstract-utxo/test/unit/util/unspents.ts @@ -1,7 +1,8 @@ -/** - * @prettier - */ import * as utxolib from '@bitgo/utxo-lib'; +import { getSeed } from '@bitgo/sdk-test'; + +import { getReplayProtectionAddresses } from '../../../src'; + const { scriptTypeForChain, chainCodesP2sh, getExternalChainCode, getInternalChainCode } = utxolib.bitgo; type RootWalletKeys = utxolib.bitgo.RootWalletKeys; @@ -9,9 +10,6 @@ type Unspent = utxolib.bitgo.Unspent = utxolib.bitgo.WalletUnspent; type ChainCode = utxolib.bitgo.ChainCode; -import { getSeed } from '@bitgo/sdk-test'; -import { getReplayProtectionAddresses } from '@bitgo/abstract-utxo'; - export type InputScriptType = utxolib.bitgo.outputScripts.ScriptType2Of3 | 'replayProtection'; const defaultChain: ChainCode = getExternalChainCode(chainCodesP2sh); diff --git a/modules/abstract-utxo/test/unit/util/utxoCoins.ts b/modules/abstract-utxo/test/unit/util/utxoCoins.ts new file mode 100644 index 0000000000..15c093f564 --- /dev/null +++ b/modules/abstract-utxo/test/unit/util/utxoCoins.ts @@ -0,0 +1,84 @@ +import * as utxolib from '@bitgo/utxo-lib'; +import { BitGoAPI } from '@bitgo/sdk-api'; +import { TestBitGo } from '@bitgo/sdk-test'; + +import { + AbstractUtxoCoin, + Btc, + Tbtc, + Tbtc4, + Tbtcsig, + Tbtcbgsig, + Bch, + Tbch, + Bcha, + Tbcha, + Bsv, + Tbsv, + Btg, + Ltc, + Tltc, + Dash, + Tdash, + Doge, + Tdoge, + Zec, + Tzec, +} from '../../../src'; + +export const defaultBitGo = TestBitGo.decorate(BitGoAPI, { env: 'mock' }); + +const utxoCoinClasses = [ + Btc, + Tbtc, + Tbtc4, + Tbtcsig, + Tbtcbgsig, + Bch, + Tbch, + Bcha, + Tbcha, + Bsv, + Tbsv, + Btg, + Ltc, + Tltc, + Dash, + Tdash, + Doge, + Tdoge, + Zec, + Tzec, +]; + +function getUtxoCoins(bitgo: BitGoAPI = defaultBitGo): AbstractUtxoCoin[] { + return utxoCoinClasses + .map((cls): AbstractUtxoCoin => { + try { + return cls.createInstance(bitgo); + } catch (e) { + throw new Error(`error creating ${cls.name}: ${e}`); + } + }) + .sort((a, b) => utxolib.getNetworkList().indexOf(a.network) - utxolib.getNetworkList().indexOf(b.network)); +} + +export const utxoCoins = getUtxoCoins(); + +export function getUtxoCoin(name: string): AbstractUtxoCoin { + for (const c of utxoCoins) { + if (c.getChain() === name) { + return c; + } + } + throw new Error(`no coin with name ${name}`); +} + +export function getUtxoCoinForNetwork(n: utxolib.Network): AbstractUtxoCoin { + for (const c of utxoCoins) { + if (c.network === n) { + return c; + } + } + throw new Error(`no coin for network ${utxolib.getNetworkName(n)}`); +} diff --git a/modules/bitgo/test/v2/unit/coins/utxo/util/wallet.ts b/modules/abstract-utxo/test/unit/util/wallet.ts similarity index 79% rename from modules/bitgo/test/v2/unit/coins/utxo/util/wallet.ts rename to modules/abstract-utxo/test/unit/util/wallet.ts index 5e3d82417a..f9c25c5311 100644 --- a/modules/bitgo/test/v2/unit/coins/utxo/util/wallet.ts +++ b/modules/abstract-utxo/test/unit/util/wallet.ts @@ -1,5 +1,7 @@ -import { AbstractUtxoCoin } from '@bitgo/abstract-utxo'; import { Wallet } from '@bitgo/sdk-core'; + +import { AbstractUtxoCoin } from '../../../src'; + import { defaultBitGo } from './utxoCoins'; export function getUtxoWallet(coin: AbstractUtxoCoin, walletData = {}): Wallet { diff --git a/modules/abstract-utxo/test/unit/wallet.ts b/modules/abstract-utxo/test/unit/wallet.ts new file mode 100644 index 0000000000..6835b108f8 --- /dev/null +++ b/modules/abstract-utxo/test/unit/wallet.ts @@ -0,0 +1,287 @@ +import * as utxoLib from '@bitgo/utxo-lib'; +import 'should'; +import nock = require('nock'); +import * as _ from 'lodash'; +import { Wallet, ManageUnspentsOptions, common } from '@bitgo/sdk-core'; + +import { defaultBitGo, getDefaultWalletKeys, toKeychainObjects, getUtxoCoin } from './util'; + +const bgUrl = common.Environments[defaultBitGo.getEnv()].uri; +const bitgo = defaultBitGo; + +describe('manage unspents', function () { + let rootWalletKey; + let walletPassphrase; + let basecoin; + let wallet; + let keysObj; + + before(async function () { + rootWalletKey = getDefaultWalletKeys(); + walletPassphrase = 'fixthemoneyfixtheworld'; + keysObj = toKeychainObjects(rootWalletKey, walletPassphrase); + basecoin = getUtxoCoin('tbtc'); + const walletData = { + id: '5b34252f1bf349930e34020a', + coin: 'tbtc', + keys: keysObj.map((k) => k.id), + }; + wallet = new Wallet(bitgo, basecoin, walletData); + }); + + it('should pass for bulk consolidating unspents', async function () { + const psbts = (['p2wsh', 'p2shP2wsh'] as const).map((scriptType) => + utxoLib.testutil.constructPsbt( + [{ scriptType, value: BigInt(1000) }], + [{ scriptType, value: BigInt(900) }], + basecoin.network, + rootWalletKey, + 'unsigned' + ) + ); + psbts.forEach((psbt) => utxoLib.bitgo.addXpubsToPsbt(psbt, rootWalletKey)); + const txHexes = psbts.map((psbt) => ({ txHex: psbt.toHex() })); + + const nocks: nock.Scope[] = []; + nocks.push( + nock(bgUrl).post(`/api/v2/${wallet.coin()}/wallet/${wallet.id()}/consolidateUnspents`).reply(200, txHexes) + ); + + nocks.push( + ...keysObj.map((k, i) => nock(bgUrl).get(`/api/v2/${wallet.coin()}/key/${wallet.keyIds()[i]}`).reply(200, k)) + ); + + nocks.push( + ...psbts.map((psbt) => + nock(bgUrl) + .post( + `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/tx/send`, + _.matches({ txHex: psbt.signAllInputsHD(rootWalletKey.user).toHex() }) + ) + .reply(200) + ) + ); + + await wallet.consolidateUnspents({ bulk: true, walletPassphrase }); + + nocks.forEach((n) => { + n.isDone().should.be.true(); + }); + }); + + it('should pass for single consolidating unspents', async function () { + const psbt = utxoLib.testutil.constructPsbt( + [{ scriptType: 'p2wsh', value: BigInt(1000) }], + [{ scriptType: 'p2shP2wsh', value: BigInt(900) }], + basecoin.network, + rootWalletKey, + 'unsigned' + ); + utxoLib.bitgo.addXpubsToPsbt(psbt, rootWalletKey); + + const nocks: nock.Scope[] = []; + nocks.push( + nock(bgUrl) + .post(`/api/v2/${wallet.coin()}/wallet/${wallet.id()}/consolidateUnspents`) + .reply(200, { txHex: psbt.toHex() }) + ); + + nocks.push( + ...keysObj.map((k, i) => nock(bgUrl).get(`/api/v2/${wallet.coin()}/key/${wallet.keyIds()[i]}`).reply(200, k)) + ); + + nocks.push( + nock(bgUrl) + .post( + `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/tx/send`, + _.matches({ txHex: psbt.signAllInputsHD(rootWalletKey.user).toHex() }) + ) + .reply(200) + ); + + await wallet.consolidateUnspents({ walletPassphrase }); + + nocks.forEach((n) => { + n.isDone().should.be.true(); + }); + }); +}); +describe('max recipient', function () { + const address = '5b34252f1bf349930e34020a'; + const recipients = [ + { + address, + amount: 'max', + }, + ]; + let basecoin; + let wallet; + + before(async function () { + basecoin = getUtxoCoin('tbtc'); + const walletData = { + id: '5b34252f1bf349930e34020a', + coin: 'tbtc', + keys: ['5b3424f91bf349930e340175'], + }; + wallet = new Wallet(bitgo, basecoin, walletData); + }); + + it('should pass maxFeeRate parameter when building transactions', async function () { + const path = `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/tx/build`; + const response = nock(bgUrl) + .post( + path, + _.matches({ + recipients, + }) + ) // use _.matches to do a partial match on request body object instead of strict matching + .reply(200); + + try { + await wallet.prebuildTransaction({ recipients }); + } catch (e) { + // the prebuildTransaction method will probably throw an exception for not having all of the correct nocks + // we only care about /tx/build and whether maxFeeRate is an allowed parameter + } + + response.isDone().should.be.true(); + }); +}); + +describe('maxFeeRate verification', function () { + const address = '5b34252f1bf349930e34020a'; + const recipients = [ + { + address, + amount: 0, + }, + ]; + const maxFeeRate = 10000; + let basecoin; + let wallet; + + before(async function () { + basecoin = getUtxoCoin('tbtc'); + const walletData = { + id: '5b34252f1bf349930e34020a', + coin: 'tbtc', + keys: ['5b3424f91bf349930e340175'], + }; + wallet = new Wallet(bitgo, basecoin, walletData); + }); + + it('should pass maxFeeRate parameter when building transactions', async function () { + const path = `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/tx/build`; + const response = nock(bgUrl) + .post(path, _.matches({ recipients, maxFeeRate })) // use _.matches to do a partial match on request body object instead of strict matching + .reply(200); + + try { + await wallet.prebuildTransaction({ recipients, maxFeeRate }); + } catch (e) { + // the prebuildTransaction method will probably throw an exception for not having all of the correct nocks + // we only care about /tx/build and whether maxFeeRate is an allowed parameter + } + + response.isDone().should.be.true(); + }); + + it('should pass maxFeeRate parameter when consolidating unspents', async function () { + const path = `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/consolidateUnspents`; + const response = nock(bgUrl) + .post(path, _.matches({ maxFeeRate })) // use _.matches to do a partial match on request body object instead of strict matching + .reply(200); + + nock(bgUrl).get(`/api/v2/${wallet.coin()}/key/${wallet.keyIds()[0]}`).reply(200); + + try { + await wallet.consolidateUnspents({ recipients, maxFeeRate }); + } catch (e) { + // the consolidateUnspents method will probably throw an exception for not having all of the correct nocks + // we only care about /consolidateUnspents and whether maxFeeRate is an allowed parameter + } + + response.isDone().should.be.true(); + }); + + it('should only build tx (not sign/send) while consolidating unspents', async function () { + const toBeUsedNock = nock(bgUrl); + toBeUsedNock.post(`/api/v2/${wallet.coin()}/wallet/${wallet.id()}/consolidateUnspents`).reply(200); + + const unusedNocks = nock(bgUrl); + unusedNocks.get(`/api/v2/${wallet.coin()}/key/${wallet.keyIds()[0]}`).reply(200); + unusedNocks.post(`/api/v2/${wallet.coin()}/wallet/${wallet.id()}/tx/send`).reply(200); + + await wallet.consolidateUnspents({ recipients }, ManageUnspentsOptions.BUILD_ONLY); + + toBeUsedNock.isDone().should.be.true(); + unusedNocks.pendingMocks().length.should.eql(2); + nock.cleanAll(); + }); + + it('should pass maxFeeRate parameter when calling sweep wallets', async function () { + const path = `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/sweepWallet`; + const response = nock(bgUrl) + .post(path, _.matches({ address, maxFeeRate })) // use _.matches to do a partial match on request body object instead of strict matching + .reply(200); + + try { + await wallet.sweep({ address, maxFeeRate }); + } catch (e) { + // the sweep method will probably throw an exception for not having all of the correct nocks + // we only care about /sweepWallet and whether maxFeeRate is an allowed parameter + } + + response.isDone().should.be.true(); + }); + + it('should pass maxFeeRate parameter when calling fanout unspents', async function () { + const path = `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/fanoutUnspents`; + const response = nock(bgUrl) + .post(path, _.matches({ maxFeeRate })) // use _.matches to do a partial match on request body object instead of strict matching + .reply(200); + + try { + await wallet.fanoutUnspents({ address, maxFeeRate }); + } catch (e) { + // the fanoutUnspents method will probably throw an exception for not having all of the correct nocks + // we only care about /fanoutUnspents and whether maxFeeRate is an allowed parameter + } + + response.isDone().should.be.true(); + }); +}); + +describe('allowPartialSweep verification', function () { + const address = '5b34252f1bf349930e34020a'; + const allowPartialSweep = true; + let basecoin; + let wallet; + + before(async function () { + basecoin = getUtxoCoin('tbtc'); + const walletData = { + id: '5b34252f1bf349930e34020a', + coin: 'tbtc', + keys: ['5b3424f91bf349930e340175'], + }; + wallet = new Wallet(bitgo, basecoin, walletData); + }); + + it('should pass allowPartialSweep parameter when calling sweep wallets', async function () { + const path = `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/sweepWallet`; + const response = nock(bgUrl) + .post(path, _.matches({ address, allowPartialSweep })) // use _.matches to do a partial match on request body object instead of strict matching + .reply(200); + + try { + await wallet.sweep({ address, allowPartialSweep }); + } catch (e) { + // the sweep method will probably throw an exception for not having all of the correct nocks + // we only care about /sweepWallet and whether allowPartialSweep is an allowed parameter + } + + response.isDone().should.be.true(); + }); +}); diff --git a/modules/bitgo/package.json b/modules/bitgo/package.json index c1f1983760..6ba2606051 100644 --- a/modules/bitgo/package.json +++ b/modules/bitgo/package.json @@ -47,7 +47,6 @@ "@bitgo/abstract-lightning": "^7.4.0", "@bitgo/abstract-utxo": "^10.1.0", "@bitgo/account-lib": "^27.14.0", - "@bitgo/blockapis": "^1.12.4", "@bitgo/sdk-api": "^1.71.0", "@bitgo/sdk-coin-ada": "^4.17.2", "@bitgo/sdk-coin-algo": "^2.6.0", @@ -131,7 +130,6 @@ "@bitgo/utxo-lib": "^11.13.1", "@types/superagent": "^4.1.3", "bignumber.js": "^9.1.1", - "fs-extra": "^9.1.0", "lodash": "^4.17.14", "openpgp": "5.11.3", "stellar-sdk": "^10.0.1", diff --git a/modules/bitgo/test/v2/unit/coins/utxo/util/utxoCoins.ts b/modules/bitgo/test/v2/unit/coins/utxo/util/utxoCoins.ts deleted file mode 100644 index 7910956da5..0000000000 --- a/modules/bitgo/test/v2/unit/coins/utxo/util/utxoCoins.ts +++ /dev/null @@ -1,57 +0,0 @@ -/** - * @prettier - */ -import * as utxolib from '@bitgo/utxo-lib'; -import * as coins from '../../../../../../src/v2/coins'; -import { AbstractUtxoCoin } from '@bitgo/abstract-utxo'; -import { TestBitGo } from '@bitgo/sdk-test'; -import { BitGo } from '../../../../../../src/bitgo'; - -const AbstractUtxoCoinCtor = AbstractUtxoCoin as unknown as ObjectConstructor; - -function getPrototypeChain(c: ObjectConstructor): ObjectConstructor[] { - if (!c) { - return []; - } - return [c, ...getPrototypeChain(Object.getPrototypeOf(c))]; -} - -function hasAbstractUtxoCoinPrototype(c: ObjectConstructor): boolean { - return getPrototypeChain(c).includes(AbstractUtxoCoinCtor); -} - -export const defaultBitGo = TestBitGo.decorate(BitGo, { env: 'mock' }); - -function getUtxoCoins(bitgo: BitGo = defaultBitGo): AbstractUtxoCoin[] { - return Object.values(coins) - .map((c) => c as unknown as ObjectConstructor) - .filter((cls) => hasAbstractUtxoCoinPrototype(cls) && cls !== AbstractUtxoCoinCtor) - .map((cls) => { - try { - return new cls(bitgo) as AbstractUtxoCoin; - } catch (e) { - throw new Error(`error creating ${cls.name}: ${e}`); - } - }) - .sort((a, b) => utxolib.getNetworkList().indexOf(a.network) - utxolib.getNetworkList().indexOf(b.network)); -} - -export const utxoCoins = getUtxoCoins(); - -export function getUtxoCoin(name: string): AbstractUtxoCoin { - for (const c of utxoCoins) { - if (c.getChain() === name) { - return c; - } - } - throw new Error(`no coin with name ${name}`); -} - -export function getUtxoCoinForNetwork(n: utxolib.Network): AbstractUtxoCoin { - for (const c of utxoCoins) { - if (c.network === n) { - return c; - } - } - throw new Error(`no coin for network ${utxolib.getNetworkName(n)}`); -} diff --git a/modules/bitgo/test/v2/unit/wallet.ts b/modules/bitgo/test/v2/unit/wallet.ts index 0cfadb0789..ac95b2c1fe 100644 --- a/modules/bitgo/test/v2/unit/wallet.ts +++ b/modules/bitgo/test/v2/unit/wallet.ts @@ -11,7 +11,6 @@ import * as _ from 'lodash'; import { BaseTssUtils, common, - CustomSigningFunction, Ecdsa, ECDSAUtils, EDDSAUtils, @@ -43,7 +42,6 @@ import { TestBitGo } from '@bitgo/sdk-test'; import { BitGo } from '../../../src'; import * as utxoLib from '@bitgo/utxo-lib'; import { randomBytes } from 'crypto'; -import { getDefaultWalletKeys, toKeychainObjects } from './coins/utxo/util'; import { Tsol } from '@bitgo/sdk-coin-sol'; import { Teth } from '@bitgo/sdk-coin-eth'; @@ -412,94 +410,6 @@ describe('V2 Wallet:', function () { }); }); - describe('UTXO Custom Signer Function', function () { - const recipients = [ - { address: 'abc', amount: 123 }, - { address: 'def', amount: 456 }, - ]; - const rootWalletKey = getDefaultWalletKeys(); - let customSigningFunction: CustomSigningFunction; - let stubs: sinon.SinonStub[]; - - beforeEach(function () { - customSigningFunction = sinon.stub().returns({ - txHex: 'this-is-a-tx', - }); - stubs = [ - sinon.stub(wallet.baseCoin, 'postProcessPrebuild').returnsArg(0), - sinon.stub(wallet.baseCoin, 'verifyTransaction').resolves(true), - sinon.stub(wallet.baseCoin, 'signTransaction').resolves({ txHex: 'this-is-a-tx' }), - ]; - }); - - function nocks(txPrebuild: { txHex: string }) { - return nock(bgUrl) - .post(wallet.url('/tx/build').replace(bgUrl, '')) - .reply(200, txPrebuild) - .get(wallet.baseCoin.url('/public/block/latest').replace(bgUrl, '')) - .reply(200) - .get(wallet.baseCoin.url(`/key/${wallet.keyIds()[0]}`).replace(bgUrl, '')) - .reply(200, { pub: 'pub' }) - .get(wallet.baseCoin.url(`/key/${wallet.keyIds()[1]}`).replace(bgUrl, '')) - .reply(200, { pub: 'pub' }) - .get(wallet.baseCoin.url(`/key/${wallet.keyIds()[2]}`).replace(bgUrl, '')) - .reply(200, { pub: 'pub' }) - .post(wallet.url('/tx/send').replace(bgUrl, '')) - .reply(200, { ok: true }); - } - - it('should use a custom signing function if provided for PSBT with taprootKeyPathSpend input', async function () { - const psbt = utxoLib.testutil.constructPsbt( - [{ scriptType: 'taprootKeyPathSpend', value: BigInt(1000) }], - [{ scriptType: 'p2sh', value: BigInt(900) }], - basecoin.network, - rootWalletKey, - 'unsigned' - ); - const scope = nocks({ txHex: psbt.toHex() }); - const result = await wallet.sendMany({ recipients, customSigningFunction }); - - result.should.have.property('ok', true); - customSigningFunction.should.have.been.calledTwice(); - scope.done(); - stubs.forEach((s) => s.restore()); - }); - - it('should use a custom signing function if provided for PSBT without taprootKeyPathSpend input', async function () { - const psbt = utxoLib.testutil.constructPsbt( - [{ scriptType: 'p2wsh', value: BigInt(1000) }], - [{ scriptType: 'p2sh', value: BigInt(900) }], - basecoin.network, - rootWalletKey, - 'unsigned' - ); - const scope = nocks({ txHex: psbt.toHex() }); - const result = await wallet.sendMany({ recipients, customSigningFunction }); - - result.should.have.property('ok', true); - customSigningFunction.should.have.been.calledOnce(); - scope.done(); - stubs.forEach((s) => s.restore()); - }); - - it('should use a custom signing function if provided for Tx without taprootKeyPathSpend input', async function () { - const tx = utxoLib.testutil.constructTxnBuilder( - [{ scriptType: 'p2wsh', value: BigInt(1000) }], - [{ scriptType: 'p2sh', value: BigInt(900) }], - basecoin.network, - rootWalletKey, - 'unsigned' - ); - const scope = nocks({ txHex: tx.buildIncomplete().toHex() }); - const result = await wallet.sendMany({ recipients, customSigningFunction }); - - result.should.have.property('ok', true); - customSigningFunction.should.have.been.calledOnce(); - scope.done(); - stubs.forEach((s) => s.restore()); - }); - }); - describe('TETH Wallet Transactions', function () { let ethWallet; @@ -1640,319 +1550,6 @@ describe('V2 Wallet:', function () { }); }); - describe('manage unspents', function () { - let rootWalletKey; - let walletPassphrase; - let basecoin; - let wallet; - let keysObj; - - before(async function () { - rootWalletKey = getDefaultWalletKeys(); - walletPassphrase = 'fixthemoneyfixtheworld'; - keysObj = toKeychainObjects(rootWalletKey, walletPassphrase); - basecoin = bitgo.coin('tbtc'); - const walletData = { - id: '5b34252f1bf349930e34020a', - coin: 'tbtc', - keys: keysObj.map((k) => k.id), - }; - wallet = new Wallet(bitgo, basecoin, walletData); - }); - - it('should pass for bulk consolidating unspents', async function () { - const psbts = (['p2wsh', 'p2shP2wsh'] as const).map((scriptType) => - utxoLib.testutil.constructPsbt( - [{ scriptType, value: BigInt(1000) }], - [{ scriptType, value: BigInt(900) }], - basecoin.network, - rootWalletKey, - 'unsigned' - ) - ); - psbts.forEach((psbt) => utxoLib.bitgo.addXpubsToPsbt(psbt, rootWalletKey)); - const txHexes = psbts.map((psbt) => ({ txHex: psbt.toHex() })); - - const nocks: nock.Scope[] = []; - nocks.push( - nock(bgUrl).post(`/api/v2/${wallet.coin()}/wallet/${wallet.id()}/consolidateUnspents`).reply(200, txHexes) - ); - - nocks.push( - ...keysObj.map((k, i) => nock(bgUrl).get(`/api/v2/${wallet.coin()}/key/${wallet.keyIds()[i]}`).reply(200, k)) - ); - - nocks.push( - ...psbts.map((psbt) => - nock(bgUrl) - .post( - `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/tx/send`, - _.matches({ txHex: psbt.signAllInputsHD(rootWalletKey.user).toHex() }) - ) - .reply(200) - ) - ); - - await wallet.consolidateUnspents({ bulk: true, walletPassphrase }); - - nocks.forEach((n) => { - console.log(n); - n.isDone().should.be.true(); - }); - }); - - it('should pass for single consolidating unspents', async function () { - const psbt = utxoLib.testutil.constructPsbt( - [{ scriptType: 'p2wsh', value: BigInt(1000) }], - [{ scriptType: 'p2shP2wsh', value: BigInt(900) }], - basecoin.network, - rootWalletKey, - 'unsigned' - ); - utxoLib.bitgo.addXpubsToPsbt(psbt, rootWalletKey); - - const nocks: nock.Scope[] = []; - nocks.push( - nock(bgUrl) - .post(`/api/v2/${wallet.coin()}/wallet/${wallet.id()}/consolidateUnspents`) - .reply(200, { txHex: psbt.toHex() }) - ); - - nocks.push( - ...keysObj.map((k, i) => nock(bgUrl).get(`/api/v2/${wallet.coin()}/key/${wallet.keyIds()[i]}`).reply(200, k)) - ); - - nocks.push( - nock(bgUrl) - .post( - `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/tx/send`, - _.matches({ txHex: psbt.signAllInputsHD(rootWalletKey.user).toHex() }) - ) - .reply(200) - ); - - await wallet.consolidateUnspents({ walletPassphrase }); - - nocks.forEach((n) => { - n.isDone().should.be.true(); - }); - }); - }); - describe('max recipient', function () { - const address = '5b34252f1bf349930e34020a'; - const recipients = [ - { - address, - amount: 'max', - }, - ]; - let basecoin; - let wallet; - - before(async function () { - basecoin = bitgo.coin('tbtc'); - const walletData = { - id: '5b34252f1bf349930e34020a', - coin: 'tbtc', - keys: ['5b3424f91bf349930e340175'], - }; - wallet = new Wallet(bitgo, basecoin, walletData); - }); - - it('should pass maxFeeRate parameter when building transactions', async function () { - const path = `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/tx/build`; - const response = nock(bgUrl) - .post( - path, - _.matches({ - recipients, - }) - ) // use _.matches to do a partial match on request body object instead of strict matching - .reply(200); - - try { - await wallet.prebuildTransaction({ recipients }); - } catch (e) { - // the prebuildTransaction method will probably throw an exception for not having all of the correct nocks - // we only care about /tx/build and whether maxFeeRate is an allowed parameter - } - - response.isDone().should.be.true(); - }); - }); - - describe('maxFeeRate verification', function () { - const address = '5b34252f1bf349930e34020a'; - const recipients = [ - { - address, - amount: 0, - }, - ]; - const maxFeeRate = 10000; - let basecoin; - let wallet; - - before(async function () { - basecoin = bitgo.coin('tbtc'); - const walletData = { - id: '5b34252f1bf349930e34020a', - coin: 'tbtc', - keys: ['5b3424f91bf349930e340175'], - }; - wallet = new Wallet(bitgo, basecoin, walletData); - }); - - it('should pass maxFeeRate parameter when building transactions', async function () { - const path = `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/tx/build`; - const response = nock(bgUrl) - .post(path, _.matches({ recipients, maxFeeRate })) // use _.matches to do a partial match on request body object instead of strict matching - .reply(200); - - try { - await wallet.prebuildTransaction({ recipients, maxFeeRate }); - } catch (e) { - // the prebuildTransaction method will probably throw an exception for not having all of the correct nocks - // we only care about /tx/build and whether maxFeeRate is an allowed parameter - } - - response.isDone().should.be.true(); - }); - - it('should pass maxFeeRate parameter when consolidating unspents', async function () { - const path = `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/consolidateUnspents`; - const response = nock(bgUrl) - .post(path, _.matches({ maxFeeRate })) // use _.matches to do a partial match on request body object instead of strict matching - .reply(200); - - nock(bgUrl).get(`/api/v2/${wallet.coin()}/key/${wallet.keyIds()[0]}`).reply(200); - - try { - await wallet.consolidateUnspents({ recipients, maxFeeRate }); - } catch (e) { - // the consolidateUnspents method will probably throw an exception for not having all of the correct nocks - // we only care about /consolidateUnspents and whether maxFeeRate is an allowed parameter - } - - response.isDone().should.be.true(); - }); - - it('should only build tx (not sign/send) while consolidating unspents', async function () { - const toBeUsedNock = nock(bgUrl); - toBeUsedNock.post(`/api/v2/${wallet.coin()}/wallet/${wallet.id()}/consolidateUnspents`).reply(200); - - const unusedNocks = nock(bgUrl); - unusedNocks.get(`/api/v2/${wallet.coin()}/key/${wallet.keyIds()[0]}`).reply(200); - unusedNocks.post(`/api/v2/${wallet.coin()}/wallet/${wallet.id()}/tx/send`).reply(200); - - await wallet.consolidateUnspents({ recipients }, ManageUnspentsOptions.BUILD_ONLY); - - toBeUsedNock.isDone().should.be.true(); - unusedNocks.pendingMocks().length.should.eql(2); - nock.cleanAll(); - }); - - it('should pass maxFeeRate parameter when calling sweep wallets', async function () { - const path = `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/sweepWallet`; - const response = nock(bgUrl) - .post(path, _.matches({ address, maxFeeRate })) // use _.matches to do a partial match on request body object instead of strict matching - .reply(200); - - try { - await wallet.sweep({ address, maxFeeRate }); - } catch (e) { - // the sweep method will probably throw an exception for not having all of the correct nocks - // we only care about /sweepWallet and whether maxFeeRate is an allowed parameter - } - - response.isDone().should.be.true(); - }); - - it('should pass maxFeeRate parameter when calling fanout unspents', async function () { - const path = `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/fanoutUnspents`; - const response = nock(bgUrl) - .post(path, _.matches({ maxFeeRate })) // use _.matches to do a partial match on request body object instead of strict matching - .reply(200); - - try { - await wallet.fanoutUnspents({ address, maxFeeRate }); - } catch (e) { - // the fanoutUnspents method will probably throw an exception for not having all of the correct nocks - // we only care about /fanoutUnspents and whether maxFeeRate is an allowed parameter - } - - response.isDone().should.be.true(); - }); - }); - - describe('allowPartialSweep verification', function () { - const address = '5b34252f1bf349930e34020a'; - const allowPartialSweep = true; - let basecoin; - let wallet; - - before(async function () { - basecoin = bitgo.coin('tbtc'); - const walletData = { - id: '5b34252f1bf349930e34020a', - coin: 'tbtc', - keys: ['5b3424f91bf349930e340175'], - }; - wallet = new Wallet(bitgo, basecoin, walletData); - }); - - it('should pass allowPartialSweep parameter when calling sweep wallets', async function () { - const path = `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/sweepWallet`; - const response = nock(bgUrl) - .post(path, _.matches({ address, allowPartialSweep })) // use _.matches to do a partial match on request body object instead of strict matching - .reply(200); - - try { - await wallet.sweep({ address, allowPartialSweep }); - } catch (e) { - // the sweep method will probably throw an exception for not having all of the correct nocks - // we only care about /sweepWallet and whether allowPartialSweep is an allowed parameter - } - - response.isDone().should.be.true(); - }); - }); - - describe('sweep wallet', function () { - let basecoin; - let wallet; - - before(async function () { - basecoin = bitgo.coin('ttrx'); - const walletData = { - id: '5b34252f1bf349930e34020a', - coin: 'ttrx', - keys: ['5b3424f91bf349930e340175'], - }; - wallet = new Wallet(bitgo, basecoin, walletData); - }); - - it('should use maximum spendable balance of wallet to sweep funds ', async function () { - const path = `/api/v2/${wallet.coin()}/wallet/${wallet.id()}/maximumSpendable`; - const response = nock(bgUrl).get(path).reply(200, { - coin: 'ttrx', - maximumSpendable: 65000, - }); - const body = { - coin: 'ttrx', - address: '2MwvR24yqym2CgHMp7zwvdeqBa4F8KTqunS', - }; - try { - await wallet.sweep(body); - } catch (e) { - // the sweep method will probably throw an exception for not having all of the correct nocks - // we only care about maximum spendable balance being used to sweep funds - } - - response.isDone().should.be.true(); - }); - }); - describe('Transaction prebuilds', function () { let ethWallet;