@metamask/bridge-status-controller 70.0.2 → 70.0.3

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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [70.0.3]
11
+
12
+ ### Changed
13
+
14
+ - Bump `@metamask/snaps-controllers` from `^17.2.0` to `^19.0.0` ([#8319](https://github.com/MetaMask/core/pull/8319))
15
+ - Bump `@metamask/accounts-controller` from `^37.1.0` to `^37.1.1` ([#8325](https://github.com/MetaMask/core/pull/8325))
16
+ - Bump `@metamask/bridge-controller` from `^69.2.2` to `^69.2.3` ([#8325](https://github.com/MetaMask/core/pull/8325))
17
+ - Bump `@metamask/profile-sync-controller` from `^28.0.1` to `^28.0.2` ([#8325](https://github.com/MetaMask/core/pull/8325))
18
+
10
19
  ## [70.0.2]
11
20
 
12
21
  ### Changed
@@ -1074,7 +1083,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1074
1083
 
1075
1084
  - Initial release ([#5317](https://github.com/MetaMask/core/pull/5317))
1076
1085
 
1077
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@70.0.2...HEAD
1086
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@70.0.3...HEAD
1087
+ [70.0.3]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@70.0.2...@metamask/bridge-status-controller@70.0.3
1078
1088
  [70.0.2]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@70.0.1...@metamask/bridge-status-controller@70.0.2
1079
1089
  [70.0.1]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@70.0.0...@metamask/bridge-status-controller@70.0.1
1080
1090
  [70.0.0]: https://github.com/MetaMask/core/compare/@metamask/bridge-status-controller@69.0.0...@metamask/bridge-status-controller@70.0.0
@@ -1 +1 @@
1
- {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAuCA,+CAA4D;AAG5D,8EAA8E;AAC9E,2BAA2B;AAE3B,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;AACnB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAyCD,IAAY,QAaX;AAbD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,2BAAe,CAAA;IACf,uCAA2B,CAAA;IAC3B,+BAAmB,CAAA;IACnB,+BAAmB,CAAA;IACnB,mCAAuB,CAAA;IACvB,qCAAyB,CAAA;IACzB,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;IACjB,iCAAqB,CAAA;IACrB,2BAAe,CAAA;IACf,2BAAe,CAAA;AACjB,CAAC,EAbW,QAAQ,wBAAR,QAAQ,QAanB;AAiED,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,qFAA+D,CAAA;IAC/D,2DAAqC,CAAA;IACrC,2CAAqB,CAAA;IACrB,+CAAyB,CAAA;IACzB,2CAAqB,CAAA;IACrB,mDAA6B,CAAA;IAC7B,yFAAmE,CAAA;IACnE,uFAAiE,CAAA;AACnE,CAAC,EATW,kBAAkB,kCAAlB,kBAAkB,QAS7B","sourcesContent":["import type { AccountsControllerGetAccountByAddressAction } from '@metamask/accounts-controller';\nimport type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n} from '@metamask/base-controller';\nimport type {\n BridgeBackgroundAction,\n BridgeControllerAction,\n ChainId,\n FeatureId,\n Quote,\n QuoteMetadata,\n QuoteResponse,\n MetaMetricsSwapsEventSource,\n} from '@metamask/bridge-controller';\nimport type { GetGasFeeState } from '@metamask/gas-fee-controller';\nimport type { KeyringControllerSignTypedMessageAction } from '@metamask/keyring-controller';\nimport type { Messenger } from '@metamask/messenger';\nimport type {\n NetworkControllerFindNetworkClientIdByChainIdAction,\n NetworkControllerGetNetworkClientByIdAction,\n NetworkControllerGetStateAction,\n} from '@metamask/network-controller';\nimport type { AuthenticationControllerGetBearerTokenAction } from '@metamask/profile-sync-controller/auth';\nimport type { HandleSnapRequest } from '@metamask/snaps-controllers';\nimport type { Infer } from '@metamask/superstruct';\nimport type {\n TransactionControllerAddTransactionAction,\n TransactionControllerEstimateGasFeeAction,\n TransactionControllerGetStateAction,\n TransactionControllerIsAtomicBatchSupportedAction,\n TransactionControllerTransactionConfirmedEvent,\n TransactionControllerTransactionFailedEvent,\n TransactionControllerUpdateTransactionAction,\n TransactionMeta,\n} from '@metamask/transaction-controller';\nimport type { CaipAssetType } from '@metamask/utils';\n\nimport type { BridgeStatusController } from './bridge-status-controller';\nimport { BRIDGE_STATUS_CONTROLLER_NAME } from './constants';\nimport type { StatusResponseSchema } from './utils/validators';\n\n// All fields need to be types not interfaces, same with their children fields\n// o/w you get a type error\n\nexport enum BridgeClientId {\n EXTENSION = 'extension',\n MOBILE = 'mobile',\n}\n\nexport type FetchFunction = (\n input: RequestInfo | URL,\n init?: RequestInit,\n) => Promise<unknown>;\n\n/**\n * These fields are specific to Solana transactions and can likely be infered from TransactionMeta\n *\n * @deprecated these should be removed eventually\n */\nexport type SolanaTransactionMeta = {\n isSolana: boolean;\n isBridgeTx: boolean;\n};\n\nexport type StatusRequest = {\n bridgeId: string; // lifi, socket, squid\n srcTxHash?: string; // lifi, socket, squid, might be undefined for STX\n bridge: string; // lifi, socket, squid\n srcChainId: ChainId; // lifi, socket, squid\n destChainId: ChainId; // lifi, socket, squid\n quote?: Quote; // squid\n refuel?: boolean; // lifi\n};\n\nexport type StatusRequestDto = Omit<\n StatusRequest,\n 'quote' | 'srcChainId' | 'destChainId' | 'refuel'\n> & {\n srcChainId: string; // lifi, socket, squid\n destChainId: string; // lifi, socket, squid\n requestId?: string;\n refuel?: string; // lifi\n};\n\nexport type StatusRequestWithSrcTxHash = StatusRequest & {\n srcTxHash: string;\n};\n\nexport enum BridgeId {\n HOP = 'hop',\n CELER = 'celer',\n CELERCIRCLE = 'celercircle',\n CONNEXT = 'connext',\n POLYGON = 'polygon',\n AVALANCHE = 'avalanche',\n MULTICHAIN = 'multichain',\n AXELAR = 'axelar',\n ACROSS = 'across',\n STARGATE = 'stargate',\n RELAY = 'relay',\n MAYAN = 'mayan',\n}\n\nexport type StatusResponse = Infer<typeof StatusResponseSchema>;\n\nexport type RefuelStatusResponse = object & StatusResponse;\n\nexport type BridgeHistoryItem = {\n txMetaId?: string; // Optional: not available pre-submission or on sync failure\n actionId?: string; // Only for non-batch EVM transactions\n /**\n * @deprecated the txMeta or orderUid should be used instead\n */\n originalTransactionId?: string; // Keep original transaction ID for intent transactions\n batchId?: string;\n quote: Quote;\n status: StatusResponse;\n startTime?: number; // timestamp in ms\n estimatedProcessingTimeInSeconds: number;\n slippagePercentage: number;\n completionTime?: number; // timestamp in ms\n pricingData?: {\n /**\n * The actual amount sent by user in non-atomic decimal form\n */\n amountSent: QuoteMetadata['sentAmount']['amount'];\n amountSentInUsd?: QuoteMetadata['sentAmount']['usd'];\n quotedGasInUsd?: QuoteMetadata['gasFee']['effective']['usd'];\n quotedGasAmount?: QuoteMetadata['gasFee']['effective']['amount'];\n quotedReturnInUsd?: QuoteMetadata['toTokenAmount']['usd'];\n quotedRefuelSrcAmountInUsd?: string;\n quotedRefuelDestAmountInUsd?: string;\n };\n initialDestAssetBalance?: string;\n targetContractAddress?: string;\n account: string;\n hasApprovalTx: boolean;\n approvalTxId?: string;\n featureId?: FeatureId;\n isStxEnabled?: boolean;\n /**\n * The location/entry point from which the user initiated the swap or bridge.\n * Used to attribute swaps to specific flows (e.g. Trending Explore).\n */\n location?: MetaMetricsSwapsEventSource;\n /**\n * Legacy A/B test metrics context (`ab_tests`) kept for backward compatibility.\n * Keys are test names, values are variant names (e.g. { token_details_layout: 'treatment' }).\n */\n abTests?: Record<string, string>;\n /**\n * New A/B test metrics context (`active_ab_tests`) that replaces `ab_tests`.\n * Kept separate so migration can run both payloads in parallel.\n * This field is an array of test objects.\n */\n activeAbTests?: { key: string; value: string }[];\n /**\n * Attempts tracking for exponential backoff on failed fetches.\n * We track the number of attempts and the last attempt time for each txMetaId that has failed at least once\n */\n attempts?: {\n counter: number;\n lastAttemptTime: number; // timestamp in ms\n };\n};\n\nexport enum BridgeStatusAction {\n StartPollingForBridgeTxStatus = 'StartPollingForBridgeTxStatus',\n WipeBridgeStatus = 'WipeBridgeStatus',\n GetState = 'GetState',\n ResetState = 'ResetState',\n SubmitTx = 'SubmitTx',\n SubmitIntent = 'SubmitIntent',\n RestartPollingForFailedAttempts = 'RestartPollingForFailedAttempts',\n GetBridgeHistoryItemByTxMetaId = 'GetBridgeHistoryItemByTxMetaId',\n}\n\nexport type TokenAmountValuesSerialized = {\n amount: string;\n valueInCurrency: string | null;\n usd: string | null;\n};\n\nexport type QuoteMetadataSerialized = {\n gasFee: TokenAmountValuesSerialized;\n /**\n * The total network fee for the bridge transaction\n * estimatedGasFees + relayerFees\n */\n totalNetworkFee: TokenAmountValuesSerialized;\n /**\n * The total max network fee for the bridge transaction\n * maxGasFees + relayerFees\n */\n totalMaxNetworkFee: TokenAmountValuesSerialized;\n toTokenAmount: TokenAmountValuesSerialized;\n /**\n * The adjusted return for the bridge transaction\n * destTokenAmount - totalNetworkFee\n */\n adjustedReturn: Omit<TokenAmountValuesSerialized, 'amount'>;\n /**\n * The actual amount sent by user in non-atomic decimal form\n * srcTokenAmount + metabridgeFee\n */\n sentAmount: TokenAmountValuesSerialized;\n swapRate: string; // destTokenAmount / sentAmount\n /**\n * The cost of the bridge transaction\n * sentAmount - adjustedReturn\n */\n cost: Omit<TokenAmountValuesSerialized, 'amount'>;\n};\n\nexport type StartPollingForBridgeTxStatusArgs = {\n bridgeTxMeta?: Pick<TransactionMeta, 'id' | 'hash' | 'batchId'>;\n actionId?: string;\n /**\n * @deprecated the txMeta or orderUid should be used instead\n */\n originalTransactionId?: string;\n quoteResponse: QuoteResponse & QuoteMetadata;\n startTime?: BridgeHistoryItem['startTime'];\n slippagePercentage: BridgeHistoryItem['slippagePercentage'];\n initialDestAssetBalance?: BridgeHistoryItem['initialDestAssetBalance'];\n targetContractAddress?: BridgeHistoryItem['targetContractAddress'];\n approvalTxId?: BridgeHistoryItem['approvalTxId'];\n isStxEnabled?: BridgeHistoryItem['isStxEnabled'];\n location?: BridgeHistoryItem['location'];\n // Legacy field for `ab_tests` metrics payload.\n abTests?: BridgeHistoryItem['abTests'];\n // New field for `active_ab_tests` metrics payload.\n activeAbTests?: BridgeHistoryItem['activeAbTests'];\n accountAddress: string;\n};\n\n/**\n * Chrome: The BigNumber values are automatically serialized to strings when sent to the background\n * Firefox: The BigNumber values are not serialized to strings when sent to the background,\n * so we force the ui to do it manually, by using StartPollingForBridgeTxStatusArgsSerialized type on the startPollingForBridgeTxStatus action\n */\nexport type StartPollingForBridgeTxStatusArgsSerialized = Omit<\n StartPollingForBridgeTxStatusArgs,\n 'quoteResponse'\n> & {\n quoteResponse: QuoteResponse & Partial<QuoteMetadata>;\n};\n\nexport type SourceChainTxMetaId = string;\n\nexport type BridgeStatusControllerState = {\n txHistory: Record<SourceChainTxMetaId, BridgeHistoryItem>;\n};\n\n// Actions\ntype BridgeStatusControllerAction<\n FunctionName extends keyof BridgeStatusController,\n> = {\n type: `${typeof BRIDGE_STATUS_CONTROLLER_NAME}:${FunctionName}`;\n handler: BridgeStatusController[FunctionName];\n};\n\nexport type BridgeStatusControllerGetStateAction = ControllerGetStateAction<\n typeof BRIDGE_STATUS_CONTROLLER_NAME,\n BridgeStatusControllerState\n>;\n\n// Maps to BridgeController function names\nexport type BridgeStatusControllerStartPollingForBridgeTxStatusAction =\n BridgeStatusControllerAction<'startPollingForBridgeTxStatus'>;\n\nexport type BridgeStatusControllerWipeBridgeStatusAction =\n BridgeStatusControllerAction<'wipeBridgeStatus'>;\n\nexport type BridgeStatusControllerResetStateAction =\n BridgeStatusControllerAction<'resetState'>;\n\nexport type BridgeStatusControllerSubmitTxAction =\n BridgeStatusControllerAction<'submitTx'>;\n\nexport type BridgeStatusControllerSubmitIntentAction =\n BridgeStatusControllerAction<'submitIntent'>;\n\nexport type BridgeStatusControllerRestartPollingForFailedAttemptsAction =\n BridgeStatusControllerAction<'restartPollingForFailedAttempts'>;\n\nexport type BridgeStatusControllerGetBridgeHistoryItemByTxMetaIdAction =\n BridgeStatusControllerAction<'getBridgeHistoryItemByTxMetaId'>;\n\nexport type BridgeStatusControllerActions =\n | BridgeStatusControllerStartPollingForBridgeTxStatusAction\n | BridgeStatusControllerWipeBridgeStatusAction\n | BridgeStatusControllerResetStateAction\n | BridgeStatusControllerGetStateAction\n | BridgeStatusControllerSubmitTxAction\n | BridgeStatusControllerSubmitIntentAction\n | BridgeStatusControllerRestartPollingForFailedAttemptsAction\n | BridgeStatusControllerGetBridgeHistoryItemByTxMetaIdAction;\n\n// Events\nexport type BridgeStatusControllerStateChangeEvent = ControllerStateChangeEvent<\n typeof BRIDGE_STATUS_CONTROLLER_NAME,\n BridgeStatusControllerState\n>;\n/**\n * This event is published when the destination bridge transaction is completed\n * The payload is the asset received on the destination chain\n */\nexport type BridgeStatusControllerDestinationTransactionCompletedEvent = {\n type: 'BridgeStatusController:destinationTransactionCompleted';\n payload: [CaipAssetType];\n};\n\nexport type BridgeStatusControllerEvents =\n | BridgeStatusControllerStateChangeEvent\n | BridgeStatusControllerDestinationTransactionCompletedEvent;\n\n/**\n * The external actions available to the BridgeStatusController.\n */\ntype AllowedActions =\n | NetworkControllerFindNetworkClientIdByChainIdAction\n | NetworkControllerGetStateAction\n | NetworkControllerGetNetworkClientByIdAction\n | HandleSnapRequest\n | TransactionControllerGetStateAction\n | TransactionControllerUpdateTransactionAction\n | TransactionControllerAddTransactionAction\n | TransactionControllerEstimateGasFeeAction\n | TransactionControllerIsAtomicBatchSupportedAction\n | BridgeControllerAction<BridgeBackgroundAction.TRACK_METAMETRICS_EVENT>\n | BridgeControllerAction<BridgeBackgroundAction.STOP_POLLING_FOR_QUOTES>\n | GetGasFeeState\n | AccountsControllerGetAccountByAddressAction\n | AuthenticationControllerGetBearerTokenAction\n | KeyringControllerSignTypedMessageAction;\n\n/**\n * The external events available to the BridgeStatusController.\n */\ntype AllowedEvents =\n | TransactionControllerTransactionFailedEvent\n | TransactionControllerTransactionConfirmedEvent;\n\n/**\n * The messenger for the BridgeStatusController.\n */\nexport type BridgeStatusControllerMessenger = Messenger<\n typeof BRIDGE_STATUS_CONTROLLER_NAME,\n BridgeStatusControllerActions | AllowedActions,\n BridgeStatusControllerEvents | AllowedEvents\n>;\n"]}
1
+ {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAuCA,+CAA4D;AAG5D,8EAA8E;AAC9E,2BAA2B;AAE3B,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;AACnB,CAAC,EAHW,cAAc,8BAAd,cAAc,QAGzB;AAyCD,IAAY,QAaX;AAbD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,2BAAe,CAAA;IACf,uCAA2B,CAAA;IAC3B,+BAAmB,CAAA;IACnB,+BAAmB,CAAA;IACnB,mCAAuB,CAAA;IACvB,qCAAyB,CAAA;IACzB,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;IACjB,iCAAqB,CAAA;IACrB,2BAAe,CAAA;IACf,2BAAe,CAAA;AACjB,CAAC,EAbW,QAAQ,wBAAR,QAAQ,QAanB;AAiED,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,qFAA+D,CAAA;IAC/D,2DAAqC,CAAA;IACrC,2CAAqB,CAAA;IACrB,+CAAyB,CAAA;IACzB,2CAAqB,CAAA;IACrB,mDAA6B,CAAA;IAC7B,yFAAmE,CAAA;IACnE,uFAAiE,CAAA;AACnE,CAAC,EATW,kBAAkB,kCAAlB,kBAAkB,QAS7B","sourcesContent":["import type { AccountsControllerGetAccountByAddressAction } from '@metamask/accounts-controller';\nimport type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n} from '@metamask/base-controller';\nimport type {\n BridgeBackgroundAction,\n BridgeControllerAction,\n ChainId,\n FeatureId,\n Quote,\n QuoteMetadata,\n QuoteResponse,\n MetaMetricsSwapsEventSource,\n} from '@metamask/bridge-controller';\nimport type { GetGasFeeState } from '@metamask/gas-fee-controller';\nimport type { KeyringControllerSignTypedMessageAction } from '@metamask/keyring-controller';\nimport type { Messenger } from '@metamask/messenger';\nimport type {\n NetworkControllerFindNetworkClientIdByChainIdAction,\n NetworkControllerGetNetworkClientByIdAction,\n NetworkControllerGetStateAction,\n} from '@metamask/network-controller';\nimport type { AuthenticationControllerGetBearerTokenAction } from '@metamask/profile-sync-controller/auth';\nimport type { SnapControllerHandleRequestAction } from '@metamask/snaps-controllers';\nimport type { Infer } from '@metamask/superstruct';\nimport type {\n TransactionControllerAddTransactionAction,\n TransactionControllerEstimateGasFeeAction,\n TransactionControllerGetStateAction,\n TransactionControllerIsAtomicBatchSupportedAction,\n TransactionControllerTransactionConfirmedEvent,\n TransactionControllerTransactionFailedEvent,\n TransactionControllerUpdateTransactionAction,\n TransactionMeta,\n} from '@metamask/transaction-controller';\nimport type { CaipAssetType } from '@metamask/utils';\n\nimport type { BridgeStatusController } from './bridge-status-controller';\nimport { BRIDGE_STATUS_CONTROLLER_NAME } from './constants';\nimport type { StatusResponseSchema } from './utils/validators';\n\n// All fields need to be types not interfaces, same with their children fields\n// o/w you get a type error\n\nexport enum BridgeClientId {\n EXTENSION = 'extension',\n MOBILE = 'mobile',\n}\n\nexport type FetchFunction = (\n input: RequestInfo | URL,\n init?: RequestInit,\n) => Promise<unknown>;\n\n/**\n * These fields are specific to Solana transactions and can likely be infered from TransactionMeta\n *\n * @deprecated these should be removed eventually\n */\nexport type SolanaTransactionMeta = {\n isSolana: boolean;\n isBridgeTx: boolean;\n};\n\nexport type StatusRequest = {\n bridgeId: string; // lifi, socket, squid\n srcTxHash?: string; // lifi, socket, squid, might be undefined for STX\n bridge: string; // lifi, socket, squid\n srcChainId: ChainId; // lifi, socket, squid\n destChainId: ChainId; // lifi, socket, squid\n quote?: Quote; // squid\n refuel?: boolean; // lifi\n};\n\nexport type StatusRequestDto = Omit<\n StatusRequest,\n 'quote' | 'srcChainId' | 'destChainId' | 'refuel'\n> & {\n srcChainId: string; // lifi, socket, squid\n destChainId: string; // lifi, socket, squid\n requestId?: string;\n refuel?: string; // lifi\n};\n\nexport type StatusRequestWithSrcTxHash = StatusRequest & {\n srcTxHash: string;\n};\n\nexport enum BridgeId {\n HOP = 'hop',\n CELER = 'celer',\n CELERCIRCLE = 'celercircle',\n CONNEXT = 'connext',\n POLYGON = 'polygon',\n AVALANCHE = 'avalanche',\n MULTICHAIN = 'multichain',\n AXELAR = 'axelar',\n ACROSS = 'across',\n STARGATE = 'stargate',\n RELAY = 'relay',\n MAYAN = 'mayan',\n}\n\nexport type StatusResponse = Infer<typeof StatusResponseSchema>;\n\nexport type RefuelStatusResponse = object & StatusResponse;\n\nexport type BridgeHistoryItem = {\n txMetaId?: string; // Optional: not available pre-submission or on sync failure\n actionId?: string; // Only for non-batch EVM transactions\n /**\n * @deprecated the txMeta or orderUid should be used instead\n */\n originalTransactionId?: string; // Keep original transaction ID for intent transactions\n batchId?: string;\n quote: Quote;\n status: StatusResponse;\n startTime?: number; // timestamp in ms\n estimatedProcessingTimeInSeconds: number;\n slippagePercentage: number;\n completionTime?: number; // timestamp in ms\n pricingData?: {\n /**\n * The actual amount sent by user in non-atomic decimal form\n */\n amountSent: QuoteMetadata['sentAmount']['amount'];\n amountSentInUsd?: QuoteMetadata['sentAmount']['usd'];\n quotedGasInUsd?: QuoteMetadata['gasFee']['effective']['usd'];\n quotedGasAmount?: QuoteMetadata['gasFee']['effective']['amount'];\n quotedReturnInUsd?: QuoteMetadata['toTokenAmount']['usd'];\n quotedRefuelSrcAmountInUsd?: string;\n quotedRefuelDestAmountInUsd?: string;\n };\n initialDestAssetBalance?: string;\n targetContractAddress?: string;\n account: string;\n hasApprovalTx: boolean;\n approvalTxId?: string;\n featureId?: FeatureId;\n isStxEnabled?: boolean;\n /**\n * The location/entry point from which the user initiated the swap or bridge.\n * Used to attribute swaps to specific flows (e.g. Trending Explore).\n */\n location?: MetaMetricsSwapsEventSource;\n /**\n * Legacy A/B test metrics context (`ab_tests`) kept for backward compatibility.\n * Keys are test names, values are variant names (e.g. { token_details_layout: 'treatment' }).\n */\n abTests?: Record<string, string>;\n /**\n * New A/B test metrics context (`active_ab_tests`) that replaces `ab_tests`.\n * Kept separate so migration can run both payloads in parallel.\n * This field is an array of test objects.\n */\n activeAbTests?: { key: string; value: string }[];\n /**\n * Attempts tracking for exponential backoff on failed fetches.\n * We track the number of attempts and the last attempt time for each txMetaId that has failed at least once\n */\n attempts?: {\n counter: number;\n lastAttemptTime: number; // timestamp in ms\n };\n};\n\nexport enum BridgeStatusAction {\n StartPollingForBridgeTxStatus = 'StartPollingForBridgeTxStatus',\n WipeBridgeStatus = 'WipeBridgeStatus',\n GetState = 'GetState',\n ResetState = 'ResetState',\n SubmitTx = 'SubmitTx',\n SubmitIntent = 'SubmitIntent',\n RestartPollingForFailedAttempts = 'RestartPollingForFailedAttempts',\n GetBridgeHistoryItemByTxMetaId = 'GetBridgeHistoryItemByTxMetaId',\n}\n\nexport type TokenAmountValuesSerialized = {\n amount: string;\n valueInCurrency: string | null;\n usd: string | null;\n};\n\nexport type QuoteMetadataSerialized = {\n gasFee: TokenAmountValuesSerialized;\n /**\n * The total network fee for the bridge transaction\n * estimatedGasFees + relayerFees\n */\n totalNetworkFee: TokenAmountValuesSerialized;\n /**\n * The total max network fee for the bridge transaction\n * maxGasFees + relayerFees\n */\n totalMaxNetworkFee: TokenAmountValuesSerialized;\n toTokenAmount: TokenAmountValuesSerialized;\n /**\n * The adjusted return for the bridge transaction\n * destTokenAmount - totalNetworkFee\n */\n adjustedReturn: Omit<TokenAmountValuesSerialized, 'amount'>;\n /**\n * The actual amount sent by user in non-atomic decimal form\n * srcTokenAmount + metabridgeFee\n */\n sentAmount: TokenAmountValuesSerialized;\n swapRate: string; // destTokenAmount / sentAmount\n /**\n * The cost of the bridge transaction\n * sentAmount - adjustedReturn\n */\n cost: Omit<TokenAmountValuesSerialized, 'amount'>;\n};\n\nexport type StartPollingForBridgeTxStatusArgs = {\n bridgeTxMeta?: Pick<TransactionMeta, 'id' | 'hash' | 'batchId'>;\n actionId?: string;\n /**\n * @deprecated the txMeta or orderUid should be used instead\n */\n originalTransactionId?: string;\n quoteResponse: QuoteResponse & QuoteMetadata;\n startTime?: BridgeHistoryItem['startTime'];\n slippagePercentage: BridgeHistoryItem['slippagePercentage'];\n initialDestAssetBalance?: BridgeHistoryItem['initialDestAssetBalance'];\n targetContractAddress?: BridgeHistoryItem['targetContractAddress'];\n approvalTxId?: BridgeHistoryItem['approvalTxId'];\n isStxEnabled?: BridgeHistoryItem['isStxEnabled'];\n location?: BridgeHistoryItem['location'];\n // Legacy field for `ab_tests` metrics payload.\n abTests?: BridgeHistoryItem['abTests'];\n // New field for `active_ab_tests` metrics payload.\n activeAbTests?: BridgeHistoryItem['activeAbTests'];\n accountAddress: string;\n};\n\n/**\n * Chrome: The BigNumber values are automatically serialized to strings when sent to the background\n * Firefox: The BigNumber values are not serialized to strings when sent to the background,\n * so we force the ui to do it manually, by using StartPollingForBridgeTxStatusArgsSerialized type on the startPollingForBridgeTxStatus action\n */\nexport type StartPollingForBridgeTxStatusArgsSerialized = Omit<\n StartPollingForBridgeTxStatusArgs,\n 'quoteResponse'\n> & {\n quoteResponse: QuoteResponse & Partial<QuoteMetadata>;\n};\n\nexport type SourceChainTxMetaId = string;\n\nexport type BridgeStatusControllerState = {\n txHistory: Record<SourceChainTxMetaId, BridgeHistoryItem>;\n};\n\n// Actions\ntype BridgeStatusControllerAction<\n FunctionName extends keyof BridgeStatusController,\n> = {\n type: `${typeof BRIDGE_STATUS_CONTROLLER_NAME}:${FunctionName}`;\n handler: BridgeStatusController[FunctionName];\n};\n\nexport type BridgeStatusControllerGetStateAction = ControllerGetStateAction<\n typeof BRIDGE_STATUS_CONTROLLER_NAME,\n BridgeStatusControllerState\n>;\n\n// Maps to BridgeController function names\nexport type BridgeStatusControllerStartPollingForBridgeTxStatusAction =\n BridgeStatusControllerAction<'startPollingForBridgeTxStatus'>;\n\nexport type BridgeStatusControllerWipeBridgeStatusAction =\n BridgeStatusControllerAction<'wipeBridgeStatus'>;\n\nexport type BridgeStatusControllerResetStateAction =\n BridgeStatusControllerAction<'resetState'>;\n\nexport type BridgeStatusControllerSubmitTxAction =\n BridgeStatusControllerAction<'submitTx'>;\n\nexport type BridgeStatusControllerSubmitIntentAction =\n BridgeStatusControllerAction<'submitIntent'>;\n\nexport type BridgeStatusControllerRestartPollingForFailedAttemptsAction =\n BridgeStatusControllerAction<'restartPollingForFailedAttempts'>;\n\nexport type BridgeStatusControllerGetBridgeHistoryItemByTxMetaIdAction =\n BridgeStatusControllerAction<'getBridgeHistoryItemByTxMetaId'>;\n\nexport type BridgeStatusControllerActions =\n | BridgeStatusControllerStartPollingForBridgeTxStatusAction\n | BridgeStatusControllerWipeBridgeStatusAction\n | BridgeStatusControllerResetStateAction\n | BridgeStatusControllerGetStateAction\n | BridgeStatusControllerSubmitTxAction\n | BridgeStatusControllerSubmitIntentAction\n | BridgeStatusControllerRestartPollingForFailedAttemptsAction\n | BridgeStatusControllerGetBridgeHistoryItemByTxMetaIdAction;\n\n// Events\nexport type BridgeStatusControllerStateChangeEvent = ControllerStateChangeEvent<\n typeof BRIDGE_STATUS_CONTROLLER_NAME,\n BridgeStatusControllerState\n>;\n/**\n * This event is published when the destination bridge transaction is completed\n * The payload is the asset received on the destination chain\n */\nexport type BridgeStatusControllerDestinationTransactionCompletedEvent = {\n type: 'BridgeStatusController:destinationTransactionCompleted';\n payload: [CaipAssetType];\n};\n\nexport type BridgeStatusControllerEvents =\n | BridgeStatusControllerStateChangeEvent\n | BridgeStatusControllerDestinationTransactionCompletedEvent;\n\n/**\n * The external actions available to the BridgeStatusController.\n */\ntype AllowedActions =\n | NetworkControllerFindNetworkClientIdByChainIdAction\n | NetworkControllerGetStateAction\n | NetworkControllerGetNetworkClientByIdAction\n | SnapControllerHandleRequestAction\n | TransactionControllerGetStateAction\n | TransactionControllerUpdateTransactionAction\n | TransactionControllerAddTransactionAction\n | TransactionControllerEstimateGasFeeAction\n | TransactionControllerIsAtomicBatchSupportedAction\n | BridgeControllerAction<BridgeBackgroundAction.TRACK_METAMETRICS_EVENT>\n | BridgeControllerAction<BridgeBackgroundAction.STOP_POLLING_FOR_QUOTES>\n | GetGasFeeState\n | AccountsControllerGetAccountByAddressAction\n | AuthenticationControllerGetBearerTokenAction\n | KeyringControllerSignTypedMessageAction;\n\n/**\n * The external events available to the BridgeStatusController.\n */\ntype AllowedEvents =\n | TransactionControllerTransactionFailedEvent\n | TransactionControllerTransactionConfirmedEvent;\n\n/**\n * The messenger for the BridgeStatusController.\n */\nexport type BridgeStatusControllerMessenger = Messenger<\n typeof BRIDGE_STATUS_CONTROLLER_NAME,\n BridgeStatusControllerActions | AllowedActions,\n BridgeStatusControllerEvents | AllowedEvents\n>;\n"]}
package/dist/types.d.cts CHANGED
@@ -6,7 +6,7 @@ import type { KeyringControllerSignTypedMessageAction } from "@metamask/keyring-
6
6
  import type { Messenger } from "@metamask/messenger";
7
7
  import type { NetworkControllerFindNetworkClientIdByChainIdAction, NetworkControllerGetNetworkClientByIdAction, NetworkControllerGetStateAction } from "@metamask/network-controller";
8
8
  import type { AuthenticationControllerGetBearerTokenAction } from "@metamask/profile-sync-controller/auth";
9
- import type { HandleSnapRequest } from "@metamask/snaps-controllers";
9
+ import type { SnapControllerHandleRequestAction } from "@metamask/snaps-controllers";
10
10
  import type { Infer } from "@metamask/superstruct";
11
11
  import type { TransactionControllerAddTransactionAction, TransactionControllerEstimateGasFeeAction, TransactionControllerGetStateAction, TransactionControllerIsAtomicBatchSupportedAction, TransactionControllerTransactionConfirmedEvent, TransactionControllerTransactionFailedEvent, TransactionControllerUpdateTransactionAction, TransactionMeta } from "@metamask/transaction-controller";
12
12
  import type { CaipAssetType } from "@metamask/utils";
@@ -224,7 +224,7 @@ export type BridgeStatusControllerEvents = BridgeStatusControllerStateChangeEven
224
224
  /**
225
225
  * The external actions available to the BridgeStatusController.
226
226
  */
227
- type AllowedActions = NetworkControllerFindNetworkClientIdByChainIdAction | NetworkControllerGetStateAction | NetworkControllerGetNetworkClientByIdAction | HandleSnapRequest | TransactionControllerGetStateAction | TransactionControllerUpdateTransactionAction | TransactionControllerAddTransactionAction | TransactionControllerEstimateGasFeeAction | TransactionControllerIsAtomicBatchSupportedAction | BridgeControllerAction<BridgeBackgroundAction.TRACK_METAMETRICS_EVENT> | BridgeControllerAction<BridgeBackgroundAction.STOP_POLLING_FOR_QUOTES> | GetGasFeeState | AccountsControllerGetAccountByAddressAction | AuthenticationControllerGetBearerTokenAction | KeyringControllerSignTypedMessageAction;
227
+ type AllowedActions = NetworkControllerFindNetworkClientIdByChainIdAction | NetworkControllerGetStateAction | NetworkControllerGetNetworkClientByIdAction | SnapControllerHandleRequestAction | TransactionControllerGetStateAction | TransactionControllerUpdateTransactionAction | TransactionControllerAddTransactionAction | TransactionControllerEstimateGasFeeAction | TransactionControllerIsAtomicBatchSupportedAction | BridgeControllerAction<BridgeBackgroundAction.TRACK_METAMETRICS_EVENT> | BridgeControllerAction<BridgeBackgroundAction.STOP_POLLING_FOR_QUOTES> | GetGasFeeState | AccountsControllerGetAccountByAddressAction | AuthenticationControllerGetBearerTokenAction | KeyringControllerSignTypedMessageAction;
228
228
  /**
229
229
  * The external events available to the BridgeStatusController.
230
230
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2CAA2C,EAAE,sCAAsC;AACjG,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC3B,kCAAkC;AACnC,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EACtB,OAAO,EACP,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yring-
6
6
  import type { Messenger } from "@metamask/messenger";
7
7
  import type { NetworkControllerFindNetworkClientIdByChainIdAction, NetworkControllerGetNetworkClientByIdAction, NetworkControllerGetStateAction } from "@metamask/network-controller";
8
8
  import type { AuthenticationControllerGetBearerTokenAction } from "@metamask/profile-sync-controller/auth";
9
- import type { HandleSnapRequest } from "@metamask/snaps-controllers";
9
+ import type { SnapControllerHandleRequestAction } from "@metamask/snaps-controllers";
10
10
  import type { Infer } from "@metamask/superstruct";
11
11
  import type { TransactionControllerAddTransactionAction, TransactionControllerEstimateGasFeeAction, TransactionControllerGetStateAction, TransactionControllerIsAtomicBatchSupportedAction, TransactionControllerTransactionConfirmedEvent, TransactionControllerTransactionFailedEvent, TransactionControllerUpdateTransactionAction, TransactionMeta } from "@metamask/transaction-controller";
12
12
  import type { CaipAssetType } from "@metamask/utils";
@@ -224,7 +224,7 @@ export type BridgeStatusControllerEvents = BridgeStatusControllerStateChangeEven
224
224
  /**
225
225
  * The external actions available to the BridgeStatusController.
226
226
  */
227
- type AllowedActions = NetworkControllerFindNetworkClientIdByChainIdAction | NetworkControllerGetStateAction | NetworkControllerGetNetworkClientByIdAction | HandleSnapRequest | TransactionControllerGetStateAction | TransactionControllerUpdateTransactionAction | TransactionControllerAddTransactionAction | TransactionControllerEstimateGasFeeAction | TransactionControllerIsAtomicBatchSupportedAction | BridgeControllerAction<BridgeBackgroundAction.TRACK_METAMETRICS_EVENT> | BridgeControllerAction<BridgeBackgroundAction.STOP_POLLING_FOR_QUOTES> | GetGasFeeState | AccountsControllerGetAccountByAddressAction | AuthenticationControllerGetBearerTokenAction | KeyringControllerSignTypedMessageAction;
227
+ type AllowedActions = NetworkControllerFindNetworkClientIdByChainIdAction | NetworkControllerGetStateAction | NetworkControllerGetNetworkClientByIdAction | SnapControllerHandleRequestAction | TransactionControllerGetStateAction | TransactionControllerUpdateTransactionAction | TransactionControllerAddTransactionAction | TransactionControllerEstimateGasFeeAction | TransactionControllerIsAtomicBatchSupportedAction | BridgeControllerAction<BridgeBackgroundAction.TRACK_METAMETRICS_EVENT> | BridgeControllerAction<BridgeBackgroundAction.STOP_POLLING_FOR_QUOTES> | GetGasFeeState | AccountsControllerGetAccountByAddressAction | AuthenticationControllerGetBearerTokenAction | KeyringControllerSignTypedMessageAction;
228
228
  /**
229
229
  * The external events available to the BridgeStatusController.
230
230
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2CAA2C,EAAE,sCAAsC;AACjG,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC3B,kCAAkC;AACnC,OAAO,KAAK,EACV,sBAAsB,EACtB,sBAAsB,EACtB,OAAO,EACP,SAAS,EACT,KAAK,EACL,aAAa,EACb,aAAa,EACb,2BAA2B,EAC5B,oCAAoC;AACrC,OAAO,KAAK,EAAE,cAAc,EAAE,qCAAqC;AACnE,OAAO,KAAK,EAAE,uCAAuC,EAAE,qCAAqC;AAC5F,OAAO,KAAK,EAAE,SAAS,EAAE,4BAA4B;AACrD,OAAO,KAAK,EACV,mDAAmD,EACnD,2CAA2C,EAC3C,+BAA+B,EAChC,qCAAqC;AACtC,OAAO,KAAK,EAAE,4CAA4C,EAAE,+CAA+C;AAC3G,OAAO,KAAK,EAAE,iBAAiB,EAAE,oCAAoC;AACrE,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AACnD,OAAO,KAAK,EACV,yCAAyC,EACzC,yCAAyC,EACzC,mCAAmC,EACnC,iDAAiD,EACjD,8CAA8C,EAC9C,2CAA2C,EAC3C,4CAA4C,EAC5C,eAAe,EAChB,yCAAyC;AAC1C,OAAO,KAAK,EAAE,aAAa,EAAE,wBAAwB;AAErD,OAAO,KAAK,EAAE,sBAAsB,EAAE,uCAAmC;AACzE,OAAO,EAAE,6BAA6B,EAAE,wBAAoB;AAC5D,OAAO,KAAK,EAAE,oBAAoB,EAAE,+BAA2B;AAK/D,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A;AACnE,CAAC,EATW,kBAAkB,KAAlB,kBAAkB,QAS7B","sourcesContent":["import type { AccountsControllerGetAccountByAddressAction } from '@metamask/accounts-controller';\nimport type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n} from '@metamask/base-controller';\nimport type {\n BridgeBackgroundAction,\n BridgeControllerAction,\n ChainId,\n FeatureId,\n Quote,\n QuoteMetadata,\n QuoteResponse,\n MetaMetricsSwapsEventSource,\n} from '@metamask/bridge-controller';\nimport type { GetGasFeeState } from '@metamask/gas-fee-controller';\nimport type { KeyringControllerSignTypedMessageAction } from '@metamask/keyring-controller';\nimport type { Messenger } from '@metamask/messenger';\nimport type {\n NetworkControllerFindNetworkClientIdByChainIdAction,\n NetworkControllerGetNetworkClientByIdAction,\n NetworkControllerGetStateAction,\n} from '@metamask/network-controller';\nimport type { AuthenticationControllerGetBearerTokenAction } from '@metamask/profile-sync-controller/auth';\nimport type { HandleSnapRequest } from '@metamask/snaps-controllers';\nimport type { Infer } from '@metamask/superstruct';\nimport type {\n TransactionControllerAddTransactionAction,\n TransactionControllerEstimateGasFeeAction,\n TransactionControllerGetStateAction,\n TransactionControllerIsAtomicBatchSupportedAction,\n TransactionControllerTransactionConfirmedEvent,\n TransactionControllerTransactionFailedEvent,\n TransactionControllerUpdateTransactionAction,\n TransactionMeta,\n} from '@metamask/transaction-controller';\nimport type { CaipAssetType } from '@metamask/utils';\n\nimport type { BridgeStatusController } from './bridge-status-controller';\nimport { BRIDGE_STATUS_CONTROLLER_NAME } from './constants';\nimport type { StatusResponseSchema } from './utils/validators';\n\n// All fields need to be types not interfaces, same with their children fields\n// o/w you get a type error\n\nexport enum BridgeClientId {\n EXTENSION = 'extension',\n MOBILE = 'mobile',\n}\n\nexport type FetchFunction = (\n input: RequestInfo | URL,\n init?: RequestInit,\n) => Promise<unknown>;\n\n/**\n * These fields are specific to Solana transactions and can likely be infered from TransactionMeta\n *\n * @deprecated these should be removed eventually\n */\nexport type SolanaTransactionMeta = {\n isSolana: boolean;\n isBridgeTx: boolean;\n};\n\nexport type StatusRequest = {\n bridgeId: string; // lifi, socket, squid\n srcTxHash?: string; // lifi, socket, squid, might be undefined for STX\n bridge: string; // lifi, socket, squid\n srcChainId: ChainId; // lifi, socket, squid\n destChainId: ChainId; // lifi, socket, squid\n quote?: Quote; // squid\n refuel?: boolean; // lifi\n};\n\nexport type StatusRequestDto = Omit<\n StatusRequest,\n 'quote' | 'srcChainId' | 'destChainId' | 'refuel'\n> & {\n srcChainId: string; // lifi, socket, squid\n destChainId: string; // lifi, socket, squid\n requestId?: string;\n refuel?: string; // lifi\n};\n\nexport type StatusRequestWithSrcTxHash = StatusRequest & {\n srcTxHash: string;\n};\n\nexport enum BridgeId {\n HOP = 'hop',\n CELER = 'celer',\n CELERCIRCLE = 'celercircle',\n CONNEXT = 'connext',\n POLYGON = 'polygon',\n AVALANCHE = 'avalanche',\n MULTICHAIN = 'multichain',\n AXELAR = 'axelar',\n ACROSS = 'across',\n STARGATE = 'stargate',\n RELAY = 'relay',\n MAYAN = 'mayan',\n}\n\nexport type StatusResponse = Infer<typeof StatusResponseSchema>;\n\nexport type RefuelStatusResponse = object & StatusResponse;\n\nexport type BridgeHistoryItem = {\n txMetaId?: string; // Optional: not available pre-submission or on sync failure\n actionId?: string; // Only for non-batch EVM transactions\n /**\n * @deprecated the txMeta or orderUid should be used instead\n */\n originalTransactionId?: string; // Keep original transaction ID for intent transactions\n batchId?: string;\n quote: Quote;\n status: StatusResponse;\n startTime?: number; // timestamp in ms\n estimatedProcessingTimeInSeconds: number;\n slippagePercentage: number;\n completionTime?: number; // timestamp in ms\n pricingData?: {\n /**\n * The actual amount sent by user in non-atomic decimal form\n */\n amountSent: QuoteMetadata['sentAmount']['amount'];\n amountSentInUsd?: QuoteMetadata['sentAmount']['usd'];\n quotedGasInUsd?: QuoteMetadata['gasFee']['effective']['usd'];\n quotedGasAmount?: QuoteMetadata['gasFee']['effective']['amount'];\n quotedReturnInUsd?: QuoteMetadata['toTokenAmount']['usd'];\n quotedRefuelSrcAmountInUsd?: string;\n quotedRefuelDestAmountInUsd?: string;\n };\n initialDestAssetBalance?: string;\n targetContractAddress?: string;\n account: string;\n hasApprovalTx: boolean;\n approvalTxId?: string;\n featureId?: FeatureId;\n isStxEnabled?: boolean;\n /**\n * The location/entry point from which the user initiated the swap or bridge.\n * Used to attribute swaps to specific flows (e.g. Trending Explore).\n */\n location?: MetaMetricsSwapsEventSource;\n /**\n * Legacy A/B test metrics context (`ab_tests`) kept for backward compatibility.\n * Keys are test names, values are variant names (e.g. { token_details_layout: 'treatment' }).\n */\n abTests?: Record<string, string>;\n /**\n * New A/B test metrics context (`active_ab_tests`) that replaces `ab_tests`.\n * Kept separate so migration can run both payloads in parallel.\n * This field is an array of test objects.\n */\n activeAbTests?: { key: string; value: string }[];\n /**\n * Attempts tracking for exponential backoff on failed fetches.\n * We track the number of attempts and the last attempt time for each txMetaId that has failed at least once\n */\n attempts?: {\n counter: number;\n lastAttemptTime: number; // timestamp in ms\n };\n};\n\nexport enum BridgeStatusAction {\n StartPollingForBridgeTxStatus = 'StartPollingForBridgeTxStatus',\n WipeBridgeStatus = 'WipeBridgeStatus',\n GetState = 'GetState',\n ResetState = 'ResetState',\n SubmitTx = 'SubmitTx',\n SubmitIntent = 'SubmitIntent',\n RestartPollingForFailedAttempts = 'RestartPollingForFailedAttempts',\n GetBridgeHistoryItemByTxMetaId = 'GetBridgeHistoryItemByTxMetaId',\n}\n\nexport type TokenAmountValuesSerialized = {\n amount: string;\n valueInCurrency: string | null;\n usd: string | null;\n};\n\nexport type QuoteMetadataSerialized = {\n gasFee: TokenAmountValuesSerialized;\n /**\n * The total network fee for the bridge transaction\n * estimatedGasFees + relayerFees\n */\n totalNetworkFee: TokenAmountValuesSerialized;\n /**\n * The total max network fee for the bridge transaction\n * maxGasFees + relayerFees\n */\n totalMaxNetworkFee: TokenAmountValuesSerialized;\n toTokenAmount: TokenAmountValuesSerialized;\n /**\n * The adjusted return for the bridge transaction\n * destTokenAmount - totalNetworkFee\n */\n adjustedReturn: Omit<TokenAmountValuesSerialized, 'amount'>;\n /**\n * The actual amount sent by user in non-atomic decimal form\n * srcTokenAmount + metabridgeFee\n */\n sentAmount: TokenAmountValuesSerialized;\n swapRate: string; // destTokenAmount / sentAmount\n /**\n * The cost of the bridge transaction\n * sentAmount - adjustedReturn\n */\n cost: Omit<TokenAmountValuesSerialized, 'amount'>;\n};\n\nexport type StartPollingForBridgeTxStatusArgs = {\n bridgeTxMeta?: Pick<TransactionMeta, 'id' | 'hash' | 'batchId'>;\n actionId?: string;\n /**\n * @deprecated the txMeta or orderUid should be used instead\n */\n originalTransactionId?: string;\n quoteResponse: QuoteResponse & QuoteMetadata;\n startTime?: BridgeHistoryItem['startTime'];\n slippagePercentage: BridgeHistoryItem['slippagePercentage'];\n initialDestAssetBalance?: BridgeHistoryItem['initialDestAssetBalance'];\n targetContractAddress?: BridgeHistoryItem['targetContractAddress'];\n approvalTxId?: BridgeHistoryItem['approvalTxId'];\n isStxEnabled?: BridgeHistoryItem['isStxEnabled'];\n location?: BridgeHistoryItem['location'];\n // Legacy field for `ab_tests` metrics payload.\n abTests?: BridgeHistoryItem['abTests'];\n // New field for `active_ab_tests` metrics payload.\n activeAbTests?: BridgeHistoryItem['activeAbTests'];\n accountAddress: string;\n};\n\n/**\n * Chrome: The BigNumber values are automatically serialized to strings when sent to the background\n * Firefox: The BigNumber values are not serialized to strings when sent to the background,\n * so we force the ui to do it manually, by using StartPollingForBridgeTxStatusArgsSerialized type on the startPollingForBridgeTxStatus action\n */\nexport type StartPollingForBridgeTxStatusArgsSerialized = Omit<\n StartPollingForBridgeTxStatusArgs,\n 'quoteResponse'\n> & {\n quoteResponse: QuoteResponse & Partial<QuoteMetadata>;\n};\n\nexport type SourceChainTxMetaId = string;\n\nexport type BridgeStatusControllerState = {\n txHistory: Record<SourceChainTxMetaId, BridgeHistoryItem>;\n};\n\n// Actions\ntype BridgeStatusControllerAction<\n FunctionName extends keyof BridgeStatusController,\n> = {\n type: `${typeof BRIDGE_STATUS_CONTROLLER_NAME}:${FunctionName}`;\n handler: BridgeStatusController[FunctionName];\n};\n\nexport type BridgeStatusControllerGetStateAction = ControllerGetStateAction<\n typeof BRIDGE_STATUS_CONTROLLER_NAME,\n BridgeStatusControllerState\n>;\n\n// Maps to BridgeController function names\nexport type BridgeStatusControllerStartPollingForBridgeTxStatusAction =\n BridgeStatusControllerAction<'startPollingForBridgeTxStatus'>;\n\nexport type BridgeStatusControllerWipeBridgeStatusAction =\n BridgeStatusControllerAction<'wipeBridgeStatus'>;\n\nexport type BridgeStatusControllerResetStateAction =\n BridgeStatusControllerAction<'resetState'>;\n\nexport type BridgeStatusControllerSubmitTxAction =\n BridgeStatusControllerAction<'submitTx'>;\n\nexport type BridgeStatusControllerSubmitIntentAction =\n BridgeStatusControllerAction<'submitIntent'>;\n\nexport type BridgeStatusControllerRestartPollingForFailedAttemptsAction =\n BridgeStatusControllerAction<'restartPollingForFailedAttempts'>;\n\nexport type BridgeStatusControllerGetBridgeHistoryItemByTxMetaIdAction =\n BridgeStatusControllerAction<'getBridgeHistoryItemByTxMetaId'>;\n\nexport type BridgeStatusControllerActions =\n | BridgeStatusControllerStartPollingForBridgeTxStatusAction\n | BridgeStatusControllerWipeBridgeStatusAction\n | BridgeStatusControllerResetStateAction\n | BridgeStatusControllerGetStateAction\n | BridgeStatusControllerSubmitTxAction\n | BridgeStatusControllerSubmitIntentAction\n | BridgeStatusControllerRestartPollingForFailedAttemptsAction\n | BridgeStatusControllerGetBridgeHistoryItemByTxMetaIdAction;\n\n// Events\nexport type BridgeStatusControllerStateChangeEvent = ControllerStateChangeEvent<\n typeof BRIDGE_STATUS_CONTROLLER_NAME,\n BridgeStatusControllerState\n>;\n/**\n * This event is published when the destination bridge transaction is completed\n * The payload is the asset received on the destination chain\n */\nexport type BridgeStatusControllerDestinationTransactionCompletedEvent = {\n type: 'BridgeStatusController:destinationTransactionCompleted';\n payload: [CaipAssetType];\n};\n\nexport type BridgeStatusControllerEvents =\n | BridgeStatusControllerStateChangeEvent\n | BridgeStatusControllerDestinationTransactionCompletedEvent;\n\n/**\n * The external actions available to the BridgeStatusController.\n */\ntype AllowedActions =\n | NetworkControllerFindNetworkClientIdByChainIdAction\n | NetworkControllerGetStateAction\n | NetworkControllerGetNetworkClientByIdAction\n | HandleSnapRequest\n | TransactionControllerGetStateAction\n | TransactionControllerUpdateTransactionAction\n | TransactionControllerAddTransactionAction\n | TransactionControllerEstimateGasFeeAction\n | TransactionControllerIsAtomicBatchSupportedAction\n | BridgeControllerAction<BridgeBackgroundAction.TRACK_METAMETRICS_EVENT>\n | BridgeControllerAction<BridgeBackgroundAction.STOP_POLLING_FOR_QUOTES>\n | GetGasFeeState\n | AccountsControllerGetAccountByAddressAction\n | AuthenticationControllerGetBearerTokenAction\n | KeyringControllerSignTypedMessageAction;\n\n/**\n * The external events available to the BridgeStatusController.\n */\ntype AllowedEvents =\n | TransactionControllerTransactionFailedEvent\n | TransactionControllerTransactionConfirmedEvent;\n\n/**\n * The messenger for the BridgeStatusController.\n */\nexport type BridgeStatusControllerMessenger = Messenger<\n typeof BRIDGE_STATUS_CONTROLLER_NAME,\n BridgeStatusControllerActions | AllowedActions,\n BridgeStatusControllerEvents | AllowedEvents\n>;\n"]}
1
+ {"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAuCA,OAAO,EAAE,6BAA6B,EAAE,wBAAoB;AAG5D,8EAA8E;AAC9E,2BAA2B;AAE3B,MAAM,CAAN,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,yCAAuB,CAAA;IACvB,mCAAiB,CAAA;AACnB,CAAC,EAHW,cAAc,KAAd,cAAc,QAGzB;AAyCD,MAAM,CAAN,IAAY,QAaX;AAbD,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,2BAAe,CAAA;IACf,uCAA2B,CAAA;IAC3B,+BAAmB,CAAA;IACnB,+BAAmB,CAAA;IACnB,mCAAuB,CAAA;IACvB,qCAAyB,CAAA;IACzB,6BAAiB,CAAA;IACjB,6BAAiB,CAAA;IACjB,iCAAqB,CAAA;IACrB,2BAAe,CAAA;IACf,2BAAe,CAAA;AACjB,CAAC,EAbW,QAAQ,KAAR,QAAQ,QAanB;AAiED,MAAM,CAAN,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,qFAA+D,CAAA;IAC/D,2DAAqC,CAAA;IACrC,2CAAqB,CAAA;IACrB,+CAAyB,CAAA;IACzB,2CAAqB,CAAA;IACrB,mDAA6B,CAAA;IAC7B,yFAAmE,CAAA;IACnE,uFAAiE,CAAA;AACnE,CAAC,EATW,kBAAkB,KAAlB,kBAAkB,QAS7B","sourcesContent":["import type { AccountsControllerGetAccountByAddressAction } from '@metamask/accounts-controller';\nimport type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n} from '@metamask/base-controller';\nimport type {\n BridgeBackgroundAction,\n BridgeControllerAction,\n ChainId,\n FeatureId,\n Quote,\n QuoteMetadata,\n QuoteResponse,\n MetaMetricsSwapsEventSource,\n} from '@metamask/bridge-controller';\nimport type { GetGasFeeState } from '@metamask/gas-fee-controller';\nimport type { KeyringControllerSignTypedMessageAction } from '@metamask/keyring-controller';\nimport type { Messenger } from '@metamask/messenger';\nimport type {\n NetworkControllerFindNetworkClientIdByChainIdAction,\n NetworkControllerGetNetworkClientByIdAction,\n NetworkControllerGetStateAction,\n} from '@metamask/network-controller';\nimport type { AuthenticationControllerGetBearerTokenAction } from '@metamask/profile-sync-controller/auth';\nimport type { SnapControllerHandleRequestAction } from '@metamask/snaps-controllers';\nimport type { Infer } from '@metamask/superstruct';\nimport type {\n TransactionControllerAddTransactionAction,\n TransactionControllerEstimateGasFeeAction,\n TransactionControllerGetStateAction,\n TransactionControllerIsAtomicBatchSupportedAction,\n TransactionControllerTransactionConfirmedEvent,\n TransactionControllerTransactionFailedEvent,\n TransactionControllerUpdateTransactionAction,\n TransactionMeta,\n} from '@metamask/transaction-controller';\nimport type { CaipAssetType } from '@metamask/utils';\n\nimport type { BridgeStatusController } from './bridge-status-controller';\nimport { BRIDGE_STATUS_CONTROLLER_NAME } from './constants';\nimport type { StatusResponseSchema } from './utils/validators';\n\n// All fields need to be types not interfaces, same with their children fields\n// o/w you get a type error\n\nexport enum BridgeClientId {\n EXTENSION = 'extension',\n MOBILE = 'mobile',\n}\n\nexport type FetchFunction = (\n input: RequestInfo | URL,\n init?: RequestInit,\n) => Promise<unknown>;\n\n/**\n * These fields are specific to Solana transactions and can likely be infered from TransactionMeta\n *\n * @deprecated these should be removed eventually\n */\nexport type SolanaTransactionMeta = {\n isSolana: boolean;\n isBridgeTx: boolean;\n};\n\nexport type StatusRequest = {\n bridgeId: string; // lifi, socket, squid\n srcTxHash?: string; // lifi, socket, squid, might be undefined for STX\n bridge: string; // lifi, socket, squid\n srcChainId: ChainId; // lifi, socket, squid\n destChainId: ChainId; // lifi, socket, squid\n quote?: Quote; // squid\n refuel?: boolean; // lifi\n};\n\nexport type StatusRequestDto = Omit<\n StatusRequest,\n 'quote' | 'srcChainId' | 'destChainId' | 'refuel'\n> & {\n srcChainId: string; // lifi, socket, squid\n destChainId: string; // lifi, socket, squid\n requestId?: string;\n refuel?: string; // lifi\n};\n\nexport type StatusRequestWithSrcTxHash = StatusRequest & {\n srcTxHash: string;\n};\n\nexport enum BridgeId {\n HOP = 'hop',\n CELER = 'celer',\n CELERCIRCLE = 'celercircle',\n CONNEXT = 'connext',\n POLYGON = 'polygon',\n AVALANCHE = 'avalanche',\n MULTICHAIN = 'multichain',\n AXELAR = 'axelar',\n ACROSS = 'across',\n STARGATE = 'stargate',\n RELAY = 'relay',\n MAYAN = 'mayan',\n}\n\nexport type StatusResponse = Infer<typeof StatusResponseSchema>;\n\nexport type RefuelStatusResponse = object & StatusResponse;\n\nexport type BridgeHistoryItem = {\n txMetaId?: string; // Optional: not available pre-submission or on sync failure\n actionId?: string; // Only for non-batch EVM transactions\n /**\n * @deprecated the txMeta or orderUid should be used instead\n */\n originalTransactionId?: string; // Keep original transaction ID for intent transactions\n batchId?: string;\n quote: Quote;\n status: StatusResponse;\n startTime?: number; // timestamp in ms\n estimatedProcessingTimeInSeconds: number;\n slippagePercentage: number;\n completionTime?: number; // timestamp in ms\n pricingData?: {\n /**\n * The actual amount sent by user in non-atomic decimal form\n */\n amountSent: QuoteMetadata['sentAmount']['amount'];\n amountSentInUsd?: QuoteMetadata['sentAmount']['usd'];\n quotedGasInUsd?: QuoteMetadata['gasFee']['effective']['usd'];\n quotedGasAmount?: QuoteMetadata['gasFee']['effective']['amount'];\n quotedReturnInUsd?: QuoteMetadata['toTokenAmount']['usd'];\n quotedRefuelSrcAmountInUsd?: string;\n quotedRefuelDestAmountInUsd?: string;\n };\n initialDestAssetBalance?: string;\n targetContractAddress?: string;\n account: string;\n hasApprovalTx: boolean;\n approvalTxId?: string;\n featureId?: FeatureId;\n isStxEnabled?: boolean;\n /**\n * The location/entry point from which the user initiated the swap or bridge.\n * Used to attribute swaps to specific flows (e.g. Trending Explore).\n */\n location?: MetaMetricsSwapsEventSource;\n /**\n * Legacy A/B test metrics context (`ab_tests`) kept for backward compatibility.\n * Keys are test names, values are variant names (e.g. { token_details_layout: 'treatment' }).\n */\n abTests?: Record<string, string>;\n /**\n * New A/B test metrics context (`active_ab_tests`) that replaces `ab_tests`.\n * Kept separate so migration can run both payloads in parallel.\n * This field is an array of test objects.\n */\n activeAbTests?: { key: string; value: string }[];\n /**\n * Attempts tracking for exponential backoff on failed fetches.\n * We track the number of attempts and the last attempt time for each txMetaId that has failed at least once\n */\n attempts?: {\n counter: number;\n lastAttemptTime: number; // timestamp in ms\n };\n};\n\nexport enum BridgeStatusAction {\n StartPollingForBridgeTxStatus = 'StartPollingForBridgeTxStatus',\n WipeBridgeStatus = 'WipeBridgeStatus',\n GetState = 'GetState',\n ResetState = 'ResetState',\n SubmitTx = 'SubmitTx',\n SubmitIntent = 'SubmitIntent',\n RestartPollingForFailedAttempts = 'RestartPollingForFailedAttempts',\n GetBridgeHistoryItemByTxMetaId = 'GetBridgeHistoryItemByTxMetaId',\n}\n\nexport type TokenAmountValuesSerialized = {\n amount: string;\n valueInCurrency: string | null;\n usd: string | null;\n};\n\nexport type QuoteMetadataSerialized = {\n gasFee: TokenAmountValuesSerialized;\n /**\n * The total network fee for the bridge transaction\n * estimatedGasFees + relayerFees\n */\n totalNetworkFee: TokenAmountValuesSerialized;\n /**\n * The total max network fee for the bridge transaction\n * maxGasFees + relayerFees\n */\n totalMaxNetworkFee: TokenAmountValuesSerialized;\n toTokenAmount: TokenAmountValuesSerialized;\n /**\n * The adjusted return for the bridge transaction\n * destTokenAmount - totalNetworkFee\n */\n adjustedReturn: Omit<TokenAmountValuesSerialized, 'amount'>;\n /**\n * The actual amount sent by user in non-atomic decimal form\n * srcTokenAmount + metabridgeFee\n */\n sentAmount: TokenAmountValuesSerialized;\n swapRate: string; // destTokenAmount / sentAmount\n /**\n * The cost of the bridge transaction\n * sentAmount - adjustedReturn\n */\n cost: Omit<TokenAmountValuesSerialized, 'amount'>;\n};\n\nexport type StartPollingForBridgeTxStatusArgs = {\n bridgeTxMeta?: Pick<TransactionMeta, 'id' | 'hash' | 'batchId'>;\n actionId?: string;\n /**\n * @deprecated the txMeta or orderUid should be used instead\n */\n originalTransactionId?: string;\n quoteResponse: QuoteResponse & QuoteMetadata;\n startTime?: BridgeHistoryItem['startTime'];\n slippagePercentage: BridgeHistoryItem['slippagePercentage'];\n initialDestAssetBalance?: BridgeHistoryItem['initialDestAssetBalance'];\n targetContractAddress?: BridgeHistoryItem['targetContractAddress'];\n approvalTxId?: BridgeHistoryItem['approvalTxId'];\n isStxEnabled?: BridgeHistoryItem['isStxEnabled'];\n location?: BridgeHistoryItem['location'];\n // Legacy field for `ab_tests` metrics payload.\n abTests?: BridgeHistoryItem['abTests'];\n // New field for `active_ab_tests` metrics payload.\n activeAbTests?: BridgeHistoryItem['activeAbTests'];\n accountAddress: string;\n};\n\n/**\n * Chrome: The BigNumber values are automatically serialized to strings when sent to the background\n * Firefox: The BigNumber values are not serialized to strings when sent to the background,\n * so we force the ui to do it manually, by using StartPollingForBridgeTxStatusArgsSerialized type on the startPollingForBridgeTxStatus action\n */\nexport type StartPollingForBridgeTxStatusArgsSerialized = Omit<\n StartPollingForBridgeTxStatusArgs,\n 'quoteResponse'\n> & {\n quoteResponse: QuoteResponse & Partial<QuoteMetadata>;\n};\n\nexport type SourceChainTxMetaId = string;\n\nexport type BridgeStatusControllerState = {\n txHistory: Record<SourceChainTxMetaId, BridgeHistoryItem>;\n};\n\n// Actions\ntype BridgeStatusControllerAction<\n FunctionName extends keyof BridgeStatusController,\n> = {\n type: `${typeof BRIDGE_STATUS_CONTROLLER_NAME}:${FunctionName}`;\n handler: BridgeStatusController[FunctionName];\n};\n\nexport type BridgeStatusControllerGetStateAction = ControllerGetStateAction<\n typeof BRIDGE_STATUS_CONTROLLER_NAME,\n BridgeStatusControllerState\n>;\n\n// Maps to BridgeController function names\nexport type BridgeStatusControllerStartPollingForBridgeTxStatusAction =\n BridgeStatusControllerAction<'startPollingForBridgeTxStatus'>;\n\nexport type BridgeStatusControllerWipeBridgeStatusAction =\n BridgeStatusControllerAction<'wipeBridgeStatus'>;\n\nexport type BridgeStatusControllerResetStateAction =\n BridgeStatusControllerAction<'resetState'>;\n\nexport type BridgeStatusControllerSubmitTxAction =\n BridgeStatusControllerAction<'submitTx'>;\n\nexport type BridgeStatusControllerSubmitIntentAction =\n BridgeStatusControllerAction<'submitIntent'>;\n\nexport type BridgeStatusControllerRestartPollingForFailedAttemptsAction =\n BridgeStatusControllerAction<'restartPollingForFailedAttempts'>;\n\nexport type BridgeStatusControllerGetBridgeHistoryItemByTxMetaIdAction =\n BridgeStatusControllerAction<'getBridgeHistoryItemByTxMetaId'>;\n\nexport type BridgeStatusControllerActions =\n | BridgeStatusControllerStartPollingForBridgeTxStatusAction\n | BridgeStatusControllerWipeBridgeStatusAction\n | BridgeStatusControllerResetStateAction\n | BridgeStatusControllerGetStateAction\n | BridgeStatusControllerSubmitTxAction\n | BridgeStatusControllerSubmitIntentAction\n | BridgeStatusControllerRestartPollingForFailedAttemptsAction\n | BridgeStatusControllerGetBridgeHistoryItemByTxMetaIdAction;\n\n// Events\nexport type BridgeStatusControllerStateChangeEvent = ControllerStateChangeEvent<\n typeof BRIDGE_STATUS_CONTROLLER_NAME,\n BridgeStatusControllerState\n>;\n/**\n * This event is published when the destination bridge transaction is completed\n * The payload is the asset received on the destination chain\n */\nexport type BridgeStatusControllerDestinationTransactionCompletedEvent = {\n type: 'BridgeStatusController:destinationTransactionCompleted';\n payload: [CaipAssetType];\n};\n\nexport type BridgeStatusControllerEvents =\n | BridgeStatusControllerStateChangeEvent\n | BridgeStatusControllerDestinationTransactionCompletedEvent;\n\n/**\n * The external actions available to the BridgeStatusController.\n */\ntype AllowedActions =\n | NetworkControllerFindNetworkClientIdByChainIdAction\n | NetworkControllerGetStateAction\n | NetworkControllerGetNetworkClientByIdAction\n | SnapControllerHandleRequestAction\n | TransactionControllerGetStateAction\n | TransactionControllerUpdateTransactionAction\n | TransactionControllerAddTransactionAction\n | TransactionControllerEstimateGasFeeAction\n | TransactionControllerIsAtomicBatchSupportedAction\n | BridgeControllerAction<BridgeBackgroundAction.TRACK_METAMETRICS_EVENT>\n | BridgeControllerAction<BridgeBackgroundAction.STOP_POLLING_FOR_QUOTES>\n | GetGasFeeState\n | AccountsControllerGetAccountByAddressAction\n | AuthenticationControllerGetBearerTokenAction\n | KeyringControllerSignTypedMessageAction;\n\n/**\n * The external events available to the BridgeStatusController.\n */\ntype AllowedEvents =\n | TransactionControllerTransactionFailedEvent\n | TransactionControllerTransactionConfirmedEvent;\n\n/**\n * The messenger for the BridgeStatusController.\n */\nexport type BridgeStatusControllerMessenger = Messenger<\n typeof BRIDGE_STATUS_CONTROLLER_NAME,\n BridgeStatusControllerActions | AllowedActions,\n BridgeStatusControllerEvents | AllowedEvents\n>;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/bridge-status-controller",
3
- "version": "70.0.2",
3
+ "version": "70.0.3",
4
4
  "description": "Manages bridge-related status fetching functionality for MetaMask",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -47,16 +47,16 @@
47
47
  "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch"
48
48
  },
49
49
  "dependencies": {
50
- "@metamask/accounts-controller": "^37.1.0",
50
+ "@metamask/accounts-controller": "^37.1.1",
51
51
  "@metamask/base-controller": "^9.0.1",
52
- "@metamask/bridge-controller": "^69.2.2",
52
+ "@metamask/bridge-controller": "^69.2.3",
53
53
  "@metamask/controller-utils": "^11.19.0",
54
54
  "@metamask/gas-fee-controller": "^26.1.1",
55
55
  "@metamask/keyring-controller": "^25.1.1",
56
56
  "@metamask/network-controller": "^30.0.1",
57
57
  "@metamask/polling-controller": "^16.0.4",
58
- "@metamask/profile-sync-controller": "^28.0.1",
59
- "@metamask/snaps-controllers": "^17.2.0",
58
+ "@metamask/profile-sync-controller": "^28.0.2",
59
+ "@metamask/snaps-controllers": "^19.0.0",
60
60
  "@metamask/superstruct": "^3.1.0",
61
61
  "@metamask/transaction-controller": "^63.3.1",
62
62
  "@metamask/utils": "^11.9.0",