@avalabs/bridge-unified 2.1.1 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (77) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +115 -31
  3. package/dist/index.cjs +36 -10
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.cts +252 -84
  6. package/dist/index.d.ts +252 -84
  7. package/dist/index.js +9 -4
  8. package/dist/index.js.map +1 -1
  9. package/package.json +14 -4
  10. package/.turbo/turbo-build.log +0 -22
  11. package/.turbo/turbo-lint.log +0 -4
  12. package/.turbo/turbo-test.log +0 -26
  13. package/CHANGELOG.md +0 -37
  14. package/jest.config.js +0 -9
  15. package/src/bridges/cctp/__mocks__/asset.mock.ts +0 -15
  16. package/src/bridges/cctp/__mocks__/bridge-transfer.mock.ts +0 -48
  17. package/src/bridges/cctp/__mocks__/chain.mocks.ts +0 -33
  18. package/src/bridges/cctp/__mocks__/config.mock.ts +0 -45
  19. package/src/bridges/cctp/abis/erc20.ts +0 -117
  20. package/src/bridges/cctp/abis/message-transmitter.ts +0 -318
  21. package/src/bridges/cctp/abis/token-router.ts +0 -843
  22. package/src/bridges/cctp/factory.test.ts +0 -73
  23. package/src/bridges/cctp/factory.ts +0 -36
  24. package/src/bridges/cctp/handlers/estimate-gas.test.ts +0 -110
  25. package/src/bridges/cctp/handlers/estimate-gas.ts +0 -58
  26. package/src/bridges/cctp/handlers/get-assets.test.ts +0 -47
  27. package/src/bridges/cctp/handlers/get-assets.ts +0 -27
  28. package/src/bridges/cctp/handlers/get-fees.test.ts +0 -61
  29. package/src/bridges/cctp/handlers/get-fees.ts +0 -26
  30. package/src/bridges/cctp/handlers/track-transfer.test.ts +0 -779
  31. package/src/bridges/cctp/handlers/track-transfer.ts +0 -365
  32. package/src/bridges/cctp/handlers/transfer-asset.test.ts +0 -429
  33. package/src/bridges/cctp/handlers/transfer-asset.ts +0 -179
  34. package/src/bridges/cctp/index.ts +0 -1
  35. package/src/bridges/cctp/types/chain.ts +0 -9
  36. package/src/bridges/cctp/types/config.ts +0 -20
  37. package/src/bridges/cctp/utils/build-tx.ts +0 -30
  38. package/src/bridges/cctp/utils/config.test.ts +0 -49
  39. package/src/bridges/cctp/utils/config.ts +0 -36
  40. package/src/bridges/cctp/utils/transfer-data.test.ts +0 -83
  41. package/src/bridges/cctp/utils/transfer-data.ts +0 -48
  42. package/src/errors/bridge-error.ts +0 -11
  43. package/src/errors/bridge-initialization-error.ts +0 -9
  44. package/src/errors/bridge-unavailable-error.ts +0 -9
  45. package/src/errors/index.ts +0 -4
  46. package/src/errors/invalid-params-error.ts +0 -9
  47. package/src/index.ts +0 -3
  48. package/src/types/asset.ts +0 -26
  49. package/src/types/bridge.ts +0 -64
  50. package/src/types/chain.ts +0 -10
  51. package/src/types/config.ts +0 -10
  52. package/src/types/environment.ts +0 -4
  53. package/src/types/error.ts +0 -19
  54. package/src/types/index.ts +0 -9
  55. package/src/types/provider.ts +0 -12
  56. package/src/types/signer.ts +0 -18
  57. package/src/types/transfer.ts +0 -35
  58. package/src/unified-bridge-service.test.ts +0 -209
  59. package/src/unified-bridge-service.ts +0 -97
  60. package/src/utils/bridge-types.test.ts +0 -103
  61. package/src/utils/bridge-types.ts +0 -32
  62. package/src/utils/caip2.test.ts +0 -44
  63. package/src/utils/caip2.ts +0 -41
  64. package/src/utils/client.test.ts +0 -97
  65. package/src/utils/client.ts +0 -44
  66. package/src/utils/ensure-config.test.ts +0 -43
  67. package/src/utils/ensure-config.ts +0 -12
  68. package/src/utils/index.ts +0 -2
  69. package/src/utils/network-fee.test.ts +0 -24
  70. package/src/utils/network-fee.ts +0 -6
  71. package/src/utils/retry-promise.test.ts +0 -115
  72. package/src/utils/retry-promise.ts +0 -72
  73. package/src/utils/wait.test.ts +0 -33
  74. package/src/utils/wait.ts +0 -4
  75. package/tsconfig.jest.json +0 -7
  76. package/tsconfig.json +0 -9
  77. package/tsup.config.ts +0 -4
@@ -1,49 +0,0 @@
1
- import { BridgeInitializationError } from '../../../errors';
2
- import { Environment, ErrorReason } from '../../../types';
3
- import { AvalancheChainIds } from '../types/chain';
4
- import { getConfig, getTrackingDelayByChainId } from './config';
5
-
6
- describe('CCTP config', () => {
7
- describe('getConfig', () => {
8
- let fetchSpy: jest.SpyInstance;
9
-
10
- const config = [{ chainId: 1 }];
11
- const environment = Environment.TEST;
12
-
13
- beforeEach(() => {
14
- jest.restoreAllMocks();
15
- fetchSpy = jest.spyOn(globalThis, 'fetch');
16
- });
17
-
18
- it('throws when fetching config fails', async () => {
19
- const error = new Error('some error');
20
- fetchSpy.mockRejectedValueOnce(error);
21
-
22
- await expect(getConfig(environment)).rejects.toThrow(
23
- new BridgeInitializationError(
24
- ErrorReason.CONFIG_NOT_AVAILABLE,
25
- `Error while fetching CCTP config: ${error.message}`,
26
- ),
27
- );
28
- expect(fetchSpy).toHaveBeenCalledWith(expect.any(String));
29
- });
30
-
31
- it('returns the correct config', async () => {
32
- fetchSpy.mockResolvedValue({ json: jest.fn().mockResolvedValue(config) } as unknown as Response);
33
- const result = await getConfig(environment);
34
-
35
- expect(result).toStrictEqual([{ chainId: 'eip155:1' }]);
36
- expect(fetchSpy).toHaveBeenCalledWith(expect.any(String));
37
- });
38
- });
39
-
40
- describe('getTrackingDelayByChainId', () => {
41
- it.each([
42
- { name: 'avalanche', chainId: AvalancheChainIds.MAINNET, expectedDelay: 1000 },
43
- { name: 'avalanche fuji', chainId: AvalancheChainIds.FUJI, expectedDelay: 1000 },
44
- { name: 'unknown', chainId: 'eip155:999', expectedDelay: 20000 },
45
- ])('returns the correct delay for $name', ({ chainId, expectedDelay }) => {
46
- expect(getTrackingDelayByChainId(chainId)).toBe(expectedDelay);
47
- });
48
- });
49
- });
@@ -1,36 +0,0 @@
1
- import { BridgeInitializationError } from '../../../errors';
2
- import { ErrorReason } from '../../../types';
3
- import { Environment } from '../../../types/environment';
4
- import { AvalancheChainIds } from '../types/chain';
5
- import type { Config } from '../types/config';
6
-
7
- const CONFIG_URLS: Record<Environment, string> = {
8
- [Environment.TEST]:
9
- 'https://raw.githubusercontent.com/ava-labs/avalanche-bridge-resources/main/cctp/cctp_config.test.json',
10
- [Environment.PROD]:
11
- 'https://raw.githubusercontent.com/ava-labs/avalanche-bridge-resources/main/cctp/cctp_config.json',
12
- };
13
-
14
- export const getConfig = async (environment: Environment): Promise<Config> => {
15
- try {
16
- const response = await fetch(CONFIG_URLS[environment]!);
17
- const config: Config = await response.json();
18
-
19
- return config.map((chainData) => ({ ...chainData, chainId: `eip155:${chainData.chainId}` }));
20
- } catch (err) {
21
- throw new BridgeInitializationError(
22
- ErrorReason.CONFIG_NOT_AVAILABLE,
23
- `Error while fetching CCTP config: ${(err as unknown as Error).message}`,
24
- );
25
- }
26
- };
27
-
28
- export const getTrackingDelayByChainId = (chainId: string) => {
29
- switch (chainId) {
30
- case AvalancheChainIds.MAINNET:
31
- case AvalancheChainIds.FUJI:
32
- return 1000;
33
- default:
34
- return 20000;
35
- }
36
- };
@@ -1,83 +0,0 @@
1
- import { InvalidParamsError } from '../../../errors';
2
- import { ErrorReason, type BridgeAsset, type Chain, type TransferParams } from '../../../types';
3
- import { BRIDGE_ASSET } from '../__mocks__/asset.mock';
4
- import { SOURCE_CHAIN, TARGET_CHAIN } from '../__mocks__/chain.mocks';
5
- import { CCTP_CONFIG } from '../__mocks__/config.mock';
6
- import type { Config } from '../types/config';
7
- import { getTransferData } from './transfer-data';
8
-
9
- describe('CCTP transfer-data', () => {
10
- const transferData = {
11
- sourceChain: SOURCE_CHAIN,
12
- targetChain: TARGET_CHAIN,
13
- amount: 1000n,
14
- asset: BRIDGE_ASSET,
15
- } as unknown as TransferParams;
16
-
17
- it('throws if source and target chains are the same', () => {
18
- expect(() =>
19
- getTransferData(
20
- { ...transferData, targetChain: SOURCE_CHAIN as unknown as Chain },
21
- CCTP_CONFIG as unknown as Config,
22
- ),
23
- ).toThrow(new InvalidParamsError(ErrorReason.IDENTICAL_CHAINS_PROVIDED));
24
- });
25
-
26
- it('throws if amount is less than zero', () => {
27
- expect(() => getTransferData({ ...transferData, amount: -1n }, CCTP_CONFIG as unknown as Config)).toThrow(
28
- new InvalidParamsError(ErrorReason.INCORRECT_AMOUNT_PROVIDED, 'Amount must be greater than zero'),
29
- );
30
- });
31
-
32
- it('throws if source chain is not supported by CCTP', () => {
33
- const chainId = 'eip155:999';
34
-
35
- expect(() =>
36
- getTransferData(
37
- { ...transferData, sourceChain: { ...SOURCE_CHAIN, chainId } as unknown as Chain },
38
- CCTP_CONFIG as unknown as Config,
39
- ),
40
- ).toThrow(new InvalidParamsError(ErrorReason.CHAIN_NOT_SUPPORTED, `Not supported on source chain "${chainId}"`));
41
- });
42
-
43
- it('throws if target chain is not supported by CCTP', () => {
44
- const chainId = 'eip155:999';
45
-
46
- expect(() =>
47
- getTransferData(
48
- { ...transferData, targetChain: { ...TARGET_CHAIN, chainId } as unknown as Chain },
49
- CCTP_CONFIG as unknown as Config,
50
- ),
51
- ).toThrow(new InvalidParamsError(ErrorReason.CHAIN_NOT_SUPPORTED, `Not supported on target chain "${chainId}"`));
52
- });
53
-
54
- it('throws if burn token is not supported', () => {
55
- const symbol = 'NOT_SUPPORTED';
56
-
57
- expect(() =>
58
- getTransferData(
59
- { ...transferData, asset: { symbol } as unknown as BridgeAsset },
60
- CCTP_CONFIG as unknown as Config,
61
- ),
62
- ).toThrow(new InvalidParamsError(ErrorReason.ASSET_NOT_SUPPORTED));
63
- });
64
-
65
- it('throws if mint token is not supported', () => {
66
- const symbol = 'USDC';
67
- const config = [{ ...CCTP_CONFIG[0], tokens: [{ symbol: 'NOT_USDC' }] }, CCTP_CONFIG[1]];
68
-
69
- expect(() =>
70
- getTransferData({ ...transferData, asset: { symbol } as unknown as BridgeAsset }, config as unknown as Config),
71
- ).toThrow(new InvalidParamsError(ErrorReason.ASSET_NOT_SUPPORTED));
72
- });
73
-
74
- it('returns the correct transfer data', () => {
75
- const result = getTransferData(transferData, CCTP_CONFIG as unknown as Config);
76
- expect(result).toStrictEqual({
77
- sourceChainData: CCTP_CONFIG[0],
78
- targetChainData: CCTP_CONFIG[1],
79
- burnToken: CCTP_CONFIG[0].tokens[0],
80
- mintToken: CCTP_CONFIG[1].tokens[0],
81
- });
82
- });
83
- });
@@ -1,48 +0,0 @@
1
- import { InvalidParamsError } from '../../../errors';
2
- import { ErrorReason } from '../../../types';
3
- import type { TransferParams } from '../../../types/bridge';
4
- import type { Config } from '../types/config';
5
-
6
- type PartialTransferParams = Pick<TransferParams, 'sourceChain' | 'targetChain' | 'amount' | 'asset'>;
7
-
8
- export const getTransferData = ({ sourceChain, targetChain, amount, asset }: PartialTransferParams, config: Config) => {
9
- if (sourceChain.chainId === targetChain.chainId) {
10
- throw new InvalidParamsError(ErrorReason.IDENTICAL_CHAINS_PROVIDED);
11
- }
12
-
13
- if (amount <= 0n) {
14
- throw new InvalidParamsError(ErrorReason.INCORRECT_AMOUNT_PROVIDED, 'Amount must be greater than zero');
15
- }
16
-
17
- const sourceChainData = config.find((chainData) => chainData.chainId === sourceChain.chainId);
18
-
19
- if (!sourceChainData) {
20
- throw new InvalidParamsError(
21
- ErrorReason.CHAIN_NOT_SUPPORTED,
22
- `Not supported on source chain "${sourceChain.chainId}"`,
23
- );
24
- }
25
-
26
- const targetChainData = config.find((chainData) => chainData.chainId === targetChain.chainId);
27
-
28
- if (!targetChainData) {
29
- throw new InvalidParamsError(
30
- ErrorReason.CHAIN_NOT_SUPPORTED,
31
- `Not supported on target chain "${targetChain.chainId}"`,
32
- );
33
- }
34
-
35
- const burnToken = sourceChainData.tokens.find((token) => token.symbol === asset.symbol);
36
- const mintToken = targetChainData.tokens.find((token) => token.symbol === asset.symbol);
37
-
38
- if (!burnToken || !mintToken) {
39
- throw new InvalidParamsError(ErrorReason.ASSET_NOT_SUPPORTED);
40
- }
41
-
42
- return {
43
- sourceChainData,
44
- targetChainData,
45
- burnToken,
46
- mintToken,
47
- };
48
- };
@@ -1,11 +0,0 @@
1
- import type { ErrorCode } from '../types';
2
-
3
- export class BridgeError extends Error {
4
- constructor(
5
- message: string,
6
- public code: ErrorCode,
7
- public details?: string,
8
- ) {
9
- super(message);
10
- }
11
- }
@@ -1,9 +0,0 @@
1
- import { ErrorCode, ErrorReason } from '../types';
2
- import { BridgeError } from './bridge-error';
3
-
4
- export class BridgeInitializationError extends BridgeError {
5
- constructor(message = ErrorReason.UNKNOWN, details?: string) {
6
- super(message, ErrorCode.INITIALIZATION_FAILED, details);
7
- this.name = 'BridgeInitializationError';
8
- }
9
- }
@@ -1,9 +0,0 @@
1
- import { ErrorCode, ErrorReason } from '../types';
2
- import { BridgeError } from './bridge-error';
3
-
4
- export class BridgeUnavailableError extends BridgeError {
5
- constructor(message = ErrorReason.UNKNOWN, details?: string) {
6
- super(message, ErrorCode.BRIDGE_NOT_AVAILABLE, details);
7
- this.name = 'BridgeUnavailableError';
8
- }
9
- }
@@ -1,4 +0,0 @@
1
- export * from './bridge-error';
2
- export * from './bridge-unavailable-error';
3
- export * from './bridge-initialization-error';
4
- export * from './invalid-params-error';
@@ -1,9 +0,0 @@
1
- import { ErrorCode, ErrorReason } from '../types';
2
- import { BridgeError } from './bridge-error';
3
-
4
- export class InvalidParamsError extends BridgeError {
5
- constructor(message = ErrorReason.INVALID_PARAMS, details?: string) {
6
- super(message, ErrorCode.INVALID_PARAMS, details);
7
- this.name = 'InvalidParamsError';
8
- }
9
- }
package/src/index.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './types';
2
- export * from './unified-bridge-service';
3
- export { default as caip2 } from './utils/caip2';
@@ -1,26 +0,0 @@
1
- import type { Address } from 'viem';
2
- import type { BridgeType } from './bridge';
3
-
4
- export enum TokenType {
5
- NATIVE = 'native',
6
- ERC20 = 'erc20',
7
- }
8
-
9
- export type Asset = {
10
- type: TokenType;
11
- address?: Address;
12
- name: string;
13
- symbol: string;
14
- decimals: number;
15
- };
16
-
17
- // chainId - bridge type pairs
18
- export type DestinationInfo = Record<string, BridgeType[]>;
19
-
20
- export type BridgeAsset = Asset & {
21
- destinations: DestinationInfo;
22
- };
23
-
24
- export type ChainAssetMap = Record<string, BridgeAsset[]>;
25
-
26
- export type AssetFeeMap = Record<Address, bigint>;
@@ -1,64 +0,0 @@
1
- import type { AssetFeeMap, BridgeAsset, ChainAssetMap } from './asset';
2
- import type { Chain } from './chain';
3
- import type { BridgeConfig } from './config';
4
- import type { Environment } from './environment';
5
- import type { Provider } from './provider';
6
- import type { Signer } from './signer';
7
- import type { BridgeTransfer } from './transfer';
8
-
9
- export enum BridgeType {
10
- CCTP = 'cctp',
11
- }
12
-
13
- export type FeeParams = {
14
- asset: BridgeAsset;
15
- amount: bigint;
16
- sourceChain: Chain;
17
- targetChain: Chain;
18
- provider?: Provider;
19
- };
20
-
21
- export enum BridgeSignatureReason {
22
- AllowanceApproval = 'allowance-approval',
23
- TokensTransfer = 'tokens-transfer',
24
- }
25
-
26
- export type BridgeStepDetails = {
27
- currentSignature: number;
28
- requiredSignatures: number;
29
- currentSignatureReason: BridgeSignatureReason;
30
- };
31
-
32
- export type TransferParams = {
33
- asset: BridgeAsset;
34
- amount: bigint;
35
- fromAddress: string;
36
- toAddress?: string;
37
- sourceChain: Chain;
38
- targetChain: Chain;
39
- sourceProvider?: Provider;
40
- targetProvider?: Provider;
41
- onStepChange?: (stepDetails: BridgeStepDetails) => void;
42
- sign?: Signer;
43
- };
44
-
45
- export type TrackingParams = {
46
- bridgeTransfer: BridgeTransfer;
47
- sourceProvider?: Provider;
48
- targetProvider?: Provider;
49
- updateListener: (transfer: BridgeTransfer) => void;
50
- };
51
-
52
- export type BridgeService = {
53
- type: BridgeType;
54
- config: BridgeConfig | null;
55
- ensureHasConfig: () => Promise<void>;
56
- updateConfig: () => Promise<void>;
57
- estimateGas: (params: TransferParams) => Promise<bigint>;
58
- getAssets: () => Promise<ChainAssetMap>;
59
- getFees: (params: FeeParams) => Promise<AssetFeeMap>;
60
- transferAsset: (params: TransferParams) => Promise<BridgeTransfer>;
61
- trackTransfer: (transfer: TrackingParams) => { cancel: () => void; result: Promise<BridgeTransfer> };
62
- };
63
-
64
- export type BridgeServiceFactory = (environment: Environment) => BridgeService;
@@ -1,10 +0,0 @@
1
- import type { Address } from 'viem';
2
- import type { Asset } from './asset';
3
-
4
- export type Chain = {
5
- chainName: string;
6
- chainId: string;
7
- rpcUrl: string;
8
- utilityAddresses?: { multicall: Address };
9
- networkToken: Asset;
10
- };
@@ -1,10 +0,0 @@
1
- import type { Config as CctpConfig } from '../bridges/cctp/types/config';
2
- import type { BridgeType } from './bridge';
3
- import type { Environment } from './environment';
4
-
5
- export type BridgeServiceConfig = {
6
- environment: Environment;
7
- disabledBridgeTypes?: BridgeType[];
8
- };
9
-
10
- export type BridgeConfig = CctpConfig;
@@ -1,4 +0,0 @@
1
- export enum Environment {
2
- PROD = 'production',
3
- TEST = 'test',
4
- }
@@ -1,19 +0,0 @@
1
- export enum ErrorCode {
2
- BRIDGE_NOT_AVAILABLE = 5001,
3
- INITIALIZATION_FAILED = 5002,
4
- INVALID_PARAMS = 5003,
5
- TIMEOUT = 5004,
6
- TRANSACTION_REVERTED = 5005,
7
- }
8
-
9
- export enum ErrorReason {
10
- UNKNOWN = 'UNKNOWN', // generic, not specified error
11
- CONFIG_NOT_AVAILABLE = 'CONFIG_NOT_AVAILABLE', // error while fetching or parsing the config
12
- INVALID_PARAMS = 'INVALID_PARAMS', // generic error with the params
13
- IDENTICAL_CHAINS_PROVIDED = 'IDENTICAL_CHAINS_PROVIDED', // provided source and target chains are the same
14
- INCORRECT_AMOUNT_PROVIDED = 'INCORRECT_AMOUNT_PROVIDED', // the transfer amount is incorrect (e.g.: lesser than or equal to zero)
15
- INCORRECT_ADDRESS_PROVIDED = 'INCORRECT_ADDRESS_PROVIDED', // the sender or recipient address is incorrect
16
- CHAIN_NOT_SUPPORTED = 'CHAIN_NOT_SUPPORTED', // the provided source or target chain is not supported by the bridge
17
- ASSET_NOT_SUPPORTED = 'ASSET_NOT_SUPPORTED', // the provided asset is not supported by the bridge
18
- CONFIRMATION_COUNT_UNKNOWN = 'CONFIRMATION_COUNT_UNKNOWN', // required confirmation count of the source or target chain is unknown
19
- }
@@ -1,9 +0,0 @@
1
- export * from './asset';
2
- export * from './bridge';
3
- export * from './chain';
4
- export * from './config';
5
- export * from './environment';
6
- export * from './error';
7
- export * from './transfer';
8
- export * from './provider';
9
- export * from './signer';
@@ -1,12 +0,0 @@
1
- type RequestArguments = {
2
- method: string;
3
- params?: unknown[] | Record<string | number, unknown>;
4
- };
5
-
6
- export type Provider = {
7
- /**
8
- * EIP-1193 compatible request method
9
- * https://eips.ethereum.org/EIPS/eip-1193#request-1
10
- */
11
- request: (args: RequestArguments) => Promise<unknown>;
12
- };
@@ -1,18 +0,0 @@
1
- export type Hex = `0x${string}`;
2
-
3
- export type TransactionRequest = {
4
- type?: number | null;
5
- data?: Hex | null;
6
- from: Hex;
7
- gas?: bigint;
8
- nonce?: number;
9
- to?: Hex | null;
10
- value?: bigint;
11
- gasPrice?: bigint | null;
12
- gasLimit?: bigint | null;
13
- maxPriorityFeePerGas?: bigint | null;
14
- maxFeePerGas?: bigint | null;
15
- };
16
-
17
- export type Dispatch = (signedTxHash: Hex) => Promise<Hex>;
18
- export type Signer = (data: TransactionRequest, dispatch: Dispatch) => Promise<Hex>;
@@ -1,35 +0,0 @@
1
- import type { Environment } from './environment';
2
- import type { BridgeType } from './bridge';
3
- import type { Chain } from './chain';
4
- import type { ErrorCode } from './error';
5
-
6
- export type BridgeTransfer = {
7
- type: BridgeType;
8
- environment: Environment;
9
- fromAddress: string;
10
- toAddress: string;
11
- amount: bigint;
12
- amountDecimals: number;
13
- symbol: string;
14
-
15
- completedAt?: number;
16
- errorCode?: ErrorCode;
17
- bridgeFee: bigint;
18
-
19
- sourceChain: Chain;
20
- sourceStartedAt: number;
21
- sourceTxHash: string;
22
- sourceNetworkFee?: bigint;
23
- sourceConfirmationCount: number;
24
- requiredSourceConfirmationCount: number;
25
-
26
- targetChain: Chain;
27
- targetStartedAt?: number;
28
- targetTxHash?: string;
29
- targetNetworkFee?: bigint;
30
- targetConfirmationCount: number;
31
- requiredTargetConfirmationCount: number;
32
-
33
- startBlockNumber?: bigint;
34
- metadata?: Record<string, unknown>;
35
- };