@metamask-previews/bridge-controller 75.1.1-preview-5e683f2 → 75.2.0-preview-be04faa3e

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 (48) hide show
  1. package/CHANGELOG.md +9 -1
  2. package/dist/bridge-controller-method-action-types.cjs.map +1 -1
  3. package/dist/bridge-controller-method-action-types.d.cts +9 -5
  4. package/dist/bridge-controller-method-action-types.d.cts.map +1 -1
  5. package/dist/bridge-controller-method-action-types.d.mts +9 -5
  6. package/dist/bridge-controller-method-action-types.d.mts.map +1 -1
  7. package/dist/bridge-controller-method-action-types.mjs.map +1 -1
  8. package/dist/bridge-controller.cjs +28 -0
  9. package/dist/bridge-controller.cjs.map +1 -1
  10. package/dist/bridge-controller.d.cts +2 -1
  11. package/dist/bridge-controller.d.cts.map +1 -1
  12. package/dist/bridge-controller.d.mts +2 -1
  13. package/dist/bridge-controller.d.mts.map +1 -1
  14. package/dist/bridge-controller.mjs +28 -0
  15. package/dist/bridge-controller.mjs.map +1 -1
  16. package/dist/constants/bridge.cjs +1 -0
  17. package/dist/constants/bridge.cjs.map +1 -1
  18. package/dist/constants/bridge.d.cts.map +1 -1
  19. package/dist/constants/bridge.d.mts.map +1 -1
  20. package/dist/constants/bridge.mjs +1 -0
  21. package/dist/constants/bridge.mjs.map +1 -1
  22. package/dist/index.cjs.map +1 -1
  23. package/dist/index.d.cts +3 -3
  24. package/dist/index.d.cts.map +1 -1
  25. package/dist/index.d.mts +3 -3
  26. package/dist/index.d.mts.map +1 -1
  27. package/dist/index.mjs.map +1 -1
  28. package/dist/types.cjs.map +1 -1
  29. package/dist/types.d.cts +7 -0
  30. package/dist/types.d.cts.map +1 -1
  31. package/dist/types.d.mts +7 -0
  32. package/dist/types.d.mts.map +1 -1
  33. package/dist/types.mjs.map +1 -1
  34. package/dist/utils/metrics/constants.cjs +1 -0
  35. package/dist/utils/metrics/constants.cjs.map +1 -1
  36. package/dist/utils/metrics/constants.d.cts +1 -0
  37. package/dist/utils/metrics/constants.d.cts.map +1 -1
  38. package/dist/utils/metrics/constants.d.mts +1 -0
  39. package/dist/utils/metrics/constants.d.mts.map +1 -1
  40. package/dist/utils/metrics/constants.mjs +1 -0
  41. package/dist/utils/metrics/constants.mjs.map +1 -1
  42. package/dist/utils/metrics/types.cjs.map +1 -1
  43. package/dist/utils/metrics/types.d.cts +19 -9
  44. package/dist/utils/metrics/types.d.cts.map +1 -1
  45. package/dist/utils/metrics/types.d.mts +19 -9
  46. package/dist/utils/metrics/types.d.mts.map +1 -1
  47. package/dist/utils/metrics/types.mjs.map +1 -1
  48. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"bridge.mjs","sourceRoot":"","sources":["../../src/constants/bridge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iCAAiC;AACvD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,8BAA8B;AAOrE,OAAO,EAAE,SAAS,EAAE,qBAAiB;AAErC,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,SAAS,CAAC,OAAO;IACjB,SAAS,CAAC,GAAG;IACb,SAAS,CAAC,OAAO;IACjB,SAAS,CAAC,UAAU;IACpB,SAAS,CAAC,SAAS;IACnB,SAAS,CAAC,QAAQ;IAClB,SAAS,CAAC,QAAQ;IAClB,SAAS,CAAC,aAAa;IACvB,SAAS,CAAC,IAAI;IACd,SAAS,CAAC,GAAG;IACb,SAAS,CAAC,KAAK;IACf,SAAS,CAAC,QAAQ;IAClB,SAAS,CAAC,OAAO;IACjB,SAAS,CAAC,GAAG;IACb,QAAQ,CAAC,OAAO;IAChB,QAAQ,CAAC,OAAO;IAChB,QAAQ,CAAC,OAAO;CACR,CAAC;AAIX,MAAM,CAAC,MAAM,uBAAuB,GAAG,uCAAuC,CAAC;AAC/E,MAAM,CAAC,MAAM,wBAAwB,GAAG,mCAAmC,CAAC;AAE5E,MAAM,CAAN,IAAY,cAGX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2BAA2B;CACjD,CAAC","sourcesContent":["import { AddressZero } from '@ethersproject/constants';\nimport { BtcScope, SolScope, TrxScope } from '@metamask/keyring-api';\nimport type { Hex } from '@metamask/utils';\n\nimport type {\n BridgeControllerState,\n FeatureFlagsPlatformConfig,\n} from '../types';\nimport { CHAIN_IDS } from './chains';\n\nexport const ALLOWED_BRIDGE_CHAIN_IDS = [\n CHAIN_IDS.MAINNET,\n CHAIN_IDS.BSC,\n CHAIN_IDS.POLYGON,\n CHAIN_IDS.ZKSYNC_ERA,\n CHAIN_IDS.AVALANCHE,\n CHAIN_IDS.OPTIMISM,\n CHAIN_IDS.ARBITRUM,\n CHAIN_IDS.LINEA_MAINNET,\n CHAIN_IDS.BASE,\n CHAIN_IDS.SEI,\n CHAIN_IDS.MONAD,\n CHAIN_IDS.HYPEREVM,\n CHAIN_IDS.MEGAETH,\n CHAIN_IDS.ARC,\n SolScope.Mainnet,\n BtcScope.Mainnet,\n TrxScope.Mainnet,\n] as const;\n\nexport type AllowedBridgeChainIds = (typeof ALLOWED_BRIDGE_CHAIN_IDS)[number];\n\nexport const BRIDGE_DEV_API_BASE_URL = 'https://bridge.dev-api.cx.metamask.io';\nexport const BRIDGE_PROD_API_BASE_URL = 'https://bridge.api.cx.metamask.io';\n\nexport enum BridgeClientId {\n EXTENSION = 'extension',\n MOBILE = 'mobile',\n}\n\nexport const ETH_USDT_ADDRESS = '0xdac17f958d2ee523a2206206994597c13d831ec7';\nexport const METABRIDGE_ETHEREUM_ADDRESS =\n '0x0439e60F02a8900a951603950d8D4527f400C3f1';\nexport const BRIDGE_QUOTE_MAX_ETA_SECONDS = 60 * 60; // 1 hour\nexport const BRIDGE_QUOTE_MAX_RETURN_DIFFERENCE_PERCENTAGE = 0.5; // if a quote returns in x times less return than the best quote, ignore it\n\nexport const BRIDGE_PREFERRED_GAS_ESTIMATE = 'medium';\nexport const BRIDGE_MM_FEE_RATE = 0.875;\nexport const REFRESH_INTERVAL_MS = 30 * 1000;\nexport const DEFAULT_MAX_REFRESH_COUNT = 5;\n\nexport const BRIDGE_CONTROLLER_NAME = 'BridgeController';\n\nexport const DEFAULT_CHAIN_RANKING = [\n { chainId: 'eip155:1', name: 'Ethereum' },\n { chainId: 'eip155:56', name: 'BNB' },\n { chainId: 'bip122:000000000019d6689c085ae165831e93', name: 'BTC' },\n { chainId: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', name: 'Solana' },\n { chainId: 'tron:728126428', name: 'Tron' },\n { chainId: 'eip155:8453', name: 'Base' },\n { chainId: 'eip155:42161', name: 'Arbitrum' },\n { chainId: 'eip155:59144', name: 'Linea' },\n { chainId: 'eip155:137', name: 'Polygon' },\n { chainId: 'eip155:43114', name: 'Avalanche' },\n { chainId: 'eip155:10', name: 'Optimism' },\n { chainId: 'eip155:143', name: 'Monad' },\n { chainId: 'eip155:1329', name: 'Sei' },\n { chainId: 'eip155:999', name: 'HyperEVM' },\n { chainId: 'eip155:4326', name: 'MegaETH' },\n { chainId: 'eip155:5042', name: 'Arc' },\n { chainId: 'eip155:324', name: 'zkSync' },\n] as const;\n\nexport const DEFAULT_FEATURE_FLAG_CONFIG: FeatureFlagsPlatformConfig = {\n minimumVersion: '0.0.0',\n refreshRate: REFRESH_INTERVAL_MS,\n maxRefreshCount: DEFAULT_MAX_REFRESH_COUNT,\n support: false,\n chains: {},\n chainRanking: [...DEFAULT_CHAIN_RANKING],\n};\n\nexport const DEFAULT_BRIDGE_CONTROLLER_STATE: BridgeControllerState = {\n quoteRequest: [\n {\n srcTokenAddress: AddressZero,\n },\n ],\n quotesInitialLoadTime: null,\n quotes: [],\n quotesLastFetched: null,\n quotesLoadingStatus: null,\n quoteFetchError: null,\n quotesRefreshCount: 0,\n assetExchangeRates: {},\n minimumBalanceForRentExemptionInLamports: '0',\n tokenWarnings: [],\n tokenSecurityTypeDestination: null,\n quoteStreamComplete: null,\n batchSellTrades: null,\n batchSellTradesLoadingStatus: null,\n};\n\nexport const METABRIDGE_CHAIN_TO_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AI,EAAE,SAAS,EAAE;IAC3C,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,KAAK,EAAE;IACvC,EAAE,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE;CACjC,CAAC;AAEX,MAAM,CAAC,MAAM,2BAA2B,GAA+B;IACrE,cAAc,EAAE,OAAO;IACvB,WAAW,EAAE,mBAAmB;IAChC,eAAe,EAAE,yBAAyB;IAC1C,OAAO,EAAE,KAAK;IACd,MAAM,EAAE,EAAE;IACV,YAAY,EAAE,CAAC,GAAG,qBAAqB,CAAC;CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAA0B;IACpE,YAAY,EAAE;QACZ;YACE,eAAe,EAAE,WAAW;SAC7B;KACF;IACD,qBAAqB,EAAE,IAAI;IAC3B,MAAM,EAAE,EAAE;IACV,iBAAiB,EAAE,IAAI;IACvB,mBAAmB,EAAE,IAAI;IACzB,eAAe,EAAE,IAAI;IACrB,kBAAkB,EAAE,CAAC;IACrB,kBAAkB,EAAE,EAAE;IACtB,wCAAwC,EAAE,GAAG;IAC7C,aAAa,EAAE,EAAE;IACjB,4BAA4B,EAAE,IAAI;IAClC,wBAAwB,EAAE,cAAc;IACxC,mBAAmB,EAAE,IAAI;IACzB,eAAe,EAAE,IAAI;IACrB,4BAA4B,EAAE,IAAI;CACnC,CAAC;AAEF,MAAM,CAAC,MAAM,+BAA+B,GAAwB;IAClE,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,2BAA2B;CACjD,CAAC","sourcesContent":["import { AddressZero } from '@ethersproject/constants';\nimport { BtcScope, SolScope, TrxScope } from '@metamask/keyring-api';\nimport type { Hex } from '@metamask/utils';\n\nimport type {\n BridgeControllerState,\n FeatureFlagsPlatformConfig,\n} from '../types';\nimport { CHAIN_IDS } from './chains';\n\nexport const ALLOWED_BRIDGE_CHAIN_IDS = [\n CHAIN_IDS.MAINNET,\n CHAIN_IDS.BSC,\n CHAIN_IDS.POLYGON,\n CHAIN_IDS.ZKSYNC_ERA,\n CHAIN_IDS.AVALANCHE,\n CHAIN_IDS.OPTIMISM,\n CHAIN_IDS.ARBITRUM,\n CHAIN_IDS.LINEA_MAINNET,\n CHAIN_IDS.BASE,\n CHAIN_IDS.SEI,\n CHAIN_IDS.MONAD,\n CHAIN_IDS.HYPEREVM,\n CHAIN_IDS.MEGAETH,\n CHAIN_IDS.ARC,\n SolScope.Mainnet,\n BtcScope.Mainnet,\n TrxScope.Mainnet,\n] as const;\n\nexport type AllowedBridgeChainIds = (typeof ALLOWED_BRIDGE_CHAIN_IDS)[number];\n\nexport const BRIDGE_DEV_API_BASE_URL = 'https://bridge.dev-api.cx.metamask.io';\nexport const BRIDGE_PROD_API_BASE_URL = 'https://bridge.api.cx.metamask.io';\n\nexport enum BridgeClientId {\n EXTENSION = 'extension',\n MOBILE = 'mobile',\n}\n\nexport const ETH_USDT_ADDRESS = '0xdac17f958d2ee523a2206206994597c13d831ec7';\nexport const METABRIDGE_ETHEREUM_ADDRESS =\n '0x0439e60F02a8900a951603950d8D4527f400C3f1';\nexport const BRIDGE_QUOTE_MAX_ETA_SECONDS = 60 * 60; // 1 hour\nexport const BRIDGE_QUOTE_MAX_RETURN_DIFFERENCE_PERCENTAGE = 0.5; // if a quote returns in x times less return than the best quote, ignore it\n\nexport const BRIDGE_PREFERRED_GAS_ESTIMATE = 'medium';\nexport const BRIDGE_MM_FEE_RATE = 0.875;\nexport const REFRESH_INTERVAL_MS = 30 * 1000;\nexport const DEFAULT_MAX_REFRESH_COUNT = 5;\n\nexport const BRIDGE_CONTROLLER_NAME = 'BridgeController';\n\nexport const DEFAULT_CHAIN_RANKING = [\n { chainId: 'eip155:1', name: 'Ethereum' },\n { chainId: 'eip155:56', name: 'BNB' },\n { chainId: 'bip122:000000000019d6689c085ae165831e93', name: 'BTC' },\n { chainId: 'solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp', name: 'Solana' },\n { chainId: 'tron:728126428', name: 'Tron' },\n { chainId: 'eip155:8453', name: 'Base' },\n { chainId: 'eip155:42161', name: 'Arbitrum' },\n { chainId: 'eip155:59144', name: 'Linea' },\n { chainId: 'eip155:137', name: 'Polygon' },\n { chainId: 'eip155:43114', name: 'Avalanche' },\n { chainId: 'eip155:10', name: 'Optimism' },\n { chainId: 'eip155:143', name: 'Monad' },\n { chainId: 'eip155:1329', name: 'Sei' },\n { chainId: 'eip155:999', name: 'HyperEVM' },\n { chainId: 'eip155:4326', name: 'MegaETH' },\n { chainId: 'eip155:5042', name: 'Arc' },\n { chainId: 'eip155:324', name: 'zkSync' },\n] as const;\n\nexport const DEFAULT_FEATURE_FLAG_CONFIG: FeatureFlagsPlatformConfig = {\n minimumVersion: '0.0.0',\n refreshRate: REFRESH_INTERVAL_MS,\n maxRefreshCount: DEFAULT_MAX_REFRESH_COUNT,\n support: false,\n chains: {},\n chainRanking: [...DEFAULT_CHAIN_RANKING],\n};\n\nexport const DEFAULT_BRIDGE_CONTROLLER_STATE: BridgeControllerState = {\n quoteRequest: [\n {\n srcTokenAddress: AddressZero,\n },\n ],\n quotesInitialLoadTime: null,\n quotes: [],\n quotesLastFetched: null,\n quotesLoadingStatus: null,\n quoteFetchError: null,\n quotesRefreshCount: 0,\n assetExchangeRates: {},\n minimumBalanceForRentExemptionInLamports: '0',\n tokenWarnings: [],\n tokenSecurityTypeDestination: null,\n inputPrimaryDenomination: 'token_amount',\n quoteStreamComplete: null,\n batchSellTrades: null,\n batchSellTradesLoadingStatus: null,\n};\n\nexport const METABRIDGE_CHAIN_TO_ADDRESS_MAP: Record<Hex, string> = {\n [CHAIN_IDS.MAINNET]: METABRIDGE_ETHEREUM_ADDRESS,\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,6DAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AAEzB,2DAMmC;AALjC,uHAAA,0BAA0B,OAAA;AAC1B,+HAAA,kCAAk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AAAlD,mHAAA,uBAAuB,OAAA;AAEhC,2CAKuB;AAJrB,oHAAA,2BAA2B,OAAA;AAC3B,gHAAA,uBAAuB,OAAA;AACvB,oGAAA,WAAW,OAAA","sourcesContent":["export { BridgeController } from './bridge-controller';\n\nexport {\n UnifiedSwapBridgeEventName,\n UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY,\n InputAmountPreset,\n MetaMetricsSwapsEventSource,\n PollingStatus,\n} from './utils/metrics/constants';\n\nexport type {\n AccountHardwareType,\n RequiredEventContextFromClient,\n CrossChainSwapsEventProperties,\n TradeData,\n RequestParams,\n RequestMetadata,\n TxStatusData,\n QuoteFetchData,\n QuoteWarning,\n} from './utils/metrics/types';\n\nexport {\n getAccountHardwareType,\n formatProviderLabel,\n getRequestParams,\n getSwapType,\n isHardwareWallet,\n isCustomSlippage,\n getQuotesReceivedProperties,\n} from './utils/metrics/properties';\n\nexport type {\n ChainConfiguration,\n L1GasFees,\n NonEvmFees,\n QuoteMetadata,\n GasMultiplierByChainId,\n FeatureFlagResponse,\n BridgeAsset,\n GenericQuoteRequest,\n Protocol,\n BatchSellTradesResponse,\n GaslessProperties,\n SimulatedGasFeeLimits,\n TokenAmountValues,\n Step,\n RefuelData,\n Quote,\n QuoteResponseV1 as QuoteResponse,\n FeeData,\n TxData,\n Intent,\n IntentOrderLike,\n BitcoinTradeData,\n TronTradeData,\n BridgeControllerState,\n BridgeControllerAction,\n BridgeControllerActions,\n BridgeControllerEvents,\n BridgeControllerMessenger,\n FeatureFlagsPlatformConfig,\n TxFeeGasLimits,\n} from './types';\n\nexport type {\n BridgeControllerUpdateBridgeQuoteRequestParamsAction,\n BridgeControllerFetchQuotesAction,\n BridgeControllerStopPollingForQuotesAction,\n BridgeControllerSetLocationAction,\n BridgeControllerResetStateAction,\n BridgeControllerSetChainIntervalLengthAction,\n BridgeControllerTrackUnifiedSwapBridgeEventAction,\n BridgeControllerUpdateBatchSellTradesAction,\n} from './bridge-controller-method-action-types';\n\nexport { AbortReason } from './utils/metrics/constants';\n\nexport { StatusTypes } from './types';\n\nexport {\n AssetType,\n SortOrder,\n ChainId,\n RequestStatus,\n FeatureId,\n type TokenFeature,\n type QuoteStreamCompleteData,\n type BridgeControllerGetStateAction,\n type BridgeControllerStateChangeEvent,\n} from './types';\n\nexport {\n FeeType,\n ActionTypes,\n BridgeAssetSchema,\n TokenFeatureType,\n validateQuoteStreamComplete,\n QuoteStreamCompleteReason,\n BatchSellTransactionType,\n} from './utils/validators';\n\nexport {\n ALLOWED_BRIDGE_CHAIN_IDS,\n BridgeClientId,\n BRIDGE_CONTROLLER_NAME,\n BRIDGE_QUOTE_MAX_ETA_SECONDS,\n BRIDGE_QUOTE_MAX_RETURN_DIFFERENCE_PERCENTAGE,\n BRIDGE_PREFERRED_GAS_ESTIMATE,\n BRIDGE_MM_FEE_RATE,\n REFRESH_INTERVAL_MS,\n DEFAULT_MAX_REFRESH_COUNT,\n DEFAULT_BRIDGE_CONTROLLER_STATE,\n METABRIDGE_CHAIN_TO_ADDRESS_MAP,\n BRIDGE_DEV_API_BASE_URL,\n BRIDGE_PROD_API_BASE_URL,\n} from './constants/bridge';\n\nexport type { AllowedBridgeChainIds } from './constants/bridge';\n\nexport {\n /**\n * @deprecated This type should not be used. Use {@link BridgeAsset} instead.\n */\n type SwapsTokenObject,\n /**\n * @deprecated This map should not be used. Use getNativeAssetForChainId\" } instead.\n */\n SWAPS_CHAINID_DEFAULT_TOKEN_MAP,\n} from './constants/tokens';\n\nexport {\n SWAPS_API_V2_BASE_URL,\n SWAPS_CONTRACT_ADDRESSES,\n SWAPS_WRAPPED_TOKENS_ADDRESSES,\n ALLOWED_CONTRACT_ADDRESSES,\n} from './constants/swaps';\n\nexport { MetricsActionType, MetricsSwapType } from './utils/metrics/constants';\n\nexport {\n isEthUsdt,\n isNativeAddress,\n isSolanaChainId,\n isBitcoinChainId,\n isTronChainId,\n isNonEvmChainId,\n getNativeAssetForChainId,\n getDefaultBridgeControllerState,\n isCrossChain,\n} from './utils/bridge';\n\nexport {\n isValidQuoteRequest,\n isValidBatchSellQuoteRequest,\n formatEtaInMinutes,\n calcSlippagePercentage,\n} from './utils/quote';\n\nexport { calcLatestSrcBalance } from './utils/balance';\n\nexport { fetchBridgeTokens, getClientHeaders } from './utils/fetch';\n\nexport {\n formatChainIdToCaip,\n formatChainIdToHex,\n formatAddressToCaipReference,\n formatAddressToAssetId,\n} from './utils/caip-formatters';\n\nexport {\n extractTradeData,\n isBitcoinTrade,\n isTronTrade,\n isEvmTxData,\n type Trade,\n} from './utils/trade-utils';\n\nexport {\n selectBridgeQuotes,\n selectBatchSellQuotes,\n selectBatchSellTrades,\n selectDefaultSlippagePercentage,\n type BridgeAppState,\n selectExchangeRateByAssetId,\n selectIsQuoteExpired,\n selectBridgeFeatureFlags,\n selectMinimumBalanceForRentExemptionInSOL,\n selectTokenWarnings,\n} from './selectors';\n\nexport { DEFAULT_FEATURE_FLAG_CONFIG } from './constants/bridge';\n\nexport { getBridgeFeatureFlags } from './utils/feature-flags';\n\nexport { BRIDGE_DEFAULT_SLIPPAGE } from './utils/slippage';\n\nexport {\n isValidSwapsContractAddress,\n getSwapsContractAddress,\n fetchTokens,\n type SwapsToken,\n} from './utils/swaps';\n"]}
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,6DAAuD;AAA9C,qHAAA,gBAAgB,OAAA;AAEzB,2DAMmC;AALjC,uHAAA,0BAA0B,OAAA;AAC1B,+HAAA,kCAAkC,OAAA;AAClC,8GAAA,iBAAiB,OAAA;AACjB,wHAAA,2BAA2B,OAAA;AAC3B,0GAAA,aAAa,OAAA;AAgBf,6DAQoC;AAPlC,oHAAA,sBAAsB,OAAA;AACtB,iHAAA,mBAAmB,OAAA;AACnB,8GAAA,gBAAgB,OAAA;AAChB,yGAAA,WAAW,OAAA;AACX,8GAAA,gBAAgB,OAAA;AAChB,8GAAA,gBAAgB,OAAA;AAChB,yHAAA,2BAA2B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;AACf,kHAAA,wBAAwB,OAAA;AACxB,yHAAA,+BAA+B,OAAA;AAC/B,sGAAA,YAAY,OAAA;AAGd,2CAKuB;AAJrB,4GAAA,mBAAmB,OAAA;AACnB,qHAAA,4BAA4B,OAAA;AAC5B,2GAAA,kBAAkB,OAAA;AAClB,+GAAA,sBAAsB,OAAA;AAGxB,+CAAuD;AAA9C,+GAAA,oBAAoB,OAAA;AAE7B,2CAAoE;AAA3D,0GAAA,iBAAiB,OAAA;AAAE,yGAAA,gBAAgB,OAAA;AAE5C,+DAKiC;AAJ/B,sHAAA,mBAAmB,OAAA;AACnB,qHAAA,kBAAkB,OAAA;AAClB,+HAAA,4BAA4B,OAAA;AAC5B,yHAAA,sBAAsB,OAAA;AAGxB,uDAM6B;AAL3B,+GAAA,gBAAgB,OAAA;AAChB,6GAAA,cAAc,OAAA;AACd,0GAAA,WAAW,OAAA;AACX,0GAAA,WAAW,OAAA;AAIb,6CAWqB;AAVnB,+GAAA,kBAAkB,OAAA;AAClB,kHAAA,qBAAqB,OAAA;AACrB,kHAAA,qBAAqB,OAAA;AACrB,4HAAA,+BAA+B,OAAA;AAE/B,wHAAA,2BAA2B,OAAA;AAC3B,iHAAA,oBAAoB,OAAA;AACpB,qHAAA,wBAAwB,OAAA;AACxB,sIAAA,yCAAyC,OAAA;AACzC,gHAAA,mBAAmB,OAAA;AAGrB,iDAAiE;AAAxD,qHAAA,2BAA2B,OAAA;AAEpC,2DAA8D;AAArD,sHAAA,qBAAqB,OAAA;AAE9B,iDAA2D;AAAlD,mHAAA,uBAAuB,OAAA;AAEhC,2CAKuB;AAJrB,oHAAA,2BAA2B,OAAA;AAC3B,gHAAA,uBAAuB,OAAA;AACvB,oGAAA,WAAW,OAAA","sourcesContent":["export { BridgeController } from './bridge-controller';\n\nexport {\n UnifiedSwapBridgeEventName,\n UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY,\n InputAmountPreset,\n MetaMetricsSwapsEventSource,\n PollingStatus,\n} from './utils/metrics/constants';\n\nexport type {\n AccountHardwareType,\n RequiredEventContextFromClient,\n CrossChainSwapsEventProperties,\n TradeData,\n RequestParams,\n RequestMetadata,\n TxStatusData,\n QuoteFetchData,\n QuoteWarning,\n InputPrimaryDenominationData,\n} from './utils/metrics/types';\n\nexport {\n getAccountHardwareType,\n formatProviderLabel,\n getRequestParams,\n getSwapType,\n isHardwareWallet,\n isCustomSlippage,\n getQuotesReceivedProperties,\n} from './utils/metrics/properties';\n\nexport type {\n ChainConfiguration,\n L1GasFees,\n NonEvmFees,\n QuoteMetadata,\n GasMultiplierByChainId,\n FeatureFlagResponse,\n BridgeAsset,\n GenericQuoteRequest,\n Protocol,\n BatchSellTradesResponse,\n GaslessProperties,\n SimulatedGasFeeLimits,\n TokenAmountValues,\n Step,\n RefuelData,\n Quote,\n QuoteResponseV1 as QuoteResponse,\n FeeData,\n TxData,\n Intent,\n IntentOrderLike,\n BitcoinTradeData,\n TronTradeData,\n BridgeControllerState,\n InputPrimaryDenomination,\n BridgeControllerAction,\n BridgeControllerActions,\n BridgeControllerEvents,\n BridgeControllerMessenger,\n FeatureFlagsPlatformConfig,\n TxFeeGasLimits,\n} from './types';\n\nexport type {\n BridgeControllerUpdateBridgeQuoteRequestParamsAction,\n BridgeControllerFetchQuotesAction,\n BridgeControllerStopPollingForQuotesAction,\n BridgeControllerSetLocationAction,\n BridgeControllerSetInputPrimaryDenominationAction,\n BridgeControllerResetStateAction,\n BridgeControllerSetChainIntervalLengthAction,\n BridgeControllerTrackUnifiedSwapBridgeEventAction,\n BridgeControllerUpdateBatchSellTradesAction,\n} from './bridge-controller-method-action-types';\n\nexport { AbortReason } from './utils/metrics/constants';\n\nexport { StatusTypes } from './types';\n\nexport {\n AssetType,\n SortOrder,\n ChainId,\n RequestStatus,\n FeatureId,\n type TokenFeature,\n type QuoteStreamCompleteData,\n type BridgeControllerGetStateAction,\n type BridgeControllerStateChangeEvent,\n} from './types';\n\nexport {\n FeeType,\n ActionTypes,\n BridgeAssetSchema,\n TokenFeatureType,\n validateQuoteStreamComplete,\n QuoteStreamCompleteReason,\n BatchSellTransactionType,\n} from './utils/validators';\n\nexport {\n ALLOWED_BRIDGE_CHAIN_IDS,\n BridgeClientId,\n BRIDGE_CONTROLLER_NAME,\n BRIDGE_QUOTE_MAX_ETA_SECONDS,\n BRIDGE_QUOTE_MAX_RETURN_DIFFERENCE_PERCENTAGE,\n BRIDGE_PREFERRED_GAS_ESTIMATE,\n BRIDGE_MM_FEE_RATE,\n REFRESH_INTERVAL_MS,\n DEFAULT_MAX_REFRESH_COUNT,\n DEFAULT_BRIDGE_CONTROLLER_STATE,\n METABRIDGE_CHAIN_TO_ADDRESS_MAP,\n BRIDGE_DEV_API_BASE_URL,\n BRIDGE_PROD_API_BASE_URL,\n} from './constants/bridge';\n\nexport type { AllowedBridgeChainIds } from './constants/bridge';\n\nexport {\n /**\n * @deprecated This type should not be used. Use {@link BridgeAsset} instead.\n */\n type SwapsTokenObject,\n /**\n * @deprecated This map should not be used. Use getNativeAssetForChainId\" } instead.\n */\n SWAPS_CHAINID_DEFAULT_TOKEN_MAP,\n} from './constants/tokens';\n\nexport {\n SWAPS_API_V2_BASE_URL,\n SWAPS_CONTRACT_ADDRESSES,\n SWAPS_WRAPPED_TOKENS_ADDRESSES,\n ALLOWED_CONTRACT_ADDRESSES,\n} from './constants/swaps';\n\nexport { MetricsActionType, MetricsSwapType } from './utils/metrics/constants';\n\nexport {\n isEthUsdt,\n isNativeAddress,\n isSolanaChainId,\n isBitcoinChainId,\n isTronChainId,\n isNonEvmChainId,\n getNativeAssetForChainId,\n getDefaultBridgeControllerState,\n isCrossChain,\n} from './utils/bridge';\n\nexport {\n isValidQuoteRequest,\n isValidBatchSellQuoteRequest,\n formatEtaInMinutes,\n calcSlippagePercentage,\n} from './utils/quote';\n\nexport { calcLatestSrcBalance } from './utils/balance';\n\nexport { fetchBridgeTokens, getClientHeaders } from './utils/fetch';\n\nexport {\n formatChainIdToCaip,\n formatChainIdToHex,\n formatAddressToCaipReference,\n formatAddressToAssetId,\n} from './utils/caip-formatters';\n\nexport {\n extractTradeData,\n isBitcoinTrade,\n isTronTrade,\n isEvmTxData,\n type Trade,\n} from './utils/trade-utils';\n\nexport {\n selectBridgeQuotes,\n selectBatchSellQuotes,\n selectBatchSellTrades,\n selectDefaultSlippagePercentage,\n type BridgeAppState,\n selectExchangeRateByAssetId,\n selectIsQuoteExpired,\n selectBridgeFeatureFlags,\n selectMinimumBalanceForRentExemptionInSOL,\n selectTokenWarnings,\n} from './selectors';\n\nexport { DEFAULT_FEATURE_FLAG_CONFIG } from './constants/bridge';\n\nexport { getBridgeFeatureFlags } from './utils/feature-flags';\n\nexport { BRIDGE_DEFAULT_SLIPPAGE } from './utils/slippage';\n\nexport {\n isValidSwapsContractAddress,\n getSwapsContractAddress,\n fetchTokens,\n type SwapsToken,\n} from './utils/swaps';\n"]}
package/dist/index.d.cts CHANGED
@@ -1,9 +1,9 @@
1
1
  export { BridgeController } from "./bridge-controller.cjs";
2
2
  export { UnifiedSwapBridgeEventName, UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY, InputAmountPreset, MetaMetricsSwapsEventSource, PollingStatus, } from "./utils/metrics/constants.cjs";
3
- export type { AccountHardwareType, RequiredEventContextFromClient, CrossChainSwapsEventProperties, TradeData, RequestParams, RequestMetadata, TxStatusData, QuoteFetchData, QuoteWarning, } from "./utils/metrics/types.cjs";
3
+ export type { AccountHardwareType, RequiredEventContextFromClient, CrossChainSwapsEventProperties, TradeData, RequestParams, RequestMetadata, TxStatusData, QuoteFetchData, QuoteWarning, InputPrimaryDenominationData, } from "./utils/metrics/types.cjs";
4
4
  export { getAccountHardwareType, formatProviderLabel, getRequestParams, getSwapType, isHardwareWallet, isCustomSlippage, getQuotesReceivedProperties, } from "./utils/metrics/properties.cjs";
5
- export type { ChainConfiguration, L1GasFees, NonEvmFees, QuoteMetadata, GasMultiplierByChainId, FeatureFlagResponse, BridgeAsset, GenericQuoteRequest, Protocol, BatchSellTradesResponse, GaslessProperties, SimulatedGasFeeLimits, TokenAmountValues, Step, RefuelData, Quote, QuoteResponseV1 as QuoteResponse, FeeData, TxData, Intent, IntentOrderLike, BitcoinTradeData, TronTradeData, BridgeControllerState, BridgeControllerAction, BridgeControllerActions, BridgeControllerEvents, BridgeControllerMessenger, FeatureFlagsPlatformConfig, TxFeeGasLimits, } from "./types.cjs";
6
- export type { BridgeControllerUpdateBridgeQuoteRequestParamsAction, BridgeControllerFetchQuotesAction, BridgeControllerStopPollingForQuotesAction, BridgeControllerSetLocationAction, BridgeControllerResetStateAction, BridgeControllerSetChainIntervalLengthAction, BridgeControllerTrackUnifiedSwapBridgeEventAction, BridgeControllerUpdateBatchSellTradesAction, } from "./bridge-controller-method-action-types.cjs";
5
+ export type { ChainConfiguration, L1GasFees, NonEvmFees, QuoteMetadata, GasMultiplierByChainId, FeatureFlagResponse, BridgeAsset, GenericQuoteRequest, Protocol, BatchSellTradesResponse, GaslessProperties, SimulatedGasFeeLimits, TokenAmountValues, Step, RefuelData, Quote, QuoteResponseV1 as QuoteResponse, FeeData, TxData, Intent, IntentOrderLike, BitcoinTradeData, TronTradeData, BridgeControllerState, InputPrimaryDenomination, BridgeControllerAction, BridgeControllerActions, BridgeControllerEvents, BridgeControllerMessenger, FeatureFlagsPlatformConfig, TxFeeGasLimits, } from "./types.cjs";
6
+ export type { BridgeControllerUpdateBridgeQuoteRequestParamsAction, BridgeControllerFetchQuotesAction, BridgeControllerStopPollingForQuotesAction, BridgeControllerSetLocationAction, BridgeControllerSetInputPrimaryDenominationAction, BridgeControllerResetStateAction, BridgeControllerSetChainIntervalLengthAction, BridgeControllerTrackUnifiedSwapBridgeEventAction, BridgeControllerUpdateBatchSellTradesAction, } from "./bridge-controller-method-action-types.cjs";
7
7
  export { AbortReason } from "./utils/metrics/constants.cjs";
8
8
  export { StatusTypes } from "./types.cjs";
9
9
  export { AssetType, SortOrder, ChainId, RequestStatus, FeatureId, type TokenFeature, type QuoteStreamCompleteData, type BridgeControllerGetStateAction, type BridgeControllerStateChangeEvent, } from "./types.cjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,gCAA4B;AAEvD,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,iBAAiB,EACjB,2BAA2B,EAC3B,aAAa,GACd,sCAAkC;AAEnC,YAAY,EACV,mBAAmB,EACnB,8BAA8B,EAC9B,8BAA8B,EAC9B,SAAS,EACT,aAAa,EACb,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,GACb,kCAA8B;AAE/B,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,2BAA2B,GAC5B,uCAAmC;AAEpC,YAAY,EACV,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,IAAI,EACJ,UAAU,EACV,KAAK,EACL,eAAe,IAAI,aAAa,EAChC,OAAO,EACP,MAAM,EACN,MAAM,EACN,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC1B,cAAc,GACf,oBAAgB;AAEjB,YAAY,EACV,oDAAoD,EACpD,iCAAiC,EACjC,0CAA0C,EAC1C,iCAAiC,EACjC,gCAAgC,EAChC,4CAA4C,EAC5C,iDAAiD,EACjD,2CAA2C,GAC5C,oDAAgD;AAEjD,OAAO,EAAE,WAAW,EAAE,sCAAkC;AAExD,OAAO,EAAE,WAAW,EAAE,oBAAgB;AAEtC,OAAO,EACL,SAAS,EACT,SAAS,EACT,OAAO,EACP,aAAa,EAC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ClB,qBAAqB,EACrB,qBAAqB,EACrB,+BAA+B,EAC/B,KAAK,cAAc,EACnB,2BAA2B,EAC3B,oBAAoB,EACpB,wBAAwB,EACxB,yCAAyC,EACzC,mBAAmB,GACpB,wBAAoB;AAErB,OAAO,EAAE,2BAA2B,EAAE,+BAA2B;AAEjE,OAAO,EAAE,qBAAqB,EAAE,kCAA8B;AAE9D,OAAO,EAAE,uBAAuB,EAAE,6BAAyB;AAE3D,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,WAAW,EACX,KAAK,UAAU,GAChB,0BAAsB"}
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,gCAA4B;AAEvD,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,iBAAiB,EACjB,2BAA2B,EAC3B,aAAa,GACd,sCAAkC;AAEnC,YAAY,EACV,mBAAmB,EACnB,8BAA8B,EAC9B,8BAA8B,EAC9B,SAAS,EACT,aAAa,EACb,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,4BAA4B,GAC7B,kCAA8B;AAE/B,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,2BAA2B,GAC5B,uCAAmC;AAEpC,YAAY,EACV,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,IAAI,EACJ,UAAU,EACV,KAAK,EACL,eAAe,IAAI,aAAa,EAChC,OAAO,EACP,MAAM,EACN,MAAM,EACN,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,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AC5B,kBAAkB,EAClB,sBAAsB,GACvB,0BAAsB;AAEvB,OAAO,EAAE,oBAAoB,EAAE,4BAAwB;AAEvD,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,0BAAsB;AAEpE,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,4BAA4B,EAC5B,sBAAsB,GACvB,oCAAgC;AAEjC,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,WAAW,EACX,KAAK,KAAK,GACX,gCAA4B;AAE7B,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,+BAA+B,EAC/B,KAAK,cAAc,EACnB,2BAA2B,EAC3B,oBAAoB,EACpB,wBAAwB,EACxB,yCAAyC,EACzC,mBAAmB,GACpB,wBAAoB;AAErB,OAAO,EAAE,2BAA2B,EAAE,+BAA2B;AAEjE,OAAO,EAAE,qBAAqB,EAAE,kCAA8B;AAE9D,OAAO,EAAE,uBAAuB,EAAE,6BAAyB;AAE3D,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,WAAW,EACX,KAAK,UAAU,GAChB,0BAAsB"}
package/dist/index.d.mts CHANGED
@@ -1,9 +1,9 @@
1
1
  export { BridgeController } from "./bridge-controller.mjs";
2
2
  export { UnifiedSwapBridgeEventName, UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY, InputAmountPreset, MetaMetricsSwapsEventSource, PollingStatus, } from "./utils/metrics/constants.mjs";
3
- export type { AccountHardwareType, RequiredEventContextFromClient, CrossChainSwapsEventProperties, TradeData, RequestParams, RequestMetadata, TxStatusData, QuoteFetchData, QuoteWarning, } from "./utils/metrics/types.mjs";
3
+ export type { AccountHardwareType, RequiredEventContextFromClient, CrossChainSwapsEventProperties, TradeData, RequestParams, RequestMetadata, TxStatusData, QuoteFetchData, QuoteWarning, InputPrimaryDenominationData, } from "./utils/metrics/types.mjs";
4
4
  export { getAccountHardwareType, formatProviderLabel, getRequestParams, getSwapType, isHardwareWallet, isCustomSlippage, getQuotesReceivedProperties, } from "./utils/metrics/properties.mjs";
5
- export type { ChainConfiguration, L1GasFees, NonEvmFees, QuoteMetadata, GasMultiplierByChainId, FeatureFlagResponse, BridgeAsset, GenericQuoteRequest, Protocol, BatchSellTradesResponse, GaslessProperties, SimulatedGasFeeLimits, TokenAmountValues, Step, RefuelData, Quote, QuoteResponseV1 as QuoteResponse, FeeData, TxData, Intent, IntentOrderLike, BitcoinTradeData, TronTradeData, BridgeControllerState, BridgeControllerAction, BridgeControllerActions, BridgeControllerEvents, BridgeControllerMessenger, FeatureFlagsPlatformConfig, TxFeeGasLimits, } from "./types.mjs";
6
- export type { BridgeControllerUpdateBridgeQuoteRequestParamsAction, BridgeControllerFetchQuotesAction, BridgeControllerStopPollingForQuotesAction, BridgeControllerSetLocationAction, BridgeControllerResetStateAction, BridgeControllerSetChainIntervalLengthAction, BridgeControllerTrackUnifiedSwapBridgeEventAction, BridgeControllerUpdateBatchSellTradesAction, } from "./bridge-controller-method-action-types.mjs";
5
+ export type { ChainConfiguration, L1GasFees, NonEvmFees, QuoteMetadata, GasMultiplierByChainId, FeatureFlagResponse, BridgeAsset, GenericQuoteRequest, Protocol, BatchSellTradesResponse, GaslessProperties, SimulatedGasFeeLimits, TokenAmountValues, Step, RefuelData, Quote, QuoteResponseV1 as QuoteResponse, FeeData, TxData, Intent, IntentOrderLike, BitcoinTradeData, TronTradeData, BridgeControllerState, InputPrimaryDenomination, BridgeControllerAction, BridgeControllerActions, BridgeControllerEvents, BridgeControllerMessenger, FeatureFlagsPlatformConfig, TxFeeGasLimits, } from "./types.mjs";
6
+ export type { BridgeControllerUpdateBridgeQuoteRequestParamsAction, BridgeControllerFetchQuotesAction, BridgeControllerStopPollingForQuotesAction, BridgeControllerSetLocationAction, BridgeControllerSetInputPrimaryDenominationAction, BridgeControllerResetStateAction, BridgeControllerSetChainIntervalLengthAction, BridgeControllerTrackUnifiedSwapBridgeEventAction, BridgeControllerUpdateBatchSellTradesAction, } from "./bridge-controller-method-action-types.mjs";
7
7
  export { AbortReason } from "./utils/metrics/constants.mjs";
8
8
  export { StatusTypes } from "./types.mjs";
9
9
  export { AssetType, SortOrder, ChainId, RequestStatus, FeatureId, type TokenFeature, type QuoteStreamCompleteData, type BridgeControllerGetStateAction, type BridgeControllerStateChangeEvent, } from "./types.mjs";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,gCAA4B;AAEvD,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,iBAAiB,EACjB,2BAA2B,EAC3B,aAAa,GACd,sCAAkC;AAEnC,YAAY,EACV,mBAAmB,EACnB,8BAA8B,EAC9B,8BAA8B,EAC9B,SAAS,EACT,aAAa,EACb,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,GACb,kCAA8B;AAE/B,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,2BAA2B,GAC5B,uCAAmC;AAEpC,YAAY,EACV,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,IAAI,EACJ,UAAU,EACV,KAAK,EACL,eAAe,IAAI,aAAa,EAChC,OAAO,EACP,MAAM,EACN,MAAM,EACN,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,0BAA0B,EAC1B,cAAc,GACf,oBAAgB;AAEjB,YAAY,EACV,oDAAoD,EACpD,iCAAiC,EACjC,0CAA0C,EAC1C,iCAAiC,EACjC,gCAAgC,EAChC,4CAA4C,EAC5C,iDAAiD,EACjD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AClB,4BAA4B,EAC5B,sBAAsB,GACvB,oCAAgC;AAEjC,OAAO,EACL,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,WAAW,EACX,KAAK,KAAK,GACX,gCAA4B;AAE7B,OAAO,EACL,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,+BAA+B,EAC/B,KAAK,cAAc,EACnB,2BAA2B,EAC3B,oBAAoB,EACpB,wBAAwB,EACxB,yCAAyC,EACzC,mBAAmB,GACpB,wBAAoB;AAErB,OAAO,EAAE,2BAA2B,EAAE,+BAA2B;AAEjE,OAAO,EAAE,qBAAqB,EAAE,kCAA8B;AAE9D,OAAO,EAAE,uBAAuB,EAAE,6BAAyB;AAE3D,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,WAAW,EACX,KAAK,UAAU,GAChB,0BAAsB"}
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,gCAA4B;AAEvD,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,iBAAiB,EACjB,2BAA2B,EAC3B,aAAa,GACd,sCAAkC;AAEnC,YAAY,EACV,mBAAmB,EACnB,8BAA8B,EAC9B,8BAA8B,EAC9B,SAAS,EACT,aAAa,EACb,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,4BAA4B,GAC7B,kCAA8B;AAE/B,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,2BAA2B,GAC5B,uCAAmC;AAEpC,YAAY,EACV,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,uBAAuB,EACvB,iBAAiB,EACjB,qBAAqB,EACrB,iBAAiB,EACjB,IAAI,EACJ,UAAU,EACV,KAAK,EACL,eA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AA2B,EAC3B,oBAAoB,EACpB,wBAAwB,EACxB,yCAAyC,EACzC,mBAAmB,EACpB,wBAAoB;AAErB,OAAO,EAAE,2BAA2B,EAAE,+BAA2B;AAEjE,OAAO,EAAE,qBAAqB,EAAE,kCAA8B;AAE9D,OAAO,EAAE,uBAAuB,EAAE,6BAAyB;AAE3D,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,WAAW,EAEZ,0BAAsB","sourcesContent":["export { BridgeController } from './bridge-controller';\n\nexport {\n UnifiedSwapBridgeEventName,\n UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY,\n InputAmountPreset,\n MetaMetricsSwapsEventSource,\n PollingStatus,\n} from './utils/metrics/constants';\n\nexport type {\n AccountHardwareType,\n RequiredEventContextFromClient,\n CrossChainSwapsEventProperties,\n TradeData,\n RequestParams,\n RequestMetadata,\n TxStatusData,\n QuoteFetchData,\n QuoteWarning,\n} from './utils/metrics/types';\n\nexport {\n getAccountHardwareType,\n formatProviderLabel,\n getRequestParams,\n getSwapType,\n isHardwareWallet,\n isCustomSlippage,\n getQuotesReceivedProperties,\n} from './utils/metrics/properties';\n\nexport type {\n ChainConfiguration,\n L1GasFees,\n NonEvmFees,\n QuoteMetadata,\n GasMultiplierByChainId,\n FeatureFlagResponse,\n BridgeAsset,\n GenericQuoteRequest,\n Protocol,\n BatchSellTradesResponse,\n GaslessProperties,\n SimulatedGasFeeLimits,\n TokenAmountValues,\n Step,\n RefuelData,\n Quote,\n QuoteResponseV1 as QuoteResponse,\n FeeData,\n TxData,\n Intent,\n IntentOrderLike,\n BitcoinTradeData,\n TronTradeData,\n BridgeControllerState,\n BridgeControllerAction,\n BridgeControllerActions,\n BridgeControllerEvents,\n BridgeControllerMessenger,\n FeatureFlagsPlatformConfig,\n TxFeeGasLimits,\n} from './types';\n\nexport type {\n BridgeControllerUpdateBridgeQuoteRequestParamsAction,\n BridgeControllerFetchQuotesAction,\n BridgeControllerStopPollingForQuotesAction,\n BridgeControllerSetLocationAction,\n BridgeControllerResetStateAction,\n BridgeControllerSetChainIntervalLengthAction,\n BridgeControllerTrackUnifiedSwapBridgeEventAction,\n BridgeControllerUpdateBatchSellTradesAction,\n} from './bridge-controller-method-action-types';\n\nexport { AbortReason } from './utils/metrics/constants';\n\nexport { StatusTypes } from './types';\n\nexport {\n AssetType,\n SortOrder,\n ChainId,\n RequestStatus,\n FeatureId,\n type TokenFeature,\n type QuoteStreamCompleteData,\n type BridgeControllerGetStateAction,\n type BridgeControllerStateChangeEvent,\n} from './types';\n\nexport {\n FeeType,\n ActionTypes,\n BridgeAssetSchema,\n TokenFeatureType,\n validateQuoteStreamComplete,\n QuoteStreamCompleteReason,\n BatchSellTransactionType,\n} from './utils/validators';\n\nexport {\n ALLOWED_BRIDGE_CHAIN_IDS,\n BridgeClientId,\n BRIDGE_CONTROLLER_NAME,\n BRIDGE_QUOTE_MAX_ETA_SECONDS,\n BRIDGE_QUOTE_MAX_RETURN_DIFFERENCE_PERCENTAGE,\n BRIDGE_PREFERRED_GAS_ESTIMATE,\n BRIDGE_MM_FEE_RATE,\n REFRESH_INTERVAL_MS,\n DEFAULT_MAX_REFRESH_COUNT,\n DEFAULT_BRIDGE_CONTROLLER_STATE,\n METABRIDGE_CHAIN_TO_ADDRESS_MAP,\n BRIDGE_DEV_API_BASE_URL,\n BRIDGE_PROD_API_BASE_URL,\n} from './constants/bridge';\n\nexport type { AllowedBridgeChainIds } from './constants/bridge';\n\nexport {\n /**\n * @deprecated This type should not be used. Use {@link BridgeAsset} instead.\n */\n type SwapsTokenObject,\n /**\n * @deprecated This map should not be used. Use getNativeAssetForChainId\" } instead.\n */\n SWAPS_CHAINID_DEFAULT_TOKEN_MAP,\n} from './constants/tokens';\n\nexport {\n SWAPS_API_V2_BASE_URL,\n SWAPS_CONTRACT_ADDRESSES,\n SWAPS_WRAPPED_TOKENS_ADDRESSES,\n ALLOWED_CONTRACT_ADDRESSES,\n} from './constants/swaps';\n\nexport { MetricsActionType, MetricsSwapType } from './utils/metrics/constants';\n\nexport {\n isEthUsdt,\n isNativeAddress,\n isSolanaChainId,\n isBitcoinChainId,\n isTronChainId,\n isNonEvmChainId,\n getNativeAssetForChainId,\n getDefaultBridgeControllerState,\n isCrossChain,\n} from './utils/bridge';\n\nexport {\n isValidQuoteRequest,\n isValidBatchSellQuoteRequest,\n formatEtaInMinutes,\n calcSlippagePercentage,\n} from './utils/quote';\n\nexport { calcLatestSrcBalance } from './utils/balance';\n\nexport { fetchBridgeTokens, getClientHeaders } from './utils/fetch';\n\nexport {\n formatChainIdToCaip,\n formatChainIdToHex,\n formatAddressToCaipReference,\n formatAddressToAssetId,\n} from './utils/caip-formatters';\n\nexport {\n extractTradeData,\n isBitcoinTrade,\n isTronTrade,\n isEvmTxData,\n type Trade,\n} from './utils/trade-utils';\n\nexport {\n selectBridgeQuotes,\n selectBatchSellQuotes,\n selectBatchSellTrades,\n selectDefaultSlippagePercentage,\n type BridgeAppState,\n selectExchangeRateByAssetId,\n selectIsQuoteExpired,\n selectBridgeFeatureFlags,\n selectMinimumBalanceForRentExemptionInSOL,\n selectTokenWarnings,\n} from './selectors';\n\nexport { DEFAULT_FEATURE_FLAG_CONFIG } from './constants/bridge';\n\nexport { getBridgeFeatureFlags } from './utils/feature-flags';\n\nexport { BRIDGE_DEFAULT_SLIPPAGE } from './utils/slippage';\n\nexport {\n isValidSwapsContractAddress,\n getSwapsContractAddress,\n fetchTokens,\n type SwapsToken,\n} from './utils/swaps';\n"]}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,gCAA4B;AAEvD,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,iBAAiB,EACjB,2BAA2B,EAC3B,aAAa,EACd,sCAAkC;AAenC,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,2BAA2B,EAC5B,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AAqB,EACrB,+BAA+B,EAE/B,2BAA2B,EAC3B,oBAAoB,EACpB,wBAAwB,EACxB,yCAAyC,EACzC,mBAAmB,EACpB,wBAAoB;AAErB,OAAO,EAAE,2BAA2B,EAAE,+BAA2B;AAEjE,OAAO,EAAE,qBAAqB,EAAE,kCAA8B;AAE9D,OAAO,EAAE,uBAAuB,EAAE,6BAAyB;AAE3D,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EACvB,WAAW,EAEZ,0BAAsB","sourcesContent":["export { BridgeController } from './bridge-controller';\n\nexport {\n UnifiedSwapBridgeEventName,\n UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY,\n InputAmountPreset,\n MetaMetricsSwapsEventSource,\n PollingStatus,\n} from './utils/metrics/constants';\n\nexport type {\n AccountHardwareType,\n RequiredEventContextFromClient,\n CrossChainSwapsEventProperties,\n TradeData,\n RequestParams,\n RequestMetadata,\n TxStatusData,\n QuoteFetchData,\n QuoteWarning,\n InputPrimaryDenominationData,\n} from './utils/metrics/types';\n\nexport {\n getAccountHardwareType,\n formatProviderLabel,\n getRequestParams,\n getSwapType,\n isHardwareWallet,\n isCustomSlippage,\n getQuotesReceivedProperties,\n} from './utils/metrics/properties';\n\nexport type {\n ChainConfiguration,\n L1GasFees,\n NonEvmFees,\n QuoteMetadata,\n GasMultiplierByChainId,\n FeatureFlagResponse,\n BridgeAsset,\n GenericQuoteRequest,\n Protocol,\n BatchSellTradesResponse,\n GaslessProperties,\n SimulatedGasFeeLimits,\n TokenAmountValues,\n Step,\n RefuelData,\n Quote,\n QuoteResponseV1 as QuoteResponse,\n FeeData,\n TxData,\n Intent,\n IntentOrderLike,\n BitcoinTradeData,\n TronTradeData,\n BridgeControllerState,\n InputPrimaryDenomination,\n BridgeControllerAction,\n BridgeControllerActions,\n BridgeControllerEvents,\n BridgeControllerMessenger,\n FeatureFlagsPlatformConfig,\n TxFeeGasLimits,\n} from './types';\n\nexport type {\n BridgeControllerUpdateBridgeQuoteRequestParamsAction,\n BridgeControllerFetchQuotesAction,\n BridgeControllerStopPollingForQuotesAction,\n BridgeControllerSetLocationAction,\n BridgeControllerSetInputPrimaryDenominationAction,\n BridgeControllerResetStateAction,\n BridgeControllerSetChainIntervalLengthAction,\n BridgeControllerTrackUnifiedSwapBridgeEventAction,\n BridgeControllerUpdateBatchSellTradesAction,\n} from './bridge-controller-method-action-types';\n\nexport { AbortReason } from './utils/metrics/constants';\n\nexport { StatusTypes } from './types';\n\nexport {\n AssetType,\n SortOrder,\n ChainId,\n RequestStatus,\n FeatureId,\n type TokenFeature,\n type QuoteStreamCompleteData,\n type BridgeControllerGetStateAction,\n type BridgeControllerStateChangeEvent,\n} from './types';\n\nexport {\n FeeType,\n ActionTypes,\n BridgeAssetSchema,\n TokenFeatureType,\n validateQuoteStreamComplete,\n QuoteStreamCompleteReason,\n BatchSellTransactionType,\n} from './utils/validators';\n\nexport {\n ALLOWED_BRIDGE_CHAIN_IDS,\n BridgeClientId,\n BRIDGE_CONTROLLER_NAME,\n BRIDGE_QUOTE_MAX_ETA_SECONDS,\n BRIDGE_QUOTE_MAX_RETURN_DIFFERENCE_PERCENTAGE,\n BRIDGE_PREFERRED_GAS_ESTIMATE,\n BRIDGE_MM_FEE_RATE,\n REFRESH_INTERVAL_MS,\n DEFAULT_MAX_REFRESH_COUNT,\n DEFAULT_BRIDGE_CONTROLLER_STATE,\n METABRIDGE_CHAIN_TO_ADDRESS_MAP,\n BRIDGE_DEV_API_BASE_URL,\n BRIDGE_PROD_API_BASE_URL,\n} from './constants/bridge';\n\nexport type { AllowedBridgeChainIds } from './constants/bridge';\n\nexport {\n /**\n * @deprecated This type should not be used. Use {@link BridgeAsset} instead.\n */\n type SwapsTokenObject,\n /**\n * @deprecated This map should not be used. Use getNativeAssetForChainId\" } instead.\n */\n SWAPS_CHAINID_DEFAULT_TOKEN_MAP,\n} from './constants/tokens';\n\nexport {\n SWAPS_API_V2_BASE_URL,\n SWAPS_CONTRACT_ADDRESSES,\n SWAPS_WRAPPED_TOKENS_ADDRESSES,\n ALLOWED_CONTRACT_ADDRESSES,\n} from './constants/swaps';\n\nexport { MetricsActionType, MetricsSwapType } from './utils/metrics/constants';\n\nexport {\n isEthUsdt,\n isNativeAddress,\n isSolanaChainId,\n isBitcoinChainId,\n isTronChainId,\n isNonEvmChainId,\n getNativeAssetForChainId,\n getDefaultBridgeControllerState,\n isCrossChain,\n} from './utils/bridge';\n\nexport {\n isValidQuoteRequest,\n isValidBatchSellQuoteRequest,\n formatEtaInMinutes,\n calcSlippagePercentage,\n} from './utils/quote';\n\nexport { calcLatestSrcBalance } from './utils/balance';\n\nexport { fetchBridgeTokens, getClientHeaders } from './utils/fetch';\n\nexport {\n formatChainIdToCaip,\n formatChainIdToHex,\n formatAddressToCaipReference,\n formatAddressToAssetId,\n} from './utils/caip-formatters';\n\nexport {\n extractTradeData,\n isBitcoinTrade,\n isTronTrade,\n isEvmTxData,\n type Trade,\n} from './utils/trade-utils';\n\nexport {\n selectBridgeQuotes,\n selectBatchSellQuotes,\n selectBatchSellTrades,\n selectDefaultSlippagePercentage,\n type BridgeAppState,\n selectExchangeRateByAssetId,\n selectIsQuoteExpired,\n selectBridgeFeatureFlags,\n selectMinimumBalanceForRentExemptionInSOL,\n selectTokenWarnings,\n} from './selectors';\n\nexport { DEFAULT_FEATURE_FLAG_CONFIG } from './constants/bridge';\n\nexport { getBridgeFeatureFlags } from './utils/feature-flags';\n\nexport { BRIDGE_DEFAULT_SLIPPAGE } from './utils/slippage';\n\nexport {\n isValidSwapsContractAddress,\n getSwapsContractAddress,\n fetchTokens,\n type SwapsToken,\n} from './utils/swaps';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AA4DA;;GAEG;AACH,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,4DAA4D;IAC5D,8BAAiB,CAAA;IACjB,qBAAqB;IACrB,4BAAe,CAAA;IACf,kCAAkC;IAClC,wBAAW,CAAA;IACX;;;OAGG;IACH,gCAAmB,CAAA;AACrB,CAAC,EAZW,SAAS,yBAAT,SAAS,QAYpB;AAkGD;;GAEG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,wCAA2B,CAAA;AAC7B,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAyED,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,sCAAuB,CAAA;IACvB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;AACvB,CAAC,EANW,WAAW,2BAAX,WAAW,QAMtB;AAED,IAAY,SAQX;AARD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,4BAAe,CAAA;IACf,kEAAqD,CAAA;IACrD,gEAAmD,CAAA;IACnD,oCAAuB,CAAA;IACvB,sCAAyB,CAAA;IACzB,wDAA2C,CAAA;AAC7C,CAAC,EARW,SAAS,yBAAT,SAAS,QAQpB;AAsFD,IAAY,OAkBX;AAlBD,WAAY,OAAO;IACjB,mCAAO,CAAA;IACP,8CAAa,CAAA;IACb,oCAAQ,CAAA;IACR,6CAAa,CAAA;IACb,2CAAY,CAAA;IACZ,wCAAW,CAAA;IACX,iDAAgB,CAAA;IAChB,mDAAiB,CAAA;IACjB,2CAAa,CAAA;IACb,wDAAyB,CAAA;IACzB,gDAAoB,CAAA;IACpB,6CAAgB,CAAA;IAChB,sCAAU,CAAA;IACV,yCAAW,CAAA;IACX,+CAAc,CAAA;IACd,8CAAc,CAAA;IACd,sCAAU,CAAA;AACZ,CAAC,EAlBW,OAAO,uBAAP,OAAO,QAkBlB;AAQD,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,uDAAW,CAAA;IACX,uDAAW,CAAA;IACX,mDAAS,CAAA;AACX,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport type { AccountsControllerGetAccountByAddressAction } from '@metamask/accounts-controller';\nimport type { AssetsControllerGetExchangeRatesForBridgeAction } from '@metamask/assets-controller';\nimport type {\n CurrencyRateControllerGetStateAction,\n MultichainAssetsRatesControllerGetStateAction,\n TokenRatesControllerGetStateAction,\n} from '@metamask/assets-controllers';\nimport type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n} from '@metamask/base-controller';\nimport type { Messenger } from '@metamask/messenger';\nimport type {\n NetworkControllerFindNetworkClientIdByChainIdAction,\n NetworkControllerGetNetworkClientByIdAction,\n} from '@metamask/network-controller';\nimport type { AuthenticationControllerGetBearerTokenAction } from '@metamask/profile-sync-controller/auth';\nimport type { RemoteFeatureFlagControllerGetStateAction } from '@metamask/remote-feature-flag-controller';\nimport type { SnapControllerHandleRequestAction } from '@metamask/snaps-controllers';\nimport type { Infer } from '@metamask/superstruct';\nimport type {\n CaipAccountId,\n CaipAssetId,\n CaipAssetType,\n CaipChainId,\n Hex,\n} from '@metamask/utils';\n\nimport type { BridgeController } from './bridge-controller';\nimport type { BridgeControllerMethodActions } from './bridge-controller-method-action-types';\nimport type { BRIDGE_CONTROLLER_NAME } from './constants/bridge';\nimport type {\n BitcoinTradeDataSchema,\n BridgeAssetSchema,\n ChainConfigurationSchema,\n ChainRankingSchema,\n FeeDataSchema,\n IntentSchema,\n PlatformConfigSchema,\n ProtocolSchema,\n QuoteResponseSchema,\n QuoteSchema,\n StepSchema,\n TokenFeatureSchema,\n QuoteStreamCompleteSchema,\n TronTradeDataSchema,\n TxDataSchema,\n BatchSellTradesResponseSchema,\n GaslessPropertiesSchema,\n SimulatedGasFeeLimitsSchema,\n TxFeeGasLimitsSchema,\n} from './utils/validators';\n\nexport type FetchFunction = (\n input: RequestInfo | URL | string,\n init?: RequestInit,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n) => Promise<any>;\n\n/**\n * The types of assets that a user can send\n */\nexport enum AssetType {\n /** The native asset for the current network, such as ETH */\n native = 'NATIVE',\n /** An ERC20 token */\n token = 'TOKEN',\n /** An ERC721 or ERC1155 token. */\n NFT = 'NFT',\n /**\n * A transaction interacting with a contract that isn't a token method\n * interaction will be marked as dealing with an unknown asset type.\n */\n unknown = 'UNKNOWN',\n}\n\nexport type ChainConfiguration = Infer<typeof ChainConfigurationSchema>;\n\nexport type ChainRanking = Infer<typeof ChainRankingSchema>;\n\nexport type L1GasFees = {\n l1GasFeesInHexWei?: string; // l1 fees for approval and trade in hex wei, appended by BridgeController.#appendL1GasFees\n};\n\nexport type NonEvmFees = {\n nonEvmFeesInNative?: string; // Non-EVM chain fees in native units (SOL for Solana, BTC for Bitcoin)\n};\n\n/**\n * The types of values for the token amount and its values when converted to the user's selected currency and USD\n */\nexport type TokenAmountValues = {\n /**\n * The amount of the token\n *\n * @example \"1.005\"\n */\n amount: string;\n /**\n * The amount of the token in the user's selected currency\n *\n * @example \"4.55\"\n */\n valueInCurrency: string | null;\n /**\n * The amount of the token in USD\n *\n * @example \"1.234\"\n */\n usd: string | null;\n};\n\n/**\n * Asset exchange rate values for a given chain and address\n */\nexport type ExchangeRate = { exchangeRate?: string; usdExchangeRate?: string };\n\n/**\n * Values derived from the quote response\n */\nexport type QuoteMetadata = {\n /**\n * If gas is included, this is the value of the src or dest token that was used to pay for the gas.\n * Show this value to indicate transaction fees for gasless quotes.\n */\n includedTxFees?: TokenAmountValues | null;\n /**\n * The gas fee for the bridge transaction.\n * effective is the gas fee that is shown to the user. If this value is not\n * included in the trade, the calculation falls back to the gasLimit (total)\n * total is the gas fee that is spent by the user, including refunds.\n * max is the max gas fee that will be used by the transaction.\n */\n gasFee: Record<'effective' | 'total' | 'max', TokenAmountValues>;\n /**\n * The total network fee required to submit the trade and any approvals. This includes\n * the relayer fee or other native fees. Should be used for balance checks and tx submission.\n * Note: This is only accurate for non-gasless transactions. Use {@link QuoteMetadata.includedTxFees} to\n * get the total network fee for gasless transactions.\n */\n totalNetworkFee: TokenAmountValues; // estimatedGasFees + relayerFees\n totalMaxNetworkFee: TokenAmountValues; // maxGasFees + relayerFees\n /**\n * The amount that the user will receive (destTokenAmount)\n */\n toTokenAmount: TokenAmountValues;\n /**\n * The minimum amount that the user will receive (minDestTokenAmount)\n */\n minToTokenAmount: TokenAmountValues;\n /**\n * If gas is included: {@link QuoteMetadata.toTokenAmount} - {@link QuoteMetadata.includedTxFees}.\n * Otherwise: {@link QuoteMetadata.toTokenAmount} - {@link QuoteMetadata.totalNetworkFee}.\n */\n adjustedReturn: Omit<TokenAmountValues, 'amount'>;\n /**\n * The amount that the user will send, including fees that are paid in the src token\n * {@link Quote.srcTokenAmount} + {@link Quote.feeData[FeeType.METABRIDGE].amount} + {@link Quote.feeData[FeeType.TX_FEE].amount}\n */\n sentAmount: TokenAmountValues;\n /**\n * The swap rate is the amount that the user will receive per amount sent. Accounts for fees paid in the src or dest token.\n * This is calculated as {@link QuoteMetadata.toTokenAmount} / {@link QuoteMetadata.sentAmount}.\n */\n swapRate: string;\n /**\n * The cost of the trade, which is the difference between the amount sent and the adjusted return.\n * This is calculated as {@link QuoteMetadata.sentAmount} - {@link QuoteMetadata.adjustedReturn}.\n */\n cost: Omit<TokenAmountValues, 'amount'>; // sentAmount - adjustedReturn\n};\n\n/**\n * Sort order set by the user\n */\nexport enum SortOrder {\n COST_ASC = 'cost_ascending',\n ETA_ASC = 'time_descending',\n}\n\n/**\n * This is the interface for the asset object returned by the bridge-api\n * This type is used in the QuoteResponse and in the fetchBridgeTokens response\n */\nexport type BridgeAsset = Infer<typeof BridgeAssetSchema>;\n\n/**\n * This is the interface for the token object used in the extension client\n * In addition to the {@link BridgeAsset} fields, it includes balance information\n */\nexport type BridgeToken = {\n address: string;\n symbol: string;\n image: string;\n decimals: number;\n chainId: number | Hex | ChainId | CaipChainId;\n balance: string; // raw balance\n // TODO deprecate this field and use balance instead\n string: string | undefined; // normalized balance as a stringified number\n tokenFiatAmount?: number | null;\n occurrences?: number;\n};\n\ntype DecimalChainId = string;\nexport type GasMultiplierByChainId = Record<DecimalChainId, number>;\n\nexport type FeatureFlagResponse = Infer<typeof PlatformConfigSchema>;\n\n// TODO move definition to validators.ts\n/**\n * This is the interface for the quote request sent to the bridge-api\n * and should only be used by the fetchBridgeQuotes utility function\n * Components and redux stores should use the {@link GenericQuoteRequest} type\n */\nexport type QuoteRequest<\n ChainIdType = ChainId | number,\n TokenAddressType = string,\n WalletAddressType = string,\n> = {\n walletAddress: WalletAddressType;\n destWalletAddress?: WalletAddressType;\n srcChainId: ChainIdType;\n destChainId: ChainIdType;\n srcTokenAddress: TokenAddressType;\n destTokenAddress: TokenAddressType;\n /**\n * This is the amount sent, in atomic amount\n */\n srcTokenAmount: string;\n slippage?: number;\n aggIds?: string[];\n bridgeIds?: string[];\n insufficientBal?: boolean;\n resetApproval?: boolean;\n refuel?: boolean;\n /**\n * Whether the response should include gasless swap quotes\n * This should be true if the user has opted in to STX on the client\n * and the current network has STX support\n */\n gasIncluded: boolean;\n /**\n * Whether to request quotes that use EIP-7702 delegated gasless execution\n */\n gasIncluded7702: boolean;\n /**\n * The fee that will be charged by MetaMask\n */\n fee?: number;\n};\n\nexport enum StatusTypes {\n SUBMITTED = 'SUBMITTED',\n UNKNOWN = 'UNKNOWN',\n FAILED = 'FAILED',\n PENDING = 'PENDING',\n COMPLETE = 'COMPLETE',\n}\n\nexport enum FeatureId {\n UNKNOWN = 'unknown',\n PERPS = 'perps',\n QUICK_BUY_FOLLOW_TRADING = 'quick_buy_follow_trading',\n QUICK_BUY_TOKEN_DETAILS = 'quick_buy_token_details',\n DAPP_SWAP = 'dapp_swap',\n BATCH_SELL = 'batch_sell',\n UNIFIED_SWAP_BRIDGE = 'unified_swap_bridge',\n}\n\n/**\n * These are types that components pass in. Since data is a mix of types when coming from the redux store, we need to use a generic type that can cover all the types.\n * Payloads with this type are transformed into QuoteRequest by fetchBridgeQuotes right before fetching quotes\n */\nexport type GenericQuoteRequest = QuoteRequest<\n Hex | CaipChainId | string | number, // chainIds\n Hex | CaipAssetId | string, // assetIds/addresses\n Hex | CaipAccountId | string // accountIds/addresses\n>;\n\nexport type Protocol = Infer<typeof ProtocolSchema>;\n\nexport type Step = Infer<typeof StepSchema>;\n\nexport type RefuelData = Step;\n\nexport type FeeData = Infer<typeof FeeDataSchema>;\n\nexport type Quote = Infer<typeof QuoteSchema>;\n\nexport type TxData = Infer<typeof TxDataSchema>;\n\nexport type Intent = Infer<typeof IntentSchema>;\nexport type IntentOrderLike = Intent['order'];\n\nexport type BitcoinTradeData = Infer<typeof BitcoinTradeDataSchema>;\n\nexport type TronTradeData = Infer<typeof TronTradeDataSchema>;\n/**\n * This is the type for the quote response from the bridge-api\n * TxDataType can be overriden to be a string when the quote is non-evm\n * ApprovalType can be overriden when you know the specific approval type (e.g., TxData for EVM-only contexts)\n */\nexport type QuoteResponseV1<\n TxDataType = TxData | string | BitcoinTradeData | TronTradeData,\n ApprovalType = TxData | TronTradeData,\n> = Infer<typeof QuoteResponseSchema> & {\n trade: TxDataType;\n approval?: ApprovalType;\n /**\n * Appended to the quote response based on the quote request\n */\n featureId?: FeatureId;\n /**\n * Appended to the quote response based on the quote request resetApproval flag\n * If defined, the quote's total network fee will include the reset approval's gas limit.\n */\n resetApproval?: TxData;\n /**\n * Appended to the quote if there are multiple quote requests in a batch. This\n * indicates which quoteRequest the quote is for\n */\n quoteRequestIndex?: number;\n};\n\nexport type BatchSellTradesRequest = {\n quotes: QuoteResponseV1[];\n stxEnabled: boolean;\n};\n\n/**\n * This is the bridge-api response for the obtainGaslessBatch method\n */\nexport type BatchSellTradesResponse = Infer<\n typeof BatchSellTradesResponseSchema\n>;\n\nexport type SimulatedGasFeeLimits = Infer<typeof SimulatedGasFeeLimitsSchema>;\nexport type TxFeeGasLimits = Infer<typeof TxFeeGasLimitsSchema>;\n\nexport type GaslessProperties = Infer<typeof GaslessPropertiesSchema>;\n\nexport type DeepPartial<Type> = Type extends string\n ? Type\n : {\n [K in keyof Type]?: Type[K] extends (infer U)[]\n ? DeepPartial<U>[]\n : Type[K] extends readonly (infer U)[]\n ? readonly DeepPartial<U>[]\n : Type[K] extends object\n ? DeepPartial<Type[K]>\n : Type[K];\n };\n\nexport enum ChainId {\n ETH = 1,\n OPTIMISM = 10,\n BSC = 56,\n POLYGON = 137,\n ZKSYNC = 324,\n BASE = 8453,\n ARBITRUM = 42161,\n AVALANCHE = 43114,\n LINEA = 59144,\n SOLANA = 1151111081099710,\n BTC = 20000000000001,\n TRON = 728126428,\n SEI = 1329,\n MONAD = 143,\n HYPEREVM = 999,\n MEGAETH = 4326,\n ARC = 5042,\n}\n\nexport type FeatureFlagsPlatformConfig = Infer<typeof PlatformConfigSchema>;\n\nexport type TokenFeature = Infer<typeof TokenFeatureSchema>;\n\nexport type QuoteStreamCompleteData = Infer<typeof QuoteStreamCompleteSchema>;\n\nexport enum RequestStatus {\n LOADING = 0,\n FETCHED = 1,\n ERROR = 2,\n}\n\nexport type BridgeControllerState = {\n quoteRequest: Partial<GenericQuoteRequest>[];\n quotes: (QuoteResponseV1 & L1GasFees & NonEvmFees)[];\n /**\n * The time elapsed between the initial quote fetch and when the first valid quote was received\n */\n quotesInitialLoadTime: number | null;\n /**\n * The timestamp of when the latest quote fetch started\n */\n quotesLastFetched: number | null;\n /**\n * The status of the quote fetch, including fee calculations and validations\n * This is set to\n * - LOADING when the quote fetch starts\n * - FETCHED when the process completes successfully, including when quotes are empty\n * - ERROR when any errors occur\n *\n * When SSE is enabled, this is set to LOADING even when a quote is available. It is only\n * set to FETCHED when the stream is closed and all quotes have been received\n */\n quotesLoadingStatus: RequestStatus | null;\n quoteFetchError: string | null;\n /**\n * The number of times the quotes have been refreshed, starts at 0 and is\n * incremented at the end of each quote fetch\n */\n quotesRefreshCount: number;\n /**\n * Asset exchange rates for EVM and multichain assets that are not indexed by the assets controllers\n */\n assetExchangeRates: Record<CaipAssetType, ExchangeRate>;\n /**\n * When the src token is SOL, this needs to be subtracted from their balance to determine\n * the max amount that can be sent.\n */\n minimumBalanceForRentExemptionInLamports: string | null;\n /**\n * Security alerts for the destination token in the current quote request,\n * populated from `token_warning` SSE events.\n */\n tokenWarnings: TokenFeature[];\n /**\n * Client-supplied security classification for the destination token in the\n * current quote request, used as the `token_security_type_destination`\n * analytics property. Set via the `context` arg of\n * `updateBridgeQuoteRequestParams` and reset whenever the quote request is\n * reset. `null` when the client has no security data for the token.\n */\n tokenSecurityTypeDestination: string | null;\n /**\n * Metadata about the completed quote stream, populated from the `complete` SSE event.\n * Set to null at the start of each fetch and updated when the complete event is received.\n */\n quoteStreamComplete: QuoteStreamCompleteData | null;\n /**\n * Contains gasless transaction data and fees for BatchSell quotes, provided by the obtainGaslessBatch API\n */\n batchSellTrades: BatchSellTradesResponse | null;\n /**\n * The status of the batch sell trades fetch, including fee calculations and validations\n */\n batchSellTradesLoadingStatus: RequestStatus | null;\n};\n\n/**\n * @deprecated Use the separate method action types (e.g.,\n * `BridgeControllerFetchQuotesAction`) instead.\n */\nexport type BridgeControllerAction<\n FunctionName extends keyof BridgeController,\n> = {\n type: `${typeof BRIDGE_CONTROLLER_NAME}:${FunctionName}`;\n handler: BridgeController[FunctionName];\n};\n\nexport type BridgeControllerGetStateAction = ControllerGetStateAction<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerState\n>;\n\nexport type BridgeControllerStateChangeEvent = ControllerStateChangeEvent<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerState\n>;\n\nexport type BridgeControllerActions =\n | BridgeControllerGetStateAction\n | BridgeControllerMethodActions;\n\nexport type BridgeControllerEvents = BridgeControllerStateChangeEvent;\n\nexport type AllowedActions =\n | AccountsControllerGetAccountByAddressAction\n | AuthenticationControllerGetBearerTokenAction\n | CurrencyRateControllerGetStateAction\n | TokenRatesControllerGetStateAction\n | MultichainAssetsRatesControllerGetStateAction\n | SnapControllerHandleRequestAction\n | NetworkControllerFindNetworkClientIdByChainIdAction\n | NetworkControllerGetNetworkClientByIdAction\n | RemoteFeatureFlagControllerGetStateAction\n | AssetsControllerGetExchangeRatesForBridgeAction;\nexport type AllowedEvents = never;\n\n/**\n * The messenger for the BridgeController.\n */\nexport type BridgeControllerMessenger = Messenger<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerActions | AllowedActions,\n BridgeControllerEvents | AllowedEvents\n>;\n"]}
1
+ {"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AA4DA;;GAEG;AACH,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,4DAA4D;IAC5D,8BAAiB,CAAA;IACjB,qBAAqB;IACrB,4BAAe,CAAA;IACf,kCAAkC;IAClC,wBAAW,CAAA;IACX;;;OAGG;IACH,gCAAmB,CAAA;AACrB,CAAC,EAZW,SAAS,yBAAT,SAAS,QAYpB;AAoGD;;GAEG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,wCAA2B,CAAA;AAC7B,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAyED,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,sCAAuB,CAAA;IACvB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;AACvB,CAAC,EANW,WAAW,2BAAX,WAAW,QAMtB;AAED,IAAY,SAQX;AARD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,4BAAe,CAAA;IACf,kEAAqD,CAAA;IACrD,gEAAmD,CAAA;IACnD,oCAAuB,CAAA;IACvB,sCAAyB,CAAA;IACzB,wDAA2C,CAAA;AAC7C,CAAC,EARW,SAAS,yBAAT,SAAS,QAQpB;AAsFD,IAAY,OAkBX;AAlBD,WAAY,OAAO;IACjB,mCAAO,CAAA;IACP,8CAAa,CAAA;IACb,oCAAQ,CAAA;IACR,6CAAa,CAAA;IACb,2CAAY,CAAA;IACZ,wCAAW,CAAA;IACX,iDAAgB,CAAA;IAChB,mDAAiB,CAAA;IACjB,2CAAa,CAAA;IACb,wDAAyB,CAAA;IACzB,gDAAoB,CAAA;IACpB,6CAAgB,CAAA;IAChB,sCAAU,CAAA;IACV,yCAAW,CAAA;IACX,+CAAc,CAAA;IACd,8CAAc,CAAA;IACd,sCAAU,CAAA;AACZ,CAAC,EAlBW,OAAO,uBAAP,OAAO,QAkBlB;AAQD,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,uDAAW,CAAA;IACX,uDAAW,CAAA;IACX,mDAAS,CAAA;AACX,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport type { AccountsControllerGetAccountByAddressAction } from '@metamask/accounts-controller';\nimport type { AssetsControllerGetExchangeRatesForBridgeAction } from '@metamask/assets-controller';\nimport type {\n CurrencyRateControllerGetStateAction,\n MultichainAssetsRatesControllerGetStateAction,\n TokenRatesControllerGetStateAction,\n} from '@metamask/assets-controllers';\nimport type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n} from '@metamask/base-controller';\nimport type { Messenger } from '@metamask/messenger';\nimport type {\n NetworkControllerFindNetworkClientIdByChainIdAction,\n NetworkControllerGetNetworkClientByIdAction,\n} from '@metamask/network-controller';\nimport type { AuthenticationControllerGetBearerTokenAction } from '@metamask/profile-sync-controller/auth';\nimport type { RemoteFeatureFlagControllerGetStateAction } from '@metamask/remote-feature-flag-controller';\nimport type { SnapControllerHandleRequestAction } from '@metamask/snaps-controllers';\nimport type { Infer } from '@metamask/superstruct';\nimport type {\n CaipAccountId,\n CaipAssetId,\n CaipAssetType,\n CaipChainId,\n Hex,\n} from '@metamask/utils';\n\nimport type { BridgeController } from './bridge-controller';\nimport type { BridgeControllerMethodActions } from './bridge-controller-method-action-types';\nimport type { BRIDGE_CONTROLLER_NAME } from './constants/bridge';\nimport type {\n BitcoinTradeDataSchema,\n BridgeAssetSchema,\n ChainConfigurationSchema,\n ChainRankingSchema,\n FeeDataSchema,\n IntentSchema,\n PlatformConfigSchema,\n ProtocolSchema,\n QuoteResponseSchema,\n QuoteSchema,\n StepSchema,\n TokenFeatureSchema,\n QuoteStreamCompleteSchema,\n TronTradeDataSchema,\n TxDataSchema,\n BatchSellTradesResponseSchema,\n GaslessPropertiesSchema,\n SimulatedGasFeeLimitsSchema,\n TxFeeGasLimitsSchema,\n} from './utils/validators';\n\nexport type FetchFunction = (\n input: RequestInfo | URL | string,\n init?: RequestInit,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n) => Promise<any>;\n\n/**\n * The types of assets that a user can send\n */\nexport enum AssetType {\n /** The native asset for the current network, such as ETH */\n native = 'NATIVE',\n /** An ERC20 token */\n token = 'TOKEN',\n /** An ERC721 or ERC1155 token. */\n NFT = 'NFT',\n /**\n * A transaction interacting with a contract that isn't a token method\n * interaction will be marked as dealing with an unknown asset type.\n */\n unknown = 'UNKNOWN',\n}\n\nexport type ChainConfiguration = Infer<typeof ChainConfigurationSchema>;\n\nexport type ChainRanking = Infer<typeof ChainRankingSchema>;\n\nexport type L1GasFees = {\n l1GasFeesInHexWei?: string; // l1 fees for approval and trade in hex wei, appended by BridgeController.#appendL1GasFees\n};\n\nexport type NonEvmFees = {\n nonEvmFeesInNative?: string; // Non-EVM chain fees in native units (SOL for Solana, BTC for Bitcoin)\n};\n\nexport type InputPrimaryDenomination = 'token_amount' | 'fiat_value';\n\n/**\n * The types of values for the token amount and its values when converted to the user's selected currency and USD\n */\nexport type TokenAmountValues = {\n /**\n * The amount of the token\n *\n * @example \"1.005\"\n */\n amount: string;\n /**\n * The amount of the token in the user's selected currency\n *\n * @example \"4.55\"\n */\n valueInCurrency: string | null;\n /**\n * The amount of the token in USD\n *\n * @example \"1.234\"\n */\n usd: string | null;\n};\n\n/**\n * Asset exchange rate values for a given chain and address\n */\nexport type ExchangeRate = { exchangeRate?: string; usdExchangeRate?: string };\n\n/**\n * Values derived from the quote response\n */\nexport type QuoteMetadata = {\n /**\n * If gas is included, this is the value of the src or dest token that was used to pay for the gas.\n * Show this value to indicate transaction fees for gasless quotes.\n */\n includedTxFees?: TokenAmountValues | null;\n /**\n * The gas fee for the bridge transaction.\n * effective is the gas fee that is shown to the user. If this value is not\n * included in the trade, the calculation falls back to the gasLimit (total)\n * total is the gas fee that is spent by the user, including refunds.\n * max is the max gas fee that will be used by the transaction.\n */\n gasFee: Record<'effective' | 'total' | 'max', TokenAmountValues>;\n /**\n * The total network fee required to submit the trade and any approvals. This includes\n * the relayer fee or other native fees. Should be used for balance checks and tx submission.\n * Note: This is only accurate for non-gasless transactions. Use {@link QuoteMetadata.includedTxFees} to\n * get the total network fee for gasless transactions.\n */\n totalNetworkFee: TokenAmountValues; // estimatedGasFees + relayerFees\n totalMaxNetworkFee: TokenAmountValues; // maxGasFees + relayerFees\n /**\n * The amount that the user will receive (destTokenAmount)\n */\n toTokenAmount: TokenAmountValues;\n /**\n * The minimum amount that the user will receive (minDestTokenAmount)\n */\n minToTokenAmount: TokenAmountValues;\n /**\n * If gas is included: {@link QuoteMetadata.toTokenAmount} - {@link QuoteMetadata.includedTxFees}.\n * Otherwise: {@link QuoteMetadata.toTokenAmount} - {@link QuoteMetadata.totalNetworkFee}.\n */\n adjustedReturn: Omit<TokenAmountValues, 'amount'>;\n /**\n * The amount that the user will send, including fees that are paid in the src token\n * {@link Quote.srcTokenAmount} + {@link Quote.feeData[FeeType.METABRIDGE].amount} + {@link Quote.feeData[FeeType.TX_FEE].amount}\n */\n sentAmount: TokenAmountValues;\n /**\n * The swap rate is the amount that the user will receive per amount sent. Accounts for fees paid in the src or dest token.\n * This is calculated as {@link QuoteMetadata.toTokenAmount} / {@link QuoteMetadata.sentAmount}.\n */\n swapRate: string;\n /**\n * The cost of the trade, which is the difference between the amount sent and the adjusted return.\n * This is calculated as {@link QuoteMetadata.sentAmount} - {@link QuoteMetadata.adjustedReturn}.\n */\n cost: Omit<TokenAmountValues, 'amount'>; // sentAmount - adjustedReturn\n};\n\n/**\n * Sort order set by the user\n */\nexport enum SortOrder {\n COST_ASC = 'cost_ascending',\n ETA_ASC = 'time_descending',\n}\n\n/**\n * This is the interface for the asset object returned by the bridge-api\n * This type is used in the QuoteResponse and in the fetchBridgeTokens response\n */\nexport type BridgeAsset = Infer<typeof BridgeAssetSchema>;\n\n/**\n * This is the interface for the token object used in the extension client\n * In addition to the {@link BridgeAsset} fields, it includes balance information\n */\nexport type BridgeToken = {\n address: string;\n symbol: string;\n image: string;\n decimals: number;\n chainId: number | Hex | ChainId | CaipChainId;\n balance: string; // raw balance\n // TODO deprecate this field and use balance instead\n string: string | undefined; // normalized balance as a stringified number\n tokenFiatAmount?: number | null;\n occurrences?: number;\n};\n\ntype DecimalChainId = string;\nexport type GasMultiplierByChainId = Record<DecimalChainId, number>;\n\nexport type FeatureFlagResponse = Infer<typeof PlatformConfigSchema>;\n\n// TODO move definition to validators.ts\n/**\n * This is the interface for the quote request sent to the bridge-api\n * and should only be used by the fetchBridgeQuotes utility function\n * Components and redux stores should use the {@link GenericQuoteRequest} type\n */\nexport type QuoteRequest<\n ChainIdType = ChainId | number,\n TokenAddressType = string,\n WalletAddressType = string,\n> = {\n walletAddress: WalletAddressType;\n destWalletAddress?: WalletAddressType;\n srcChainId: ChainIdType;\n destChainId: ChainIdType;\n srcTokenAddress: TokenAddressType;\n destTokenAddress: TokenAddressType;\n /**\n * This is the amount sent, in atomic amount\n */\n srcTokenAmount: string;\n slippage?: number;\n aggIds?: string[];\n bridgeIds?: string[];\n insufficientBal?: boolean;\n resetApproval?: boolean;\n refuel?: boolean;\n /**\n * Whether the response should include gasless swap quotes\n * This should be true if the user has opted in to STX on the client\n * and the current network has STX support\n */\n gasIncluded: boolean;\n /**\n * Whether to request quotes that use EIP-7702 delegated gasless execution\n */\n gasIncluded7702: boolean;\n /**\n * The fee that will be charged by MetaMask\n */\n fee?: number;\n};\n\nexport enum StatusTypes {\n SUBMITTED = 'SUBMITTED',\n UNKNOWN = 'UNKNOWN',\n FAILED = 'FAILED',\n PENDING = 'PENDING',\n COMPLETE = 'COMPLETE',\n}\n\nexport enum FeatureId {\n UNKNOWN = 'unknown',\n PERPS = 'perps',\n QUICK_BUY_FOLLOW_TRADING = 'quick_buy_follow_trading',\n QUICK_BUY_TOKEN_DETAILS = 'quick_buy_token_details',\n DAPP_SWAP = 'dapp_swap',\n BATCH_SELL = 'batch_sell',\n UNIFIED_SWAP_BRIDGE = 'unified_swap_bridge',\n}\n\n/**\n * These are types that components pass in. Since data is a mix of types when coming from the redux store, we need to use a generic type that can cover all the types.\n * Payloads with this type are transformed into QuoteRequest by fetchBridgeQuotes right before fetching quotes\n */\nexport type GenericQuoteRequest = QuoteRequest<\n Hex | CaipChainId | string | number, // chainIds\n Hex | CaipAssetId | string, // assetIds/addresses\n Hex | CaipAccountId | string // accountIds/addresses\n>;\n\nexport type Protocol = Infer<typeof ProtocolSchema>;\n\nexport type Step = Infer<typeof StepSchema>;\n\nexport type RefuelData = Step;\n\nexport type FeeData = Infer<typeof FeeDataSchema>;\n\nexport type Quote = Infer<typeof QuoteSchema>;\n\nexport type TxData = Infer<typeof TxDataSchema>;\n\nexport type Intent = Infer<typeof IntentSchema>;\nexport type IntentOrderLike = Intent['order'];\n\nexport type BitcoinTradeData = Infer<typeof BitcoinTradeDataSchema>;\n\nexport type TronTradeData = Infer<typeof TronTradeDataSchema>;\n/**\n * This is the type for the quote response from the bridge-api\n * TxDataType can be overriden to be a string when the quote is non-evm\n * ApprovalType can be overriden when you know the specific approval type (e.g., TxData for EVM-only contexts)\n */\nexport type QuoteResponseV1<\n TxDataType = TxData | string | BitcoinTradeData | TronTradeData,\n ApprovalType = TxData | TronTradeData,\n> = Infer<typeof QuoteResponseSchema> & {\n trade: TxDataType;\n approval?: ApprovalType;\n /**\n * Appended to the quote response based on the quote request\n */\n featureId?: FeatureId;\n /**\n * Appended to the quote response based on the quote request resetApproval flag\n * If defined, the quote's total network fee will include the reset approval's gas limit.\n */\n resetApproval?: TxData;\n /**\n * Appended to the quote if there are multiple quote requests in a batch. This\n * indicates which quoteRequest the quote is for\n */\n quoteRequestIndex?: number;\n};\n\nexport type BatchSellTradesRequest = {\n quotes: QuoteResponseV1[];\n stxEnabled: boolean;\n};\n\n/**\n * This is the bridge-api response for the obtainGaslessBatch method\n */\nexport type BatchSellTradesResponse = Infer<\n typeof BatchSellTradesResponseSchema\n>;\n\nexport type SimulatedGasFeeLimits = Infer<typeof SimulatedGasFeeLimitsSchema>;\nexport type TxFeeGasLimits = Infer<typeof TxFeeGasLimitsSchema>;\n\nexport type GaslessProperties = Infer<typeof GaslessPropertiesSchema>;\n\nexport type DeepPartial<Type> = Type extends string\n ? Type\n : {\n [K in keyof Type]?: Type[K] extends (infer U)[]\n ? DeepPartial<U>[]\n : Type[K] extends readonly (infer U)[]\n ? readonly DeepPartial<U>[]\n : Type[K] extends object\n ? DeepPartial<Type[K]>\n : Type[K];\n };\n\nexport enum ChainId {\n ETH = 1,\n OPTIMISM = 10,\n BSC = 56,\n POLYGON = 137,\n ZKSYNC = 324,\n BASE = 8453,\n ARBITRUM = 42161,\n AVALANCHE = 43114,\n LINEA = 59144,\n SOLANA = 1151111081099710,\n BTC = 20000000000001,\n TRON = 728126428,\n SEI = 1329,\n MONAD = 143,\n HYPEREVM = 999,\n MEGAETH = 4326,\n ARC = 5042,\n}\n\nexport type FeatureFlagsPlatformConfig = Infer<typeof PlatformConfigSchema>;\n\nexport type TokenFeature = Infer<typeof TokenFeatureSchema>;\n\nexport type QuoteStreamCompleteData = Infer<typeof QuoteStreamCompleteSchema>;\n\nexport enum RequestStatus {\n LOADING = 0,\n FETCHED = 1,\n ERROR = 2,\n}\n\nexport type BridgeControllerState = {\n quoteRequest: Partial<GenericQuoteRequest>[];\n quotes: (QuoteResponseV1 & L1GasFees & NonEvmFees)[];\n /**\n * The time elapsed between the initial quote fetch and when the first valid quote was received\n */\n quotesInitialLoadTime: number | null;\n /**\n * The timestamp of when the latest quote fetch started\n */\n quotesLastFetched: number | null;\n /**\n * The status of the quote fetch, including fee calculations and validations\n * This is set to\n * - LOADING when the quote fetch starts\n * - FETCHED when the process completes successfully, including when quotes are empty\n * - ERROR when any errors occur\n *\n * When SSE is enabled, this is set to LOADING even when a quote is available. It is only\n * set to FETCHED when the stream is closed and all quotes have been received\n */\n quotesLoadingStatus: RequestStatus | null;\n quoteFetchError: string | null;\n /**\n * The number of times the quotes have been refreshed, starts at 0 and is\n * incremented at the end of each quote fetch\n */\n quotesRefreshCount: number;\n /**\n * Asset exchange rates for EVM and multichain assets that are not indexed by the assets controllers\n */\n assetExchangeRates: Record<CaipAssetType, ExchangeRate>;\n /**\n * When the src token is SOL, this needs to be subtracted from their balance to determine\n * the max amount that can be sent.\n */\n minimumBalanceForRentExemptionInLamports: string | null;\n /**\n * Security alerts for the destination token in the current quote request,\n * populated from `token_warning` SSE events.\n */\n tokenWarnings: TokenFeature[];\n /**\n * Client-supplied security classification for the destination token in the\n * current quote request, used as the `token_security_type_destination`\n * analytics property. Set via the `context` arg of\n * `updateBridgeQuoteRequestParams` and reset whenever the quote request is\n * reset. `null` when the client has no security data for the token.\n */\n tokenSecurityTypeDestination: string | null;\n /**\n * The denomination currently shown as the primary source amount input.\n * This is persisted as a user preference so returning to the flow restores\n * the last selected fiat/token display mode.\n */\n inputPrimaryDenomination: InputPrimaryDenomination;\n /**\n * Metadata about the completed quote stream, populated from the `complete` SSE event.\n * Set to null at the start of each fetch and updated when the complete event is received.\n */\n quoteStreamComplete: QuoteStreamCompleteData | null;\n /**\n * Contains gasless transaction data and fees for BatchSell quotes, provided by the obtainGaslessBatch API\n */\n batchSellTrades: BatchSellTradesResponse | null;\n /**\n * The status of the batch sell trades fetch, including fee calculations and validations\n */\n batchSellTradesLoadingStatus: RequestStatus | null;\n};\n\n/**\n * @deprecated Use the separate method action types (e.g.,\n * `BridgeControllerFetchQuotesAction`) instead.\n */\nexport type BridgeControllerAction<\n FunctionName extends keyof BridgeController,\n> = {\n type: `${typeof BRIDGE_CONTROLLER_NAME}:${FunctionName}`;\n handler: BridgeController[FunctionName];\n};\n\nexport type BridgeControllerGetStateAction = ControllerGetStateAction<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerState\n>;\n\nexport type BridgeControllerStateChangeEvent = ControllerStateChangeEvent<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerState\n>;\n\nexport type BridgeControllerActions =\n | BridgeControllerGetStateAction\n | BridgeControllerMethodActions;\n\nexport type BridgeControllerEvents = BridgeControllerStateChangeEvent;\n\nexport type AllowedActions =\n | AccountsControllerGetAccountByAddressAction\n | AuthenticationControllerGetBearerTokenAction\n | CurrencyRateControllerGetStateAction\n | TokenRatesControllerGetStateAction\n | MultichainAssetsRatesControllerGetStateAction\n | SnapControllerHandleRequestAction\n | NetworkControllerFindNetworkClientIdByChainIdAction\n | NetworkControllerGetNetworkClientByIdAction\n | RemoteFeatureFlagControllerGetStateAction\n | AssetsControllerGetExchangeRatesForBridgeAction;\nexport type AllowedEvents = never;\n\n/**\n * The messenger for the BridgeController.\n */\nexport type BridgeControllerMessenger = Messenger<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerActions | AllowedActions,\n BridgeControllerEvents | AllowedEvents\n>;\n"]}
package/dist/types.d.cts CHANGED
@@ -38,6 +38,7 @@ export type L1GasFees = {
38
38
  export type NonEvmFees = {
39
39
  nonEvmFeesInNative?: string;
40
40
  };
41
+ export type InputPrimaryDenomination = 'token_amount' | 'fiat_value';
41
42
  /**
42
43
  * The types of values for the token amount and its values when converted to the user's selected currency and USD
43
44
  */
@@ -338,6 +339,12 @@ export type BridgeControllerState = {
338
339
  * reset. `null` when the client has no security data for the token.
339
340
  */
340
341
  tokenSecurityTypeDestination: string | null;
342
+ /**
343
+ * The denomination currently shown as the primary source amount input.
344
+ * This is persisted as a user preference so returning to the flow restores
345
+ * the last selected fiat/token display mode.
346
+ */
347
+ inputPrimaryDenomination: InputPrimaryDenomination;
341
348
  /**
342
349
  * Metadata about the completed quote stream, populated from the `complete` SSE event.
343
350
  * Set to null at the start of each fetch and updated when the complete event is received.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/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AC;AAEF;;;GAGG;AACH,MAAM,MAAM,sBAAsB,CAChC,YAAY,SAAS,MAAM,gBAAgB,IACzC;IACF,IAAI,EAAE,GAAG,OAAO,sBAAsB,IAAI,YAAY,EAAE,CAAC;IACzD,OAAO,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,8BAA8B,GAAG,wBAAwB,CACnE,OAAO,sBAAsB,EAC7B,qBAAqB,CACtB,CAAC;AAEF,MAAM,MAAM,gCAAgC,GAAG,0BAA0B,CACvE,OAAO,sBAAsB,EAC7B,qBAAqB,CACtB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAC/B,8BAA8B,GAC9B,6BAA6B,CAAC;AAElC,MAAM,MAAM,sBAAsB,GAAG,gCAAgC,CAAC;AAEtE,MAAM,MAAM,cAAc,GACtB,2CAA2C,GAC3C,4CAA4C,GAC5C,oCAAoC,GACpC,kCAAkC,GAClC,6CAA6C,GAC7C,iCAAiC,GACjC,mDAAmD,GACnD,2CAA2C,GAC3C,yCAAyC,GACzC,+CAA+C,CAAC;AACpD,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAC/C,OAAO,sBAAsB,EAC7B,uBAAuB,GAAG,cAAc,EACxC,sBAAsB,GAAG,aAAa,CACvC,CAAC"}
package/dist/types.d.mts CHANGED
@@ -38,6 +38,7 @@ export type L1GasFees = {
38
38
  export type NonEvmFees = {
39
39
  nonEvmFeesInNative?: string;
40
40
  };
41
+ export type InputPrimaryDenomination = 'token_amount' | 'fiat_value';
41
42
  /**
42
43
  * The types of values for the token amount and its values when converted to the user's selected currency and USD
43
44
  */
@@ -338,6 +339,12 @@ export type BridgeControllerState = {
338
339
  * reset. `null` when the client has no security data for the token.
339
340
  */
340
341
  tokenSecurityTypeDestination: string | null;
342
+ /**
343
+ * The denomination currently shown as the primary source amount input.
344
+ * This is persisted as a user preference so returning to the flow restores
345
+ * the last selected fiat/token display mode.
346
+ */
347
+ inputPrimaryDenomination: InputPrimaryDenomination;
341
348
  /**
342
349
  * Metadata about the completed quote stream, populated from the `complete` SSE event.
343
350
  * Set to null at the start of each fetch and updated when the complete event is received.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,2CAA2C,EAAE,sCAAsC;AACjG,OAAO,KAAK,EAAE,+CAA+C,EAAE,oCAAoC;AACnG,OAAO,KAAK,EACV,oCAAoC,EACpC,6CAA6C,EAC7C,kCAAkC,EACnC,qCAAqC;AACtC,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC3B,kCAAkC;AACnC,OAAO,KAAK,EAAE,SAAS,EAAE,4BAA4B;AACrD,OAAO,KAAK,EACV,mDAAmD,EACnD,2CAA2C,EAC5C,qCAAqC;AACtC,OAAO,KAAK,EAAE,4CAA4C,EAAE,+CAA+C;AAC3G,OAAO,KAAK,EAAE,yCAAyC,EAAE,iDAAiD;AAC1G,OAAO,KAAK,EAAE,iCAAiC,EAAE,oCAAoC;AACrF,OAAO,KAAK,EAAE,KAAK,EAAE,8BAA8B;AACnD,OAAO,KAAK,EACV,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACX,GAAG,EACJ,wBAAwB;AAEzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,gCAA4B;AAC5D,OAAO,KAAK,EAAE,6BAA6B,EAAE,oDAAgD;AAC7F,OAAO,KAAK,EAAE,sBAAsB,EAAE,+BAA2B;AACjE,OAAO,KAAK,EACV,sBAAsB,EACtB,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,yBAAyB,EACzB,mBAAmB,EACnB,YAAY,EACZ,6BAA6B,EAC7B,uBAAuB,EACvB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AAS,CAAA;AACX,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport type { AccountsControllerGetAccountByAddressAction } from '@metamask/accounts-controller';\nimport type { AssetsControllerGetExchangeRatesForBridgeAction } from '@metamask/assets-controller';\nimport type {\n CurrencyRateControllerGetStateAction,\n MultichainAssetsRatesControllerGetStateAction,\n TokenRatesControllerGetStateAction,\n} from '@metamask/assets-controllers';\nimport type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n} from '@metamask/base-controller';\nimport type { Messenger } from '@metamask/messenger';\nimport type {\n NetworkControllerFindNetworkClientIdByChainIdAction,\n NetworkControllerGetNetworkClientByIdAction,\n} from '@metamask/network-controller';\nimport type { AuthenticationControllerGetBearerTokenAction } from '@metamask/profile-sync-controller/auth';\nimport type { RemoteFeatureFlagControllerGetStateAction } from '@metamask/remote-feature-flag-controller';\nimport type { SnapControllerHandleRequestAction } from '@metamask/snaps-controllers';\nimport type { Infer } from '@metamask/superstruct';\nimport type {\n CaipAccountId,\n CaipAssetId,\n CaipAssetType,\n CaipChainId,\n Hex,\n} from '@metamask/utils';\n\nimport type { BridgeController } from './bridge-controller';\nimport type { BridgeControllerMethodActions } from './bridge-controller-method-action-types';\nimport type { BRIDGE_CONTROLLER_NAME } from './constants/bridge';\nimport type {\n BitcoinTradeDataSchema,\n BridgeAssetSchema,\n ChainConfigurationSchema,\n ChainRankingSchema,\n FeeDataSchema,\n IntentSchema,\n PlatformConfigSchema,\n ProtocolSchema,\n QuoteResponseSchema,\n QuoteSchema,\n StepSchema,\n TokenFeatureSchema,\n QuoteStreamCompleteSchema,\n TronTradeDataSchema,\n TxDataSchema,\n BatchSellTradesResponseSchema,\n GaslessPropertiesSchema,\n SimulatedGasFeeLimitsSchema,\n TxFeeGasLimitsSchema,\n} from './utils/validators';\n\nexport type FetchFunction = (\n input: RequestInfo | URL | string,\n init?: RequestInit,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n) => Promise<any>;\n\n/**\n * The types of assets that a user can send\n */\nexport enum AssetType {\n /** The native asset for the current network, such as ETH */\n native = 'NATIVE',\n /** An ERC20 token */\n token = 'TOKEN',\n /** An ERC721 or ERC1155 token. */\n NFT = 'NFT',\n /**\n * A transaction interacting with a contract that isn't a token method\n * interaction will be marked as dealing with an unknown asset type.\n */\n unknown = 'UNKNOWN',\n}\n\nexport type ChainConfiguration = Infer<typeof ChainConfigurationSchema>;\n\nexport type ChainRanking = Infer<typeof ChainRankingSchema>;\n\nexport type L1GasFees = {\n l1GasFeesInHexWei?: string; // l1 fees for approval and trade in hex wei, appended by BridgeController.#appendL1GasFees\n};\n\nexport type NonEvmFees = {\n nonEvmFeesInNative?: string; // Non-EVM chain fees in native units (SOL for Solana, BTC for Bitcoin)\n};\n\n/**\n * The types of values for the token amount and its values when converted to the user's selected currency and USD\n */\nexport type TokenAmountValues = {\n /**\n * The amount of the token\n *\n * @example \"1.005\"\n */\n amount: string;\n /**\n * The amount of the token in the user's selected currency\n *\n * @example \"4.55\"\n */\n valueInCurrency: string | null;\n /**\n * The amount of the token in USD\n *\n * @example \"1.234\"\n */\n usd: string | null;\n};\n\n/**\n * Asset exchange rate values for a given chain and address\n */\nexport type ExchangeRate = { exchangeRate?: string; usdExchangeRate?: string };\n\n/**\n * Values derived from the quote response\n */\nexport type QuoteMetadata = {\n /**\n * If gas is included, this is the value of the src or dest token that was used to pay for the gas.\n * Show this value to indicate transaction fees for gasless quotes.\n */\n includedTxFees?: TokenAmountValues | null;\n /**\n * The gas fee for the bridge transaction.\n * effective is the gas fee that is shown to the user. If this value is not\n * included in the trade, the calculation falls back to the gasLimit (total)\n * total is the gas fee that is spent by the user, including refunds.\n * max is the max gas fee that will be used by the transaction.\n */\n gasFee: Record<'effective' | 'total' | 'max', TokenAmountValues>;\n /**\n * The total network fee required to submit the trade and any approvals. This includes\n * the relayer fee or other native fees. Should be used for balance checks and tx submission.\n * Note: This is only accurate for non-gasless transactions. Use {@link QuoteMetadata.includedTxFees} to\n * get the total network fee for gasless transactions.\n */\n totalNetworkFee: TokenAmountValues; // estimatedGasFees + relayerFees\n totalMaxNetworkFee: TokenAmountValues; // maxGasFees + relayerFees\n /**\n * The amount that the user will receive (destTokenAmount)\n */\n toTokenAmount: TokenAmountValues;\n /**\n * The minimum amount that the user will receive (minDestTokenAmount)\n */\n minToTokenAmount: TokenAmountValues;\n /**\n * If gas is included: {@link QuoteMetadata.toTokenAmount} - {@link QuoteMetadata.includedTxFees}.\n * Otherwise: {@link QuoteMetadata.toTokenAmount} - {@link QuoteMetadata.totalNetworkFee}.\n */\n adjustedReturn: Omit<TokenAmountValues, 'amount'>;\n /**\n * The amount that the user will send, including fees that are paid in the src token\n * {@link Quote.srcTokenAmount} + {@link Quote.feeData[FeeType.METABRIDGE].amount} + {@link Quote.feeData[FeeType.TX_FEE].amount}\n */\n sentAmount: TokenAmountValues;\n /**\n * The swap rate is the amount that the user will receive per amount sent. Accounts for fees paid in the src or dest token.\n * This is calculated as {@link QuoteMetadata.toTokenAmount} / {@link QuoteMetadata.sentAmount}.\n */\n swapRate: string;\n /**\n * The cost of the trade, which is the difference between the amount sent and the adjusted return.\n * This is calculated as {@link QuoteMetadata.sentAmount} - {@link QuoteMetadata.adjustedReturn}.\n */\n cost: Omit<TokenAmountValues, 'amount'>; // sentAmount - adjustedReturn\n};\n\n/**\n * Sort order set by the user\n */\nexport enum SortOrder {\n COST_ASC = 'cost_ascending',\n ETA_ASC = 'time_descending',\n}\n\n/**\n * This is the interface for the asset object returned by the bridge-api\n * This type is used in the QuoteResponse and in the fetchBridgeTokens response\n */\nexport type BridgeAsset = Infer<typeof BridgeAssetSchema>;\n\n/**\n * This is the interface for the token object used in the extension client\n * In addition to the {@link BridgeAsset} fields, it includes balance information\n */\nexport type BridgeToken = {\n address: string;\n symbol: string;\n image: string;\n decimals: number;\n chainId: number | Hex | ChainId | CaipChainId;\n balance: string; // raw balance\n // TODO deprecate this field and use balance instead\n string: string | undefined; // normalized balance as a stringified number\n tokenFiatAmount?: number | null;\n occurrences?: number;\n};\n\ntype DecimalChainId = string;\nexport type GasMultiplierByChainId = Record<DecimalChainId, number>;\n\nexport type FeatureFlagResponse = Infer<typeof PlatformConfigSchema>;\n\n// TODO move definition to validators.ts\n/**\n * This is the interface for the quote request sent to the bridge-api\n * and should only be used by the fetchBridgeQuotes utility function\n * Components and redux stores should use the {@link GenericQuoteRequest} type\n */\nexport type QuoteRequest<\n ChainIdType = ChainId | number,\n TokenAddressType = string,\n WalletAddressType = string,\n> = {\n walletAddress: WalletAddressType;\n destWalletAddress?: WalletAddressType;\n srcChainId: ChainIdType;\n destChainId: ChainIdType;\n srcTokenAddress: TokenAddressType;\n destTokenAddress: TokenAddressType;\n /**\n * This is the amount sent, in atomic amount\n */\n srcTokenAmount: string;\n slippage?: number;\n aggIds?: string[];\n bridgeIds?: string[];\n insufficientBal?: boolean;\n resetApproval?: boolean;\n refuel?: boolean;\n /**\n * Whether the response should include gasless swap quotes\n * This should be true if the user has opted in to STX on the client\n * and the current network has STX support\n */\n gasIncluded: boolean;\n /**\n * Whether to request quotes that use EIP-7702 delegated gasless execution\n */\n gasIncluded7702: boolean;\n /**\n * The fee that will be charged by MetaMask\n */\n fee?: number;\n};\n\nexport enum StatusTypes {\n SUBMITTED = 'SUBMITTED',\n UNKNOWN = 'UNKNOWN',\n FAILED = 'FAILED',\n PENDING = 'PENDING',\n COMPLETE = 'COMPLETE',\n}\n\nexport enum FeatureId {\n UNKNOWN = 'unknown',\n PERPS = 'perps',\n QUICK_BUY_FOLLOW_TRADING = 'quick_buy_follow_trading',\n QUICK_BUY_TOKEN_DETAILS = 'quick_buy_token_details',\n DAPP_SWAP = 'dapp_swap',\n BATCH_SELL = 'batch_sell',\n UNIFIED_SWAP_BRIDGE = 'unified_swap_bridge',\n}\n\n/**\n * These are types that components pass in. Since data is a mix of types when coming from the redux store, we need to use a generic type that can cover all the types.\n * Payloads with this type are transformed into QuoteRequest by fetchBridgeQuotes right before fetching quotes\n */\nexport type GenericQuoteRequest = QuoteRequest<\n Hex | CaipChainId | string | number, // chainIds\n Hex | CaipAssetId | string, // assetIds/addresses\n Hex | CaipAccountId | string // accountIds/addresses\n>;\n\nexport type Protocol = Infer<typeof ProtocolSchema>;\n\nexport type Step = Infer<typeof StepSchema>;\n\nexport type RefuelData = Step;\n\nexport type FeeData = Infer<typeof FeeDataSchema>;\n\nexport type Quote = Infer<typeof QuoteSchema>;\n\nexport type TxData = Infer<typeof TxDataSchema>;\n\nexport type Intent = Infer<typeof IntentSchema>;\nexport type IntentOrderLike = Intent['order'];\n\nexport type BitcoinTradeData = Infer<typeof BitcoinTradeDataSchema>;\n\nexport type TronTradeData = Infer<typeof TronTradeDataSchema>;\n/**\n * This is the type for the quote response from the bridge-api\n * TxDataType can be overriden to be a string when the quote is non-evm\n * ApprovalType can be overriden when you know the specific approval type (e.g., TxData for EVM-only contexts)\n */\nexport type QuoteResponseV1<\n TxDataType = TxData | string | BitcoinTradeData | TronTradeData,\n ApprovalType = TxData | TronTradeData,\n> = Infer<typeof QuoteResponseSchema> & {\n trade: TxDataType;\n approval?: ApprovalType;\n /**\n * Appended to the quote response based on the quote request\n */\n featureId?: FeatureId;\n /**\n * Appended to the quote response based on the quote request resetApproval flag\n * If defined, the quote's total network fee will include the reset approval's gas limit.\n */\n resetApproval?: TxData;\n /**\n * Appended to the quote if there are multiple quote requests in a batch. This\n * indicates which quoteRequest the quote is for\n */\n quoteRequestIndex?: number;\n};\n\nexport type BatchSellTradesRequest = {\n quotes: QuoteResponseV1[];\n stxEnabled: boolean;\n};\n\n/**\n * This is the bridge-api response for the obtainGaslessBatch method\n */\nexport type BatchSellTradesResponse = Infer<\n typeof BatchSellTradesResponseSchema\n>;\n\nexport type SimulatedGasFeeLimits = Infer<typeof SimulatedGasFeeLimitsSchema>;\nexport type TxFeeGasLimits = Infer<typeof TxFeeGasLimitsSchema>;\n\nexport type GaslessProperties = Infer<typeof GaslessPropertiesSchema>;\n\nexport type DeepPartial<Type> = Type extends string\n ? Type\n : {\n [K in keyof Type]?: Type[K] extends (infer U)[]\n ? DeepPartial<U>[]\n : Type[K] extends readonly (infer U)[]\n ? readonly DeepPartial<U>[]\n : Type[K] extends object\n ? DeepPartial<Type[K]>\n : Type[K];\n };\n\nexport enum ChainId {\n ETH = 1,\n OPTIMISM = 10,\n BSC = 56,\n POLYGON = 137,\n ZKSYNC = 324,\n BASE = 8453,\n ARBITRUM = 42161,\n AVALANCHE = 43114,\n LINEA = 59144,\n SOLANA = 1151111081099710,\n BTC = 20000000000001,\n TRON = 728126428,\n SEI = 1329,\n MONAD = 143,\n HYPEREVM = 999,\n MEGAETH = 4326,\n ARC = 5042,\n}\n\nexport type FeatureFlagsPlatformConfig = Infer<typeof PlatformConfigSchema>;\n\nexport type TokenFeature = Infer<typeof TokenFeatureSchema>;\n\nexport type QuoteStreamCompleteData = Infer<typeof QuoteStreamCompleteSchema>;\n\nexport enum RequestStatus {\n LOADING = 0,\n FETCHED = 1,\n ERROR = 2,\n}\n\nexport type BridgeControllerState = {\n quoteRequest: Partial<GenericQuoteRequest>[];\n quotes: (QuoteResponseV1 & L1GasFees & NonEvmFees)[];\n /**\n * The time elapsed between the initial quote fetch and when the first valid quote was received\n */\n quotesInitialLoadTime: number | null;\n /**\n * The timestamp of when the latest quote fetch started\n */\n quotesLastFetched: number | null;\n /**\n * The status of the quote fetch, including fee calculations and validations\n * This is set to\n * - LOADING when the quote fetch starts\n * - FETCHED when the process completes successfully, including when quotes are empty\n * - ERROR when any errors occur\n *\n * When SSE is enabled, this is set to LOADING even when a quote is available. It is only\n * set to FETCHED when the stream is closed and all quotes have been received\n */\n quotesLoadingStatus: RequestStatus | null;\n quoteFetchError: string | null;\n /**\n * The number of times the quotes have been refreshed, starts at 0 and is\n * incremented at the end of each quote fetch\n */\n quotesRefreshCount: number;\n /**\n * Asset exchange rates for EVM and multichain assets that are not indexed by the assets controllers\n */\n assetExchangeRates: Record<CaipAssetType, ExchangeRate>;\n /**\n * When the src token is SOL, this needs to be subtracted from their balance to determine\n * the max amount that can be sent.\n */\n minimumBalanceForRentExemptionInLamports: string | null;\n /**\n * Security alerts for the destination token in the current quote request,\n * populated from `token_warning` SSE events.\n */\n tokenWarnings: TokenFeature[];\n /**\n * Client-supplied security classification for the destination token in the\n * current quote request, used as the `token_security_type_destination`\n * analytics property. Set via the `context` arg of\n * `updateBridgeQuoteRequestParams` and reset whenever the quote request is\n * reset. `null` when the client has no security data for the token.\n */\n tokenSecurityTypeDestination: string | null;\n /**\n * Metadata about the completed quote stream, populated from the `complete` SSE event.\n * Set to null at the start of each fetch and updated when the complete event is received.\n */\n quoteStreamComplete: QuoteStreamCompleteData | null;\n /**\n * Contains gasless transaction data and fees for BatchSell quotes, provided by the obtainGaslessBatch API\n */\n batchSellTrades: BatchSellTradesResponse | null;\n /**\n * The status of the batch sell trades fetch, including fee calculations and validations\n */\n batchSellTradesLoadingStatus: RequestStatus | null;\n};\n\n/**\n * @deprecated Use the separate method action types (e.g.,\n * `BridgeControllerFetchQuotesAction`) instead.\n */\nexport type BridgeControllerAction<\n FunctionName extends keyof BridgeController,\n> = {\n type: `${typeof BRIDGE_CONTROLLER_NAME}:${FunctionName}`;\n handler: BridgeController[FunctionName];\n};\n\nexport type BridgeControllerGetStateAction = ControllerGetStateAction<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerState\n>;\n\nexport type BridgeControllerStateChangeEvent = ControllerStateChangeEvent<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerState\n>;\n\nexport type BridgeControllerActions =\n | BridgeControllerGetStateAction\n | BridgeControllerMethodActions;\n\nexport type BridgeControllerEvents = BridgeControllerStateChangeEvent;\n\nexport type AllowedActions =\n | AccountsControllerGetAccountByAddressAction\n | AuthenticationControllerGetBearerTokenAction\n | CurrencyRateControllerGetStateAction\n | TokenRatesControllerGetStateAction\n | MultichainAssetsRatesControllerGetStateAction\n | SnapControllerHandleRequestAction\n | NetworkControllerFindNetworkClientIdByChainIdAction\n | NetworkControllerGetNetworkClientByIdAction\n | RemoteFeatureFlagControllerGetStateAction\n | AssetsControllerGetExchangeRatesForBridgeAction;\nexport type AllowedEvents = never;\n\n/**\n * The messenger for the BridgeController.\n */\nexport type BridgeControllerMessenger = Messenger<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerActions | AllowedActions,\n BridgeControllerEvents | AllowedEvents\n>;\n"]}
1
+ {"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AA4DA;;GAEG;AACH,MAAM,CAAN,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,4DAA4D;IAC5D,8BAAiB,CAAA;IACjB,qBAAqB;IACrB,4BAAe,CAAA;IACf,kCAAkC;IAClC,wBAAW,CAAA;IACX;;;OAGG;IACH,gCAAmB,CAAA;AACrB,CAAC,EAZW,SAAS,KAAT,SAAS,QAYpB;AAoGD;;GAEG;AACH,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,wCAA2B,CAAA;AAC7B,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAyED,MAAM,CAAN,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,sCAAuB,CAAA;IACvB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;AACvB,CAAC,EANW,WAAW,KAAX,WAAW,QAMtB;AAED,MAAM,CAAN,IAAY,SAQX;AARD,WAAY,SAAS;IACnB,gCAAmB,CAAA;IACnB,4BAAe,CAAA;IACf,kEAAqD,CAAA;IACrD,gEAAmD,CAAA;IACnD,oCAAuB,CAAA;IACvB,sCAAyB,CAAA;IACzB,wDAA2C,CAAA;AAC7C,CAAC,EARW,SAAS,KAAT,SAAS,QAQpB;AAsFD,MAAM,CAAN,IAAY,OAkBX;AAlBD,WAAY,OAAO;IACjB,mCAAO,CAAA;IACP,8CAAa,CAAA;IACb,oCAAQ,CAAA;IACR,6CAAa,CAAA;IACb,2CAAY,CAAA;IACZ,wCAAW,CAAA;IACX,iDAAgB,CAAA;IAChB,mDAAiB,CAAA;IACjB,2CAAa,CAAA;IACb,wDAAyB,CAAA;IACzB,gDAAoB,CAAA;IACpB,6CAAgB,CAAA;IAChB,sCAAU,CAAA;IACV,yCAAW,CAAA;IACX,+CAAc,CAAA;IACd,8CAAc,CAAA;IACd,sCAAU,CAAA;AACZ,CAAC,EAlBW,OAAO,KAAP,OAAO,QAkBlB;AAQD,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,uDAAW,CAAA;IACX,uDAAW,CAAA;IACX,mDAAS,CAAA;AACX,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport type { AccountsControllerGetAccountByAddressAction } from '@metamask/accounts-controller';\nimport type { AssetsControllerGetExchangeRatesForBridgeAction } from '@metamask/assets-controller';\nimport type {\n CurrencyRateControllerGetStateAction,\n MultichainAssetsRatesControllerGetStateAction,\n TokenRatesControllerGetStateAction,\n} from '@metamask/assets-controllers';\nimport type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n} from '@metamask/base-controller';\nimport type { Messenger } from '@metamask/messenger';\nimport type {\n NetworkControllerFindNetworkClientIdByChainIdAction,\n NetworkControllerGetNetworkClientByIdAction,\n} from '@metamask/network-controller';\nimport type { AuthenticationControllerGetBearerTokenAction } from '@metamask/profile-sync-controller/auth';\nimport type { RemoteFeatureFlagControllerGetStateAction } from '@metamask/remote-feature-flag-controller';\nimport type { SnapControllerHandleRequestAction } from '@metamask/snaps-controllers';\nimport type { Infer } from '@metamask/superstruct';\nimport type {\n CaipAccountId,\n CaipAssetId,\n CaipAssetType,\n CaipChainId,\n Hex,\n} from '@metamask/utils';\n\nimport type { BridgeController } from './bridge-controller';\nimport type { BridgeControllerMethodActions } from './bridge-controller-method-action-types';\nimport type { BRIDGE_CONTROLLER_NAME } from './constants/bridge';\nimport type {\n BitcoinTradeDataSchema,\n BridgeAssetSchema,\n ChainConfigurationSchema,\n ChainRankingSchema,\n FeeDataSchema,\n IntentSchema,\n PlatformConfigSchema,\n ProtocolSchema,\n QuoteResponseSchema,\n QuoteSchema,\n StepSchema,\n TokenFeatureSchema,\n QuoteStreamCompleteSchema,\n TronTradeDataSchema,\n TxDataSchema,\n BatchSellTradesResponseSchema,\n GaslessPropertiesSchema,\n SimulatedGasFeeLimitsSchema,\n TxFeeGasLimitsSchema,\n} from './utils/validators';\n\nexport type FetchFunction = (\n input: RequestInfo | URL | string,\n init?: RequestInit,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n) => Promise<any>;\n\n/**\n * The types of assets that a user can send\n */\nexport enum AssetType {\n /** The native asset for the current network, such as ETH */\n native = 'NATIVE',\n /** An ERC20 token */\n token = 'TOKEN',\n /** An ERC721 or ERC1155 token. */\n NFT = 'NFT',\n /**\n * A transaction interacting with a contract that isn't a token method\n * interaction will be marked as dealing with an unknown asset type.\n */\n unknown = 'UNKNOWN',\n}\n\nexport type ChainConfiguration = Infer<typeof ChainConfigurationSchema>;\n\nexport type ChainRanking = Infer<typeof ChainRankingSchema>;\n\nexport type L1GasFees = {\n l1GasFeesInHexWei?: string; // l1 fees for approval and trade in hex wei, appended by BridgeController.#appendL1GasFees\n};\n\nexport type NonEvmFees = {\n nonEvmFeesInNative?: string; // Non-EVM chain fees in native units (SOL for Solana, BTC for Bitcoin)\n};\n\nexport type InputPrimaryDenomination = 'token_amount' | 'fiat_value';\n\n/**\n * The types of values for the token amount and its values when converted to the user's selected currency and USD\n */\nexport type TokenAmountValues = {\n /**\n * The amount of the token\n *\n * @example \"1.005\"\n */\n amount: string;\n /**\n * The amount of the token in the user's selected currency\n *\n * @example \"4.55\"\n */\n valueInCurrency: string | null;\n /**\n * The amount of the token in USD\n *\n * @example \"1.234\"\n */\n usd: string | null;\n};\n\n/**\n * Asset exchange rate values for a given chain and address\n */\nexport type ExchangeRate = { exchangeRate?: string; usdExchangeRate?: string };\n\n/**\n * Values derived from the quote response\n */\nexport type QuoteMetadata = {\n /**\n * If gas is included, this is the value of the src or dest token that was used to pay for the gas.\n * Show this value to indicate transaction fees for gasless quotes.\n */\n includedTxFees?: TokenAmountValues | null;\n /**\n * The gas fee for the bridge transaction.\n * effective is the gas fee that is shown to the user. If this value is not\n * included in the trade, the calculation falls back to the gasLimit (total)\n * total is the gas fee that is spent by the user, including refunds.\n * max is the max gas fee that will be used by the transaction.\n */\n gasFee: Record<'effective' | 'total' | 'max', TokenAmountValues>;\n /**\n * The total network fee required to submit the trade and any approvals. This includes\n * the relayer fee or other native fees. Should be used for balance checks and tx submission.\n * Note: This is only accurate for non-gasless transactions. Use {@link QuoteMetadata.includedTxFees} to\n * get the total network fee for gasless transactions.\n */\n totalNetworkFee: TokenAmountValues; // estimatedGasFees + relayerFees\n totalMaxNetworkFee: TokenAmountValues; // maxGasFees + relayerFees\n /**\n * The amount that the user will receive (destTokenAmount)\n */\n toTokenAmount: TokenAmountValues;\n /**\n * The minimum amount that the user will receive (minDestTokenAmount)\n */\n minToTokenAmount: TokenAmountValues;\n /**\n * If gas is included: {@link QuoteMetadata.toTokenAmount} - {@link QuoteMetadata.includedTxFees}.\n * Otherwise: {@link QuoteMetadata.toTokenAmount} - {@link QuoteMetadata.totalNetworkFee}.\n */\n adjustedReturn: Omit<TokenAmountValues, 'amount'>;\n /**\n * The amount that the user will send, including fees that are paid in the src token\n * {@link Quote.srcTokenAmount} + {@link Quote.feeData[FeeType.METABRIDGE].amount} + {@link Quote.feeData[FeeType.TX_FEE].amount}\n */\n sentAmount: TokenAmountValues;\n /**\n * The swap rate is the amount that the user will receive per amount sent. Accounts for fees paid in the src or dest token.\n * This is calculated as {@link QuoteMetadata.toTokenAmount} / {@link QuoteMetadata.sentAmount}.\n */\n swapRate: string;\n /**\n * The cost of the trade, which is the difference between the amount sent and the adjusted return.\n * This is calculated as {@link QuoteMetadata.sentAmount} - {@link QuoteMetadata.adjustedReturn}.\n */\n cost: Omit<TokenAmountValues, 'amount'>; // sentAmount - adjustedReturn\n};\n\n/**\n * Sort order set by the user\n */\nexport enum SortOrder {\n COST_ASC = 'cost_ascending',\n ETA_ASC = 'time_descending',\n}\n\n/**\n * This is the interface for the asset object returned by the bridge-api\n * This type is used in the QuoteResponse and in the fetchBridgeTokens response\n */\nexport type BridgeAsset = Infer<typeof BridgeAssetSchema>;\n\n/**\n * This is the interface for the token object used in the extension client\n * In addition to the {@link BridgeAsset} fields, it includes balance information\n */\nexport type BridgeToken = {\n address: string;\n symbol: string;\n image: string;\n decimals: number;\n chainId: number | Hex | ChainId | CaipChainId;\n balance: string; // raw balance\n // TODO deprecate this field and use balance instead\n string: string | undefined; // normalized balance as a stringified number\n tokenFiatAmount?: number | null;\n occurrences?: number;\n};\n\ntype DecimalChainId = string;\nexport type GasMultiplierByChainId = Record<DecimalChainId, number>;\n\nexport type FeatureFlagResponse = Infer<typeof PlatformConfigSchema>;\n\n// TODO move definition to validators.ts\n/**\n * This is the interface for the quote request sent to the bridge-api\n * and should only be used by the fetchBridgeQuotes utility function\n * Components and redux stores should use the {@link GenericQuoteRequest} type\n */\nexport type QuoteRequest<\n ChainIdType = ChainId | number,\n TokenAddressType = string,\n WalletAddressType = string,\n> = {\n walletAddress: WalletAddressType;\n destWalletAddress?: WalletAddressType;\n srcChainId: ChainIdType;\n destChainId: ChainIdType;\n srcTokenAddress: TokenAddressType;\n destTokenAddress: TokenAddressType;\n /**\n * This is the amount sent, in atomic amount\n */\n srcTokenAmount: string;\n slippage?: number;\n aggIds?: string[];\n bridgeIds?: string[];\n insufficientBal?: boolean;\n resetApproval?: boolean;\n refuel?: boolean;\n /**\n * Whether the response should include gasless swap quotes\n * This should be true if the user has opted in to STX on the client\n * and the current network has STX support\n */\n gasIncluded: boolean;\n /**\n * Whether to request quotes that use EIP-7702 delegated gasless execution\n */\n gasIncluded7702: boolean;\n /**\n * The fee that will be charged by MetaMask\n */\n fee?: number;\n};\n\nexport enum StatusTypes {\n SUBMITTED = 'SUBMITTED',\n UNKNOWN = 'UNKNOWN',\n FAILED = 'FAILED',\n PENDING = 'PENDING',\n COMPLETE = 'COMPLETE',\n}\n\nexport enum FeatureId {\n UNKNOWN = 'unknown',\n PERPS = 'perps',\n QUICK_BUY_FOLLOW_TRADING = 'quick_buy_follow_trading',\n QUICK_BUY_TOKEN_DETAILS = 'quick_buy_token_details',\n DAPP_SWAP = 'dapp_swap',\n BATCH_SELL = 'batch_sell',\n UNIFIED_SWAP_BRIDGE = 'unified_swap_bridge',\n}\n\n/**\n * These are types that components pass in. Since data is a mix of types when coming from the redux store, we need to use a generic type that can cover all the types.\n * Payloads with this type are transformed into QuoteRequest by fetchBridgeQuotes right before fetching quotes\n */\nexport type GenericQuoteRequest = QuoteRequest<\n Hex | CaipChainId | string | number, // chainIds\n Hex | CaipAssetId | string, // assetIds/addresses\n Hex | CaipAccountId | string // accountIds/addresses\n>;\n\nexport type Protocol = Infer<typeof ProtocolSchema>;\n\nexport type Step = Infer<typeof StepSchema>;\n\nexport type RefuelData = Step;\n\nexport type FeeData = Infer<typeof FeeDataSchema>;\n\nexport type Quote = Infer<typeof QuoteSchema>;\n\nexport type TxData = Infer<typeof TxDataSchema>;\n\nexport type Intent = Infer<typeof IntentSchema>;\nexport type IntentOrderLike = Intent['order'];\n\nexport type BitcoinTradeData = Infer<typeof BitcoinTradeDataSchema>;\n\nexport type TronTradeData = Infer<typeof TronTradeDataSchema>;\n/**\n * This is the type for the quote response from the bridge-api\n * TxDataType can be overriden to be a string when the quote is non-evm\n * ApprovalType can be overriden when you know the specific approval type (e.g., TxData for EVM-only contexts)\n */\nexport type QuoteResponseV1<\n TxDataType = TxData | string | BitcoinTradeData | TronTradeData,\n ApprovalType = TxData | TronTradeData,\n> = Infer<typeof QuoteResponseSchema> & {\n trade: TxDataType;\n approval?: ApprovalType;\n /**\n * Appended to the quote response based on the quote request\n */\n featureId?: FeatureId;\n /**\n * Appended to the quote response based on the quote request resetApproval flag\n * If defined, the quote's total network fee will include the reset approval's gas limit.\n */\n resetApproval?: TxData;\n /**\n * Appended to the quote if there are multiple quote requests in a batch. This\n * indicates which quoteRequest the quote is for\n */\n quoteRequestIndex?: number;\n};\n\nexport type BatchSellTradesRequest = {\n quotes: QuoteResponseV1[];\n stxEnabled: boolean;\n};\n\n/**\n * This is the bridge-api response for the obtainGaslessBatch method\n */\nexport type BatchSellTradesResponse = Infer<\n typeof BatchSellTradesResponseSchema\n>;\n\nexport type SimulatedGasFeeLimits = Infer<typeof SimulatedGasFeeLimitsSchema>;\nexport type TxFeeGasLimits = Infer<typeof TxFeeGasLimitsSchema>;\n\nexport type GaslessProperties = Infer<typeof GaslessPropertiesSchema>;\n\nexport type DeepPartial<Type> = Type extends string\n ? Type\n : {\n [K in keyof Type]?: Type[K] extends (infer U)[]\n ? DeepPartial<U>[]\n : Type[K] extends readonly (infer U)[]\n ? readonly DeepPartial<U>[]\n : Type[K] extends object\n ? DeepPartial<Type[K]>\n : Type[K];\n };\n\nexport enum ChainId {\n ETH = 1,\n OPTIMISM = 10,\n BSC = 56,\n POLYGON = 137,\n ZKSYNC = 324,\n BASE = 8453,\n ARBITRUM = 42161,\n AVALANCHE = 43114,\n LINEA = 59144,\n SOLANA = 1151111081099710,\n BTC = 20000000000001,\n TRON = 728126428,\n SEI = 1329,\n MONAD = 143,\n HYPEREVM = 999,\n MEGAETH = 4326,\n ARC = 5042,\n}\n\nexport type FeatureFlagsPlatformConfig = Infer<typeof PlatformConfigSchema>;\n\nexport type TokenFeature = Infer<typeof TokenFeatureSchema>;\n\nexport type QuoteStreamCompleteData = Infer<typeof QuoteStreamCompleteSchema>;\n\nexport enum RequestStatus {\n LOADING = 0,\n FETCHED = 1,\n ERROR = 2,\n}\n\nexport type BridgeControllerState = {\n quoteRequest: Partial<GenericQuoteRequest>[];\n quotes: (QuoteResponseV1 & L1GasFees & NonEvmFees)[];\n /**\n * The time elapsed between the initial quote fetch and when the first valid quote was received\n */\n quotesInitialLoadTime: number | null;\n /**\n * The timestamp of when the latest quote fetch started\n */\n quotesLastFetched: number | null;\n /**\n * The status of the quote fetch, including fee calculations and validations\n * This is set to\n * - LOADING when the quote fetch starts\n * - FETCHED when the process completes successfully, including when quotes are empty\n * - ERROR when any errors occur\n *\n * When SSE is enabled, this is set to LOADING even when a quote is available. It is only\n * set to FETCHED when the stream is closed and all quotes have been received\n */\n quotesLoadingStatus: RequestStatus | null;\n quoteFetchError: string | null;\n /**\n * The number of times the quotes have been refreshed, starts at 0 and is\n * incremented at the end of each quote fetch\n */\n quotesRefreshCount: number;\n /**\n * Asset exchange rates for EVM and multichain assets that are not indexed by the assets controllers\n */\n assetExchangeRates: Record<CaipAssetType, ExchangeRate>;\n /**\n * When the src token is SOL, this needs to be subtracted from their balance to determine\n * the max amount that can be sent.\n */\n minimumBalanceForRentExemptionInLamports: string | null;\n /**\n * Security alerts for the destination token in the current quote request,\n * populated from `token_warning` SSE events.\n */\n tokenWarnings: TokenFeature[];\n /**\n * Client-supplied security classification for the destination token in the\n * current quote request, used as the `token_security_type_destination`\n * analytics property. Set via the `context` arg of\n * `updateBridgeQuoteRequestParams` and reset whenever the quote request is\n * reset. `null` when the client has no security data for the token.\n */\n tokenSecurityTypeDestination: string | null;\n /**\n * The denomination currently shown as the primary source amount input.\n * This is persisted as a user preference so returning to the flow restores\n * the last selected fiat/token display mode.\n */\n inputPrimaryDenomination: InputPrimaryDenomination;\n /**\n * Metadata about the completed quote stream, populated from the `complete` SSE event.\n * Set to null at the start of each fetch and updated when the complete event is received.\n */\n quoteStreamComplete: QuoteStreamCompleteData | null;\n /**\n * Contains gasless transaction data and fees for BatchSell quotes, provided by the obtainGaslessBatch API\n */\n batchSellTrades: BatchSellTradesResponse | null;\n /**\n * The status of the batch sell trades fetch, including fee calculations and validations\n */\n batchSellTradesLoadingStatus: RequestStatus | null;\n};\n\n/**\n * @deprecated Use the separate method action types (e.g.,\n * `BridgeControllerFetchQuotesAction`) instead.\n */\nexport type BridgeControllerAction<\n FunctionName extends keyof BridgeController,\n> = {\n type: `${typeof BRIDGE_CONTROLLER_NAME}:${FunctionName}`;\n handler: BridgeController[FunctionName];\n};\n\nexport type BridgeControllerGetStateAction = ControllerGetStateAction<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerState\n>;\n\nexport type BridgeControllerStateChangeEvent = ControllerStateChangeEvent<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerState\n>;\n\nexport type BridgeControllerActions =\n | BridgeControllerGetStateAction\n | BridgeControllerMethodActions;\n\nexport type BridgeControllerEvents = BridgeControllerStateChangeEvent;\n\nexport type AllowedActions =\n | AccountsControllerGetAccountByAddressAction\n | AuthenticationControllerGetBearerTokenAction\n | CurrencyRateControllerGetStateAction\n | TokenRatesControllerGetStateAction\n | MultichainAssetsRatesControllerGetStateAction\n | SnapControllerHandleRequestAction\n | NetworkControllerFindNetworkClientIdByChainIdAction\n | NetworkControllerGetNetworkClientByIdAction\n | RemoteFeatureFlagControllerGetStateAction\n | AssetsControllerGetExchangeRatesForBridgeAction;\nexport type AllowedEvents = never;\n\n/**\n * The messenger for the BridgeController.\n */\nexport type BridgeControllerMessenger = Messenger<\n typeof BRIDGE_CONTROLLER_NAME,\n BridgeControllerActions | AllowedActions,\n BridgeControllerEvents | AllowedEvents\n>;\n"]}
@@ -11,6 +11,7 @@ var UnifiedSwapBridgeEventName;
11
11
  UnifiedSwapBridgeEventName["ButtonClicked"] = "Unified SwapBridge Button Clicked";
12
12
  UnifiedSwapBridgeEventName["PageViewed"] = "Unified SwapBridge Page Viewed";
13
13
  UnifiedSwapBridgeEventName["InputChanged"] = "Unified SwapBridge Input Changed";
14
+ UnifiedSwapBridgeEventName["FiatCryptoToggleClicked"] = "Unified SwapBridge Fiat Crypto Toggle Clicked";
14
15
  UnifiedSwapBridgeEventName["InputSourceDestinationSwitched"] = "Unified SwapBridge Source Destination Switched";
15
16
  UnifiedSwapBridgeEventName["QuotesRequested"] = "Unified SwapBridge Quotes Requested";
16
17
  UnifiedSwapBridgeEventName["QuotesReceived"] = "Unified SwapBridge Quotes Received";
@@ -1 +1 @@
1
- {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../../../src/utils/metrics/constants.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AAC5C,QAAA,kCAAkC,GAAG,oBAAoB,CAAC;AAEvE;;GAEG;AACH,IAAY,0BAmBX;AAnBD,WAAY,0BAA0B;IACpC,iFAAsE,CAAA;IACtE,2EAAgE,CAAA;IAChE,+EAAoE,CAAA;IACpE,+GAAoG,CAAA;IACpG,qFAA0E,CAAA;IAC1E,mFAAwE,CAAA;IACxE,6EAAkE,CAAA;IAClE,wEAA6D,CAAA;IAC7D,wEAA6D,CAAA;IAC7D,kEAAuD,CAAA;IACvD,sFAA2E,CAAA;IAC3E,sFAA2E,CAAA;IAC3E,iFAAsE,CAAA;IACtE,2GAAgG,CAAA;IAChG,oGAAyF,CAAA;IACzF,oGAAyF,CAAA;IACzF,0FAA+E,CAAA;IAC/E,gGAAqF,CAAA;AACvF,CAAC,EAnBW,0BAA0B,0CAA1B,0BAA0B,QAmBrC;AAED,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,0DAAyC,CAAA;IACzC,oEAAmD,CAAA;IACnD,yDAAwC,CAAA;AAC1C,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,oDAAqC,CAAA;IACrC,4DAA6C,CAAA;IAC7C,oDAAqC,CAAA;IACrC,6DAA8C,CAAA;IAC9C,0EAA2D,CAAA;AAC7D,CAAC,EANW,WAAW,2BAAX,WAAW,QAMtB;AAED;;;;GAIG;AACH,IAAY,2BAKX;AALD,WAAY,2BAA2B;IACrC,qDAAsB,CAAA;IACtB,uDAAwB,CAAA;IACxB,mEAAoC,CAAA;IACpC,kDAAmB,CAAA;AACrB,CAAC,EALW,2BAA2B,2CAA3B,2BAA2B,QAKtC;AAED,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,uCAAkB,CAAA;IAClB,uCAAkB,CAAA;IAClB,uCAAkB,CAAA;IAClB,uCAAkB,CAAA;IAClB,uEAAuE;IACvE,gCAAW,CAAA;AACb,CAAC,EAPW,iBAAiB,iCAAjB,iBAAiB,QAO5B;AAED,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B;;OAEG;IACH,oDAA+B,CAAA;IAC/B,oDAA+B,CAAA;AACjC,CAAC,EANW,iBAAiB,iCAAjB,iBAAiB,QAM5B;AAED,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,0CAAuB,CAAA;IACvB,4CAAyB,CAAA;AAC3B,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nexport const UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY = 'Unified SwapBridge';\n\n/**\n * These event names map to events defined in the segment-schema: https://github.com/Consensys/segment-schema/tree/main/libraries/events/metamask-cross-chain-swaps\n */\nexport enum UnifiedSwapBridgeEventName {\n ButtonClicked = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Button Clicked`,\n PageViewed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Page Viewed`,\n InputChanged = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Input Changed`,\n InputSourceDestinationSwitched = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Source Destination Switched`,\n QuotesRequested = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quotes Requested`,\n QuotesReceived = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quotes Received`,\n QuotesError = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quotes Error`,\n Submitted = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Submitted`,\n Completed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Completed`,\n Failed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Failed`,\n AllQuotesOpened = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} All Quotes Opened`,\n AllQuotesSorted = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} All Quotes Sorted`,\n QuoteSelected = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quote Selected`,\n AssetDetailTooltipClicked = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Asset Detail Tooltip Clicked`,\n QuotesValidationFailed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quotes Failed Validation`,\n StatusValidationFailed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Status Failed Validation`,\n AssetPickerOpened = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Asset Picker Opened`,\n PollingStatusUpdated = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Polling Status Updated`,\n}\n\nexport enum PollingStatus {\n MaxPollingReached = 'max_polling_reached',\n InvalidTransactionHash = 'invalid_transaction_hash',\n ManuallyRestarted = 'manually_restarted',\n}\n\nexport enum AbortReason {\n NewQuoteRequest = 'New Quote Request',\n QuoteRequestUpdated = 'Quote Request Updated',\n ResetState = 'Reset controller state',\n TransactionSubmitted = 'Transaction submitted',\n GaslessTxBatchFetched = 'Gasless transaction batch fetched',\n}\n\n/**\n * Identifies the entry point from which the user initiated a swap or bridge flow.\n * Included as the `location` property on every Unified SwapBridge event so\n * analytics can trace the user's origin regardless of where they are in the flow.\n */\nexport enum MetaMetricsSwapsEventSource {\n MainView = 'Main View',\n TokenView = 'Token View',\n TrendingExplore = 'Trending Explore',\n Rewards = 'Rewards',\n}\n\nexport enum InputAmountPreset {\n PERCENT_25 = '25%',\n PERCENT_50 = '50%',\n PERCENT_75 = '75%',\n PERCENT_90 = '90%',\n // \"Max\" may not equal 100% of balance (e.g. gas reserves are withheld)\n MAX = 'MAX',\n}\n\nexport enum MetricsActionType {\n /**\n * @deprecated new events should use SWAPBRIDGE_V1 instead\n */\n CROSSCHAIN_V1 = 'crosschain-v1',\n SWAPBRIDGE_V1 = 'swapbridge-v1',\n}\n\nexport enum MetricsSwapType {\n SINGLE = 'single_chain',\n CROSSCHAIN = 'crosschain',\n}\n"]}
1
+ {"version":3,"file":"constants.cjs","sourceRoot":"","sources":["../../../src/utils/metrics/constants.ts"],"names":[],"mappings":";;;AAAA,yDAAyD;AAC5C,QAAA,kCAAkC,GAAG,oBAAoB,CAAC;AAEvE;;GAEG;AACH,IAAY,0BAoBX;AApBD,WAAY,0BAA0B;IACpC,iFAAsE,CAAA;IACtE,2EAAgE,CAAA;IAChE,+EAAoE,CAAA;IACpE,uGAA4F,CAAA;IAC5F,+GAAoG,CAAA;IACpG,qFAA0E,CAAA;IAC1E,mFAAwE,CAAA;IACxE,6EAAkE,CAAA;IAClE,wEAA6D,CAAA;IAC7D,wEAA6D,CAAA;IAC7D,kEAAuD,CAAA;IACvD,sFAA2E,CAAA;IAC3E,sFAA2E,CAAA;IAC3E,iFAAsE,CAAA;IACtE,2GAAgG,CAAA;IAChG,oGAAyF,CAAA;IACzF,oGAAyF,CAAA;IACzF,0FAA+E,CAAA;IAC/E,gGAAqF,CAAA;AACvF,CAAC,EApBW,0BAA0B,0CAA1B,0BAA0B,QAoBrC;AAED,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,0DAAyC,CAAA;IACzC,oEAAmD,CAAA;IACnD,yDAAwC,CAAA;AAC1C,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AAED,IAAY,WAMX;AAND,WAAY,WAAW;IACrB,oDAAqC,CAAA;IACrC,4DAA6C,CAAA;IAC7C,oDAAqC,CAAA;IACrC,6DAA8C,CAAA;IAC9C,0EAA2D,CAAA;AAC7D,CAAC,EANW,WAAW,2BAAX,WAAW,QAMtB;AAED;;;;GAIG;AACH,IAAY,2BAKX;AALD,WAAY,2BAA2B;IACrC,qDAAsB,CAAA;IACtB,uDAAwB,CAAA;IACxB,mEAAoC,CAAA;IACpC,kDAAmB,CAAA;AACrB,CAAC,EALW,2BAA2B,2CAA3B,2BAA2B,QAKtC;AAED,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC3B,uCAAkB,CAAA;IAClB,uCAAkB,CAAA;IAClB,uCAAkB,CAAA;IAClB,uCAAkB,CAAA;IAClB,uEAAuE;IACvE,gCAAW,CAAA;AACb,CAAC,EAPW,iBAAiB,iCAAjB,iBAAiB,QAO5B;AAED,IAAY,iBAMX;AAND,WAAY,iBAAiB;IAC3B;;OAEG;IACH,oDAA+B,CAAA;IAC/B,oDAA+B,CAAA;AACjC,CAAC,EANW,iBAAiB,iCAAjB,iBAAiB,QAM5B;AAED,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,0CAAuB,CAAA;IACvB,4CAAyB,CAAA;AAC3B,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nexport const UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY = 'Unified SwapBridge';\n\n/**\n * These event names map to events defined in the segment-schema: https://github.com/Consensys/segment-schema/tree/main/libraries/events/metamask-cross-chain-swaps\n */\nexport enum UnifiedSwapBridgeEventName {\n ButtonClicked = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Button Clicked`,\n PageViewed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Page Viewed`,\n InputChanged = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Input Changed`,\n FiatCryptoToggleClicked = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Fiat Crypto Toggle Clicked`,\n InputSourceDestinationSwitched = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Source Destination Switched`,\n QuotesRequested = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quotes Requested`,\n QuotesReceived = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quotes Received`,\n QuotesError = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quotes Error`,\n Submitted = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Submitted`,\n Completed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Completed`,\n Failed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Failed`,\n AllQuotesOpened = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} All Quotes Opened`,\n AllQuotesSorted = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} All Quotes Sorted`,\n QuoteSelected = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quote Selected`,\n AssetDetailTooltipClicked = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Asset Detail Tooltip Clicked`,\n QuotesValidationFailed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Quotes Failed Validation`,\n StatusValidationFailed = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Status Failed Validation`,\n AssetPickerOpened = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Asset Picker Opened`,\n PollingStatusUpdated = `${UNIFIED_SWAP_BRIDGE_EVENT_CATEGORY} Polling Status Updated`,\n}\n\nexport enum PollingStatus {\n MaxPollingReached = 'max_polling_reached',\n InvalidTransactionHash = 'invalid_transaction_hash',\n ManuallyRestarted = 'manually_restarted',\n}\n\nexport enum AbortReason {\n NewQuoteRequest = 'New Quote Request',\n QuoteRequestUpdated = 'Quote Request Updated',\n ResetState = 'Reset controller state',\n TransactionSubmitted = 'Transaction submitted',\n GaslessTxBatchFetched = 'Gasless transaction batch fetched',\n}\n\n/**\n * Identifies the entry point from which the user initiated a swap or bridge flow.\n * Included as the `location` property on every Unified SwapBridge event so\n * analytics can trace the user's origin regardless of where they are in the flow.\n */\nexport enum MetaMetricsSwapsEventSource {\n MainView = 'Main View',\n TokenView = 'Token View',\n TrendingExplore = 'Trending Explore',\n Rewards = 'Rewards',\n}\n\nexport enum InputAmountPreset {\n PERCENT_25 = '25%',\n PERCENT_50 = '50%',\n PERCENT_75 = '75%',\n PERCENT_90 = '90%',\n // \"Max\" may not equal 100% of balance (e.g. gas reserves are withheld)\n MAX = 'MAX',\n}\n\nexport enum MetricsActionType {\n /**\n * @deprecated new events should use SWAPBRIDGE_V1 instead\n */\n CROSSCHAIN_V1 = 'crosschain-v1',\n SWAPBRIDGE_V1 = 'swapbridge-v1',\n}\n\nexport enum MetricsSwapType {\n SINGLE = 'single_chain',\n CROSSCHAIN = 'crosschain',\n}\n"]}
@@ -6,6 +6,7 @@ export declare enum UnifiedSwapBridgeEventName {
6
6
  ButtonClicked = "Unified SwapBridge Button Clicked",
7
7
  PageViewed = "Unified SwapBridge Page Viewed",
8
8
  InputChanged = "Unified SwapBridge Input Changed",
9
+ FiatCryptoToggleClicked = "Unified SwapBridge Fiat Crypto Toggle Clicked",
9
10
  InputSourceDestinationSwitched = "Unified SwapBridge Source Destination Switched",
10
11
  QuotesRequested = "Unified SwapBridge Quotes Requested",
11
12
  QuotesReceived = "Unified SwapBridge Quotes Received",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../../src/utils/metrics/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kCAAkC,uBAAuB,CAAC;AAEvE;;GAEG;AACH,oBAAY,0BAA0B;IACpC,aAAa,sCAAyD;IACtE,UAAU,mCAAsD;IAChE,YAAY,qCAAwD;IACpE,8BAA8B,mDAAsE;IACpG,eAAe,wCAA2D;IAC1E,cAAc,uCAA0D;IACxE,WAAW,oCAAuD;IAClE,SAAS,iCAAoD;IAC7D,SAAS,iCAAoD;IAC7D,MAAM,8BAAiD;IACvD,eAAe,yCAA4D;IAC3E,eAAe,yCAA4D;IAC3E,aAAa,sCAAyD;IACtE,yBAAyB,oDAAuE;IAChG,sBAAsB,gDAAmE;IACzF,sBAAsB,gDAAmE;IACzF,iBAAiB,2CAA8D;IAC/E,oBAAoB,8CAAiE;CACtF;AAED,oBAAY,aAAa;IACvB,iBAAiB,wBAAwB;IACzC,sBAAsB,6BAA6B;IACnD,iBAAiB,uBAAuB;CACzC;AAED,oBAAY,WAAW;IACrB,eAAe,sBAAsB;IACrC,mBAAmB,0BAA0B;IAC7C,UAAU,2BAA2B;IACrC,oBAAoB,0BAA0B;IAC9C,qBAAqB,sCAAsC;CAC5D;AAED;;;;GAIG;AACH,oBAAY,2BAA2B;IACrC,QAAQ,cAAc;IACtB,SAAS,eAAe;IACxB,eAAe,qBAAqB;IACpC,OAAO,YAAY;CACpB;AAED,oBAAY,iBAAiB;IAC3B,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAElB,GAAG,QAAQ;CACZ;AAED,oBAAY,iBAAiB;IAC3B;;OAEG;IACH,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;CAChC;AAED,oBAAY,eAAe;IACzB,MAAM,iBAAiB;IACvB,UAAU,eAAe;CAC1B"}
1
+ {"version":3,"file":"constants.d.cts","sourceRoot":"","sources":["../../../src/utils/metrics/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kCAAkC,uBAAuB,CAAC;AAEvE;;GAEG;AACH,oBAAY,0BAA0B;IACpC,aAAa,sCAAyD;IACtE,UAAU,mCAAsD;IAChE,YAAY,qCAAwD;IACpE,uBAAuB,kDAAqE;IAC5F,8BAA8B,mDAAsE;IACpG,eAAe,wCAA2D;IAC1E,cAAc,uCAA0D;IACxE,WAAW,oCAAuD;IAClE,SAAS,iCAAoD;IAC7D,SAAS,iCAAoD;IAC7D,MAAM,8BAAiD;IACvD,eAAe,yCAA4D;IAC3E,eAAe,yCAA4D;IAC3E,aAAa,sCAAyD;IACtE,yBAAyB,oDAAuE;IAChG,sBAAsB,gDAAmE;IACzF,sBAAsB,gDAAmE;IACzF,iBAAiB,2CAA8D;IAC/E,oBAAoB,8CAAiE;CACtF;AAED,oBAAY,aAAa;IACvB,iBAAiB,wBAAwB;IACzC,sBAAsB,6BAA6B;IACnD,iBAAiB,uBAAuB;CACzC;AAED,oBAAY,WAAW;IACrB,eAAe,sBAAsB;IACrC,mBAAmB,0BAA0B;IAC7C,UAAU,2BAA2B;IACrC,oBAAoB,0BAA0B;IAC9C,qBAAqB,sCAAsC;CAC5D;AAED;;;;GAIG;AACH,oBAAY,2BAA2B;IACrC,QAAQ,cAAc;IACtB,SAAS,eAAe;IACxB,eAAe,qBAAqB;IACpC,OAAO,YAAY;CACpB;AAED,oBAAY,iBAAiB;IAC3B,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAElB,GAAG,QAAQ;CACZ;AAED,oBAAY,iBAAiB;IAC3B;;OAEG;IACH,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;CAChC;AAED,oBAAY,eAAe;IACzB,MAAM,iBAAiB;IACvB,UAAU,eAAe;CAC1B"}
@@ -6,6 +6,7 @@ export declare enum UnifiedSwapBridgeEventName {
6
6
  ButtonClicked = "Unified SwapBridge Button Clicked",
7
7
  PageViewed = "Unified SwapBridge Page Viewed",
8
8
  InputChanged = "Unified SwapBridge Input Changed",
9
+ FiatCryptoToggleClicked = "Unified SwapBridge Fiat Crypto Toggle Clicked",
9
10
  InputSourceDestinationSwitched = "Unified SwapBridge Source Destination Switched",
10
11
  QuotesRequested = "Unified SwapBridge Quotes Requested",
11
12
  QuotesReceived = "Unified SwapBridge Quotes Received",
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../../src/utils/metrics/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kCAAkC,uBAAuB,CAAC;AAEvE;;GAEG;AACH,oBAAY,0BAA0B;IACpC,aAAa,sCAAyD;IACtE,UAAU,mCAAsD;IAChE,YAAY,qCAAwD;IACpE,8BAA8B,mDAAsE;IACpG,eAAe,wCAA2D;IAC1E,cAAc,uCAA0D;IACxE,WAAW,oCAAuD;IAClE,SAAS,iCAAoD;IAC7D,SAAS,iCAAoD;IAC7D,MAAM,8BAAiD;IACvD,eAAe,yCAA4D;IAC3E,eAAe,yCAA4D;IAC3E,aAAa,sCAAyD;IACtE,yBAAyB,oDAAuE;IAChG,sBAAsB,gDAAmE;IACzF,sBAAsB,gDAAmE;IACzF,iBAAiB,2CAA8D;IAC/E,oBAAoB,8CAAiE;CACtF;AAED,oBAAY,aAAa;IACvB,iBAAiB,wBAAwB;IACzC,sBAAsB,6BAA6B;IACnD,iBAAiB,uBAAuB;CACzC;AAED,oBAAY,WAAW;IACrB,eAAe,sBAAsB;IACrC,mBAAmB,0BAA0B;IAC7C,UAAU,2BAA2B;IACrC,oBAAoB,0BAA0B;IAC9C,qBAAqB,sCAAsC;CAC5D;AAED;;;;GAIG;AACH,oBAAY,2BAA2B;IACrC,QAAQ,cAAc;IACtB,SAAS,eAAe;IACxB,eAAe,qBAAqB;IACpC,OAAO,YAAY;CACpB;AAED,oBAAY,iBAAiB;IAC3B,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAElB,GAAG,QAAQ;CACZ;AAED,oBAAY,iBAAiB;IAC3B;;OAEG;IACH,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;CAChC;AAED,oBAAY,eAAe;IACzB,MAAM,iBAAiB;IACvB,UAAU,eAAe;CAC1B"}
1
+ {"version":3,"file":"constants.d.mts","sourceRoot":"","sources":["../../../src/utils/metrics/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kCAAkC,uBAAuB,CAAC;AAEvE;;GAEG;AACH,oBAAY,0BAA0B;IACpC,aAAa,sCAAyD;IACtE,UAAU,mCAAsD;IAChE,YAAY,qCAAwD;IACpE,uBAAuB,kDAAqE;IAC5F,8BAA8B,mDAAsE;IACpG,eAAe,wCAA2D;IAC1E,cAAc,uCAA0D;IACxE,WAAW,oCAAuD;IAClE,SAAS,iCAAoD;IAC7D,SAAS,iCAAoD;IAC7D,MAAM,8BAAiD;IACvD,eAAe,yCAA4D;IAC3E,eAAe,yCAA4D;IAC3E,aAAa,sCAAyD;IACtE,yBAAyB,oDAAuE;IAChG,sBAAsB,gDAAmE;IACzF,sBAAsB,gDAAmE;IACzF,iBAAiB,2CAA8D;IAC/E,oBAAoB,8CAAiE;CACtF;AAED,oBAAY,aAAa;IACvB,iBAAiB,wBAAwB;IACzC,sBAAsB,6BAA6B;IACnD,iBAAiB,uBAAuB;CACzC;AAED,oBAAY,WAAW;IACrB,eAAe,sBAAsB;IACrC,mBAAmB,0BAA0B;IAC7C,UAAU,2BAA2B;IACrC,oBAAoB,0BAA0B;IAC9C,qBAAqB,sCAAsC;CAC5D;AAED;;;;GAIG;AACH,oBAAY,2BAA2B;IACrC,QAAQ,cAAc;IACtB,SAAS,eAAe;IACxB,eAAe,qBAAqB;IACpC,OAAO,YAAY;CACpB;AAED,oBAAY,iBAAiB;IAC3B,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAClB,UAAU,QAAQ;IAElB,GAAG,QAAQ;CACZ;AAED,oBAAY,iBAAiB;IAC3B;;OAEG;IACH,aAAa,kBAAkB;IAC/B,aAAa,kBAAkB;CAChC;AAED,oBAAY,eAAe;IACzB,MAAM,iBAAiB;IACvB,UAAU,eAAe;CAC1B"}
@@ -8,6 +8,7 @@ export var UnifiedSwapBridgeEventName;
8
8
  UnifiedSwapBridgeEventName["ButtonClicked"] = "Unified SwapBridge Button Clicked";
9
9
  UnifiedSwapBridgeEventName["PageViewed"] = "Unified SwapBridge Page Viewed";
10
10
  UnifiedSwapBridgeEventName["InputChanged"] = "Unified SwapBridge Input Changed";
11
+ UnifiedSwapBridgeEventName["FiatCryptoToggleClicked"] = "Unified SwapBridge Fiat Crypto Toggle Clicked";
11
12
  UnifiedSwapBridgeEventName["InputSourceDestinationSwitched"] = "Unified SwapBridge Source Destination Switched";
12
13
  UnifiedSwapBridgeEventName["QuotesRequested"] = "Unified SwapBridge Quotes Requested";
13
14
  UnifiedSwapBridgeEventName["QuotesReceived"] = "Unified SwapBridge Quotes Received";