|
2 | 2 | * @prettier
|
3 | 3 | */
|
4 | 4 | import { bitgo } from '@bitgo/utxo-lib';
|
5 |
| -import { AddressInfo, TransactionIO } from '@bitgo/blockapis'; |
6 |
| -import { AbstractUtxoCoin, RecoveryProvider } from '@bitgo/abstract-utxo'; |
| 5 | +import type { AddressInfo, TransactionIO } from '@bitgo/blockapis'; |
| 6 | +import type { AbstractUtxoCoin, RecoveryProvider } from '@bitgo/abstract-utxo'; |
7 | 7 | import * as utxolib from '@bitgo/utxo-lib';
|
8 | 8 | import { Bch } from '@bitgo/sdk-coin-bch';
|
9 | 9 | import { Bsv } from '@bitgo/sdk-coin-bsv';
|
@@ -52,13 +52,15 @@ export class MockRecoveryProvider implements RecoveryProvider {
|
52 | 52 | }
|
53 | 53 | }
|
54 | 54 | export class MockCrossChainRecoveryProvider<TNumber extends number | bigint> implements RecoveryProvider {
|
| 55 | + public coin: AbstractUtxoCoin; |
| 56 | + public unspents: Unspent<TNumber>[]; |
| 57 | + public tx: utxolib.bitgo.UtxoTransaction<TNumber>; |
55 | 58 | private addressVersion: 'cashaddr' | 'base58';
|
56 | 59 | private addressFormat: utxolib.addressFormat.AddressFormat;
|
57 |
| - constructor( |
58 |
| - public coin: AbstractUtxoCoin, |
59 |
| - public unspents: Unspent<TNumber>[], |
60 |
| - public tx: utxolib.bitgo.UtxoTransaction<TNumber> |
61 |
| - ) { |
| 60 | + constructor(coin: AbstractUtxoCoin, unspents: Unspent<TNumber>[], tx: utxolib.bitgo.UtxoTransaction<TNumber>) { |
| 61 | + this.coin = coin; |
| 62 | + this.unspents = unspents; |
| 63 | + this.tx = tx; |
62 | 64 | // this is how blockchair will return the data, as a cashaddr for BCH like coins
|
63 | 65 | // BSV supports cashaddr, but at the time of writing the SDK does not support cashaddr for bsv
|
64 | 66 | this.addressFormat = this.coin instanceof Bch && !(this.coin instanceof Bsv) ? 'cashaddr' : 'default';
|
|
0 commit comments