@metamask/bridge-controller 65.2.0 → 66.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -1
- package/dist/bridge-controller.cjs +1 -0
- package/dist/bridge-controller.cjs.map +1 -1
- package/dist/bridge-controller.d.cts +2 -2
- package/dist/bridge-controller.d.cts.map +1 -1
- package/dist/bridge-controller.d.mts +2 -2
- package/dist/bridge-controller.d.mts.map +1 -1
- package/dist/bridge-controller.mjs +1 -0
- package/dist/bridge-controller.mjs.map +1 -1
- package/dist/constants/bridge.cjs +2 -0
- package/dist/constants/bridge.cjs.map +1 -1
- package/dist/constants/bridge.d.cts +4 -1
- package/dist/constants/bridge.d.cts.map +1 -1
- package/dist/constants/bridge.d.mts +4 -1
- package/dist/constants/bridge.d.mts.map +1 -1
- package/dist/constants/bridge.mjs +2 -0
- package/dist/constants/bridge.mjs.map +1 -1
- package/dist/constants/chains.cjs +4 -1
- package/dist/constants/chains.cjs.map +1 -1
- package/dist/constants/chains.d.cts +3 -0
- package/dist/constants/chains.d.cts.map +1 -1
- package/dist/constants/chains.d.mts +3 -0
- package/dist/constants/chains.d.mts.map +1 -1
- package/dist/constants/chains.mjs +3 -0
- package/dist/constants/chains.mjs.map +1 -1
- package/dist/constants/tokens.cjs +5 -0
- package/dist/constants/tokens.cjs.map +1 -1
- package/dist/constants/tokens.d.cts +7 -0
- package/dist/constants/tokens.d.cts.map +1 -1
- package/dist/constants/tokens.d.mts +7 -0
- package/dist/constants/tokens.d.mts.map +1 -1
- package/dist/constants/tokens.mjs +5 -0
- package/dist/constants/tokens.mjs.map +1 -1
- package/dist/index.cjs +4 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/index.mjs.map +1 -1
- package/dist/selectors.cjs +36 -16
- package/dist/selectors.cjs.map +1 -1
- package/dist/selectors.d.cts +58 -58
- package/dist/selectors.d.cts.map +1 -1
- package/dist/selectors.d.mts +58 -58
- package/dist/selectors.d.mts.map +1 -1
- package/dist/selectors.mjs +36 -16
- package/dist/selectors.mjs.map +1 -1
- package/dist/types.cjs +1 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +2 -1
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +2 -1
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +1 -0
- package/dist/types.mjs.map +1 -1
- package/dist/utils/caip-formatters.cjs +4 -3
- package/dist/utils/caip-formatters.cjs.map +1 -1
- package/dist/utils/caip-formatters.mjs +6 -5
- package/dist/utils/caip-formatters.mjs.map +1 -1
- package/dist/utils/metrics/constants.cjs +8 -1
- package/dist/utils/metrics/constants.cjs.map +1 -1
- package/dist/utils/metrics/constants.d.cts +6 -1
- package/dist/utils/metrics/constants.d.cts.map +1 -1
- package/dist/utils/metrics/constants.d.mts +6 -1
- package/dist/utils/metrics/constants.d.mts.map +1 -1
- package/dist/utils/metrics/constants.mjs +7 -0
- package/dist/utils/metrics/constants.mjs.map +1 -1
- package/dist/utils/metrics/types.cjs.map +1 -1
- package/dist/utils/metrics/types.d.cts +7 -1
- package/dist/utils/metrics/types.d.cts.map +1 -1
- package/dist/utils/metrics/types.d.mts +7 -1
- package/dist/utils/metrics/types.d.mts.map +1 -1
- package/dist/utils/metrics/types.mjs.map +1 -1
- package/dist/utils/quote.cjs +6 -5
- package/dist/utils/quote.cjs.map +1 -1
- package/dist/utils/quote.d.cts +2 -2
- package/dist/utils/quote.d.cts.map +1 -1
- package/dist/utils/quote.d.mts +2 -2
- package/dist/utils/quote.d.mts.map +1 -1
- package/dist/utils/quote.mjs +6 -5
- package/dist/utils/quote.mjs.map +1 -1
- package/package.json +3 -3
package/dist/selectors.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.d.mts","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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCAtVvB,wBAAwB;;kCAEtB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuZnC,CAAC;AAEH,eAAO,MAAM,yCAAyC,UAC7C,cAAc,WAIR,CAAC;AAEhB,eAAO,MAAM,+BAA+B;8BAlahB,wBAAwB;;8BAEtB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAmab,WAAW,mCAAmC,CAAC,CAAC,CAAC,CAAC,6DAElD,WAAW,mCAAmC,CAAC,CAAC,CAAC,CAAC,6DAElD,WAAW,mCAAmC,CAAC,CAAC,CAAC,CAAC,4EAIlD,WAAW,mCAAmC,CAAC,CAAC,CAAC,CAAC;;;;;;;;CAuBzE,CAAC"}
|
package/dist/selectors.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/explicit-function-return-type */
|
|
1
2
|
import { AddressZero } from "@ethersproject/constants";
|
|
2
3
|
import { isStrictHexString } from "@metamask/utils";
|
|
3
4
|
import { BigNumber } from "bignumber.js";
|
|
@@ -127,12 +128,31 @@ export const selectIsAssetExchangeRateInState = (...params) => Boolean(getExchan
|
|
|
127
128
|
* Selects the gas fee estimates from the gas fee controller. All potential networks
|
|
128
129
|
* support EIP1559 gas fees so assume that gasFeeEstimates is of type GasFeeEstimates
|
|
129
130
|
*
|
|
131
|
+
* @param state - The state of the bridge controller and its dependency controllers
|
|
132
|
+
* @param state.gasFeeEstimatesByChainId - gasEstimates by Hex ChainId
|
|
133
|
+
* @param state.quotes - Fetched bridge/swap quotes
|
|
130
134
|
* @returns The gas fee estimates in decGWEI
|
|
131
135
|
*/
|
|
132
|
-
const selectBridgeFeesPerGas =
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
+
const selectBridgeFeesPerGas = createBridgeSelector([
|
|
137
|
+
(state) => state.gasFeeEstimatesByChainId,
|
|
138
|
+
(state) => state.quotes?.[0]?.quote.srcChainId,
|
|
139
|
+
], (gasFeeEstimatesByChainId, srcChainId) => {
|
|
140
|
+
if (!srcChainId) {
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
143
|
+
if (isNonEvmChainId(srcChainId)) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
// @ts-expect-error - all supported networks use this type of estimates
|
|
147
|
+
const gasFeeEstimates = gasFeeEstimatesByChainId?.[formatChainIdToHex(srcChainId)]?.gasFeeEstimates;
|
|
148
|
+
if (!gasFeeEstimates) {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
return {
|
|
152
|
+
estimatedBaseFeeInDecGwei: gasFeeEstimates.estimatedBaseFee,
|
|
153
|
+
feePerGasInDecGwei: gasFeeEstimates[BRIDGE_PREFERRED_GAS_ESTIMATE]?.suggestedMaxFeePerGas,
|
|
154
|
+
maxFeePerGasInDecGwei: gasFeeEstimates.high?.suggestedMaxFeePerGas,
|
|
155
|
+
};
|
|
136
156
|
});
|
|
137
157
|
// Selects cross-chain swap quotes including their metadata
|
|
138
158
|
const selectBridgeQuotesWithMetadata = createBridgeSelector([
|
|
@@ -156,17 +176,7 @@ const selectBridgeQuotesWithMetadata = createBridgeSelector([
|
|
|
156
176
|
const minToTokenAmount = calcToAmount(quote.quote.minDestTokenAmount, quote.quote.destAsset, destTokenExchangeRate);
|
|
157
177
|
const includedTxFees = calcIncludedTxFees(quote.quote, srcTokenExchangeRate, destTokenExchangeRate);
|
|
158
178
|
let totalEstimatedNetworkFee, totalMaxNetworkFee, relayerFee, gasFee;
|
|
159
|
-
if (
|
|
160
|
-
// Use the new generic function for all non-EVM chains
|
|
161
|
-
totalEstimatedNetworkFee = calcNonEvmTotalNetworkFee(quote, nativeExchangeRate);
|
|
162
|
-
gasFee = {
|
|
163
|
-
effective: totalEstimatedNetworkFee,
|
|
164
|
-
total: totalEstimatedNetworkFee,
|
|
165
|
-
max: totalEstimatedNetworkFee,
|
|
166
|
-
};
|
|
167
|
-
totalMaxNetworkFee = totalEstimatedNetworkFee;
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
179
|
+
if (isEvmQuoteResponse(quote)) {
|
|
170
180
|
relayerFee = calcRelayerFee(quote, nativeExchangeRate);
|
|
171
181
|
gasFee = calcEstimatedAndMaxTotalGasFee({
|
|
172
182
|
bridgeQuote: quote,
|
|
@@ -177,6 +187,16 @@ const selectBridgeQuotesWithMetadata = createBridgeSelector([
|
|
|
177
187
|
totalEstimatedNetworkFee = calcTotalEstimatedNetworkFee(gasFee, relayerFee);
|
|
178
188
|
totalMaxNetworkFee = calcTotalMaxNetworkFee(gasFee, relayerFee);
|
|
179
189
|
}
|
|
190
|
+
else {
|
|
191
|
+
// Use the new generic function for all non-EVM chains
|
|
192
|
+
totalEstimatedNetworkFee = calcNonEvmTotalNetworkFee(quote, nativeExchangeRate);
|
|
193
|
+
gasFee = {
|
|
194
|
+
effective: totalEstimatedNetworkFee,
|
|
195
|
+
total: totalEstimatedNetworkFee,
|
|
196
|
+
max: totalEstimatedNetworkFee,
|
|
197
|
+
};
|
|
198
|
+
totalMaxNetworkFee = totalEstimatedNetworkFee;
|
|
199
|
+
}
|
|
180
200
|
const adjustedReturn = calcAdjustedReturn(toTokenAmount, totalEstimatedNetworkFee, quote.quote);
|
|
181
201
|
const cost = calcCost(adjustedReturn, sentAmount);
|
|
182
202
|
return {
|
|
@@ -234,7 +254,7 @@ export const selectIsQuoteExpired = createBridgeSelector([
|
|
|
234
254
|
selectIsQuoteGoingToRefresh,
|
|
235
255
|
({ quotesLastFetched }) => quotesLastFetched,
|
|
236
256
|
selectQuoteRefreshRate,
|
|
237
|
-
(_,
|
|
257
|
+
(_, _ignoredParam, currentTimeInMs) => currentTimeInMs,
|
|
238
258
|
], (isQuoteGoingToRefresh, quotesLastFetched, refreshRate, currentTimeInMs) => Boolean(!isQuoteGoingToRefresh &&
|
|
239
259
|
quotesLastFetched &&
|
|
240
260
|
currentTimeInMs - quotesLastFetched > refreshRate));
|
package/dist/selectors.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"selectors.mjs","sourceRoot":"","sources":["../src/selectors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,iCAAiC;AAQvD,OAAO,EAAE,iBAAiB,EAAE,wBAAwB;AACpD,OAAO,EAAE,SAAS,EAAE,qBAAqB;;;AAEzC,OAAO,EACL,cAAc,IAAI,eAAe,EACjC,wBAAwB,IAAI,yBAAyB,EACtD,iBAAiB;AAElB,OAAO,EAAE,6BAA6B,EAAE,+BAA2B;AAQnE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,oBAAgB;AACnD,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EACf,eAAe,EAChB,2BAAuB;AACxB,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EACnB,oCAAgC;AACjC,OAAO,EAAE,mBAAmB,EAAE,kCAA8B;AAC5D,OAAO,EACL,kBAAkB,EAClB,QAAQ,EACR,8BAA8B,EAC9B,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,yBAAyB,EACzB,YAAY,EACZ,YAAY,EACZ,4BAA4B,EAC5B,sBAAsB,EACvB,0BAAsB;AACvB,OAAO,EAAE,4BAA4B,EAAE,6BAAyB;AAsBhE;;GAEG;AACH,MAAM,8BAA8B,GAClC,yBAAyB,CAAC,SAAS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J,CAAC,CACF,CAAC","sourcesContent":["import { AddressZero } from '@ethersproject/constants';\nimport type {\n CurrencyRateState,\n MultichainAssetsRatesControllerState,\n TokenRatesControllerState,\n} from '@metamask/assets-controllers';\nimport type { GasFeeEstimates } from '@metamask/gas-fee-controller';\nimport type { CaipAssetType } from '@metamask/utils';\nimport { isStrictHexString } from '@metamask/utils';\nimport { BigNumber } from 'bignumber.js';\nimport { orderBy } from 'lodash';\nimport {\n createSelector as createSelector_,\n createStructuredSelector as createStructuredSelector_,\n} from 'reselect';\n\nimport { BRIDGE_PREFERRED_GAS_ESTIMATE } from './constants/bridge';\nimport type {\n BridgeControllerState,\n ExchangeRate,\n GenericQuoteRequest,\n QuoteMetadata,\n QuoteResponse,\n} from './types';\nimport { RequestStatus, SortOrder } from './types';\nimport {\n getNativeAssetForChainId,\n isEvmQuoteResponse,\n isNativeAddress,\n isNonEvmChainId,\n} from './utils/bridge';\nimport {\n formatAddressToAssetId,\n formatChainIdToCaip,\n formatChainIdToHex,\n} from './utils/caip-formatters';\nimport { processFeatureFlags } from './utils/feature-flags';\nimport {\n calcAdjustedReturn,\n calcCost,\n calcEstimatedAndMaxTotalGasFee,\n calcIncludedTxFees,\n calcRelayerFee,\n calcSentAmount,\n calcNonEvmTotalNetworkFee,\n calcSwapRate,\n calcToAmount,\n calcTotalEstimatedNetworkFee,\n calcTotalMaxNetworkFee,\n} from './utils/quote';\nimport { getDefaultSlippagePercentage } from './utils/slippage';\n\n/**\n * The controller states that provide exchange rates\n */\ntype ExchangeRateControllerState = MultichainAssetsRatesControllerState &\n TokenRatesControllerState &\n CurrencyRateState &\n Pick<BridgeControllerState, 'assetExchangeRates'>;\n/**\n * The state of the bridge controller and all its dependency controllers\n */\ntype RemoteFeatureFlagControllerState = {\n remoteFeatureFlags: {\n bridgeConfig: unknown;\n };\n};\nexport type BridgeAppState = BridgeControllerState & {\n gasFeeEstimates: GasFeeEstimates;\n} & ExchangeRateControllerState & {\n participateInMetaMetrics: boolean;\n } & RemoteFeatureFlagControllerState;\n/**\n * Creates a structured selector for the bridge controller\n */\nconst createStructuredBridgeSelector =\n createStructuredSelector_.withTypes<BridgeAppState>();\n/**\n * Creates a typed selector for the bridge controller\n */\nconst createBridgeSelector = createSelector_.withTypes<BridgeAppState>();\n/**\n * Required parameters that clients must provide for the bridge quotes selector\n */\ntype BridgeQuotesClientParams = {\n sortOrder: SortOrder;\n selectedQuote: (QuoteResponse & QuoteMetadata) | null;\n};\n\nconst createFeatureFlagsSelector =\n createSelector_.withTypes<RemoteFeatureFlagControllerState>();\n\n/**\n * Selects the bridge feature flags\n *\n * @param state - The state of the bridge controller\n * @returns The bridge feature flags\n *\n * @example\n * ```ts\n * const featureFlags = useSelector(state => selectBridgeFeatureFlags(state));\n *\n * Or\n *\n * export const selectBridgeFeatureFlags = createSelector(\n * selectRemoteFeatureFlags,\n * (remoteFeatureFlags) =>\n * selectBridgeFeatureFlagsBase({\n * bridgeConfig: remoteFeatureFlags.bridgeConfig,\n * }),\n * );\n * ```\n */\nexport const selectBridgeFeatureFlags = createFeatureFlagsSelector(\n [(state) => state.remoteFeatureFlags.bridgeConfig],\n (bridgeConfig: unknown) => processFeatureFlags(bridgeConfig),\n);\n\nconst getExchangeRateByChainIdAndAddress = (\n exchangeRateSources: ExchangeRateControllerState,\n chainId?: GenericQuoteRequest['srcChainId'],\n address?: GenericQuoteRequest['srcTokenAddress'],\n): ExchangeRate => {\n if (!chainId || !address) {\n return {};\n }\n // TODO return usd exchange rate if user has opted into metrics\n const assetId = formatAddressToAssetId(address, chainId);\n if (!assetId) {\n return {};\n }\n\n const { assetExchangeRates, currencyRates, marketData, conversionRates } =\n exchangeRateSources;\n\n // If the asset exchange rate is available in the bridge controller, use it\n // This is defined if the token's rate is not available from the assets controllers\n const bridgeControllerRate =\n assetExchangeRates?.[assetId] ??\n assetExchangeRates?.[assetId.toLowerCase() as CaipAssetType];\n if (bridgeControllerRate?.exchangeRate) {\n return bridgeControllerRate;\n }\n // If the chain is a non-EVM chain, use the conversion rate from the multichain assets controller\n if (isNonEvmChainId(chainId)) {\n const multichainAssetExchangeRate = conversionRates?.[assetId];\n if (multichainAssetExchangeRate) {\n return {\n exchangeRate: multichainAssetExchangeRate.rate,\n usdExchangeRate: undefined,\n };\n }\n return {};\n }\n // If the chain is an EVM chain, use the conversion rate from the currency rates controller\n if (isNativeAddress(address)) {\n const { symbol } = getNativeAssetForChainId(chainId);\n const evmNativeExchangeRate = currencyRates?.[symbol];\n if (evmNativeExchangeRate) {\n return {\n exchangeRate: evmNativeExchangeRate?.conversionRate?.toString(),\n usdExchangeRate: evmNativeExchangeRate?.usdConversionRate?.toString(),\n };\n }\n return {};\n }\n // If the chain is an EVM chain and the asset is not the native asset, use the conversion rate from the token rates controller\n if (!isNonEvmChainId(chainId)) {\n const evmTokenExchangeRates = marketData?.[formatChainIdToHex(chainId)];\n const evmTokenExchangeRateForAddress = isStrictHexString(address)\n ? evmTokenExchangeRates?.[address]\n : null;\n const nativeCurrencyRate = evmTokenExchangeRateForAddress\n ? currencyRates[evmTokenExchangeRateForAddress?.currency]\n : undefined;\n if (evmTokenExchangeRateForAddress && nativeCurrencyRate) {\n return {\n exchangeRate: new BigNumber(evmTokenExchangeRateForAddress.price)\n .multipliedBy(nativeCurrencyRate.conversionRate ?? 0)\n .toString(),\n usdExchangeRate: new BigNumber(evmTokenExchangeRateForAddress.price)\n .multipliedBy(nativeCurrencyRate.usdConversionRate ?? 0)\n .toString(),\n };\n }\n }\n\n return {};\n};\n\n/**\n * Selects the asset exchange rate for a given chain and address\n *\n * @param state The state of the bridge controller and its dependency controllers\n * @param chainId The chain ID of the asset\n * @param address The address of the asset\n * @returns The asset exchange rate for the given chain and address\n */\nexport const selectExchangeRateByChainIdAndAddress = (\n state: BridgeAppState,\n chainId?: GenericQuoteRequest['srcChainId'],\n address?: GenericQuoteRequest['srcTokenAddress'],\n) => {\n return getExchangeRateByChainIdAndAddress(state, chainId, address);\n};\n\n/**\n * Checks whether an exchange rate is available for a given chain and address\n *\n * @param params The parameters to pass to {@link getExchangeRateByChainIdAndAddress}\n * @returns Whether an exchange rate is available for the given chain and address\n */\nexport const selectIsAssetExchangeRateInState = (\n ...params: Parameters<typeof getExchangeRateByChainIdAndAddress>\n) =>\n Boolean(getExchangeRateByChainIdAndAddress(...params)?.exchangeRate) &&\n Boolean(getExchangeRateByChainIdAndAddress(...params)?.usdExchangeRate);\n\n/**\n * Selects the gas fee estimates from the gas fee controller. All potential networks\n * support EIP1559 gas fees so assume that gasFeeEstimates is of type GasFeeEstimates\n *\n * @returns The gas fee estimates in decGWEI\n */\nconst selectBridgeFeesPerGas = createStructuredBridgeSelector({\n estimatedBaseFeeInDecGwei: ({ gasFeeEstimates }) =>\n gasFeeEstimates?.estimatedBaseFee,\n feePerGasInDecGwei: ({ gasFeeEstimates }) =>\n gasFeeEstimates?.[BRIDGE_PREFERRED_GAS_ESTIMATE]?.suggestedMaxFeePerGas,\n maxFeePerGasInDecGwei: ({ gasFeeEstimates }) =>\n gasFeeEstimates?.high?.suggestedMaxFeePerGas,\n});\n\n// Selects cross-chain swap quotes including their metadata\nconst selectBridgeQuotesWithMetadata = createBridgeSelector(\n [\n ({ quotes }) => quotes,\n selectBridgeFeesPerGas,\n createBridgeSelector(\n [\n (state) => state,\n ({ quoteRequest: { srcChainId } }) => srcChainId,\n ({ quoteRequest: { srcTokenAddress } }) => srcTokenAddress,\n ],\n selectExchangeRateByChainIdAndAddress,\n ),\n createBridgeSelector(\n [\n (state) => state,\n ({ quoteRequest: { destChainId } }) => destChainId,\n ({ quoteRequest: { destTokenAddress } }) => destTokenAddress,\n ],\n selectExchangeRateByChainIdAndAddress,\n ),\n createBridgeSelector(\n [(state) => state, ({ quoteRequest: { srcChainId } }) => srcChainId],\n (state, chainId) =>\n selectExchangeRateByChainIdAndAddress(state, chainId, AddressZero),\n ),\n ],\n (\n quotes,\n bridgeFeesPerGas,\n srcTokenExchangeRate,\n destTokenExchangeRate,\n nativeExchangeRate,\n ) => {\n const newQuotes = quotes.map((quote) => {\n const sentAmount = calcSentAmount(quote.quote, srcTokenExchangeRate);\n const toTokenAmount = calcToAmount(\n quote.quote.destTokenAmount,\n quote.quote.destAsset,\n destTokenExchangeRate,\n );\n const minToTokenAmount = calcToAmount(\n quote.quote.minDestTokenAmount,\n quote.quote.destAsset,\n destTokenExchangeRate,\n );\n\n const includedTxFees = calcIncludedTxFees(\n quote.quote,\n srcTokenExchangeRate,\n destTokenExchangeRate,\n );\n\n let totalEstimatedNetworkFee,\n totalMaxNetworkFee,\n relayerFee,\n gasFee: QuoteMetadata['gasFee'];\n\n if (!isEvmQuoteResponse(quote)) {\n // Use the new generic function for all non-EVM chains\n totalEstimatedNetworkFee = calcNonEvmTotalNetworkFee(\n quote,\n nativeExchangeRate,\n );\n gasFee = {\n effective: totalEstimatedNetworkFee,\n total: totalEstimatedNetworkFee,\n max: totalEstimatedNetworkFee,\n };\n totalMaxNetworkFee = totalEstimatedNetworkFee;\n } else {\n relayerFee = calcRelayerFee(quote, nativeExchangeRate);\n gasFee = calcEstimatedAndMaxTotalGasFee({\n bridgeQuote: quote,\n ...bridgeFeesPerGas,\n ...nativeExchangeRate,\n });\n // Uses effectiveGasFee to calculate the total estimated network fee\n totalEstimatedNetworkFee = calcTotalEstimatedNetworkFee(\n gasFee,\n relayerFee,\n );\n totalMaxNetworkFee = calcTotalMaxNetworkFee(gasFee, relayerFee);\n }\n\n const adjustedReturn = calcAdjustedReturn(\n toTokenAmount,\n totalEstimatedNetworkFee,\n quote.quote,\n );\n const cost = calcCost(adjustedReturn, sentAmount);\n\n return {\n ...quote,\n // QuoteMetadata fields\n sentAmount,\n toTokenAmount,\n minToTokenAmount,\n swapRate: calcSwapRate(sentAmount.amount, toTokenAmount.amount),\n /**\n This is the amount required to submit the transactions\n Includes the relayer fee or other native fees\n Should be used for balance checks and tx submission.\n */\n totalNetworkFee: totalEstimatedNetworkFee,\n totalMaxNetworkFee,\n /**\n This contains gas fee estimates for the bridge transaction\n Does not include the relayer fee (if needed), just the gasLimit and effectiveGas returned by the bridge API\n Should only be used for display purposes.\n */\n gasFee,\n adjustedReturn,\n cost,\n includedTxFees,\n };\n });\n\n return newQuotes;\n },\n);\n\nconst selectSortedBridgeQuotes = createBridgeSelector(\n [\n selectBridgeQuotesWithMetadata,\n (_, { sortOrder }: BridgeQuotesClientParams) => sortOrder,\n ],\n (quotesWithMetadata, sortOrder): (QuoteResponse & QuoteMetadata)[] => {\n switch (sortOrder) {\n case SortOrder.ETA_ASC:\n return orderBy(\n quotesWithMetadata,\n (quote) => quote.estimatedProcessingTimeInSeconds,\n 'asc',\n );\n default:\n return orderBy(\n quotesWithMetadata,\n ({ cost }) =>\n cost.valueInCurrency ? Number(cost.valueInCurrency) : 0,\n 'asc',\n );\n }\n },\n);\n\nconst selectRecommendedQuote = createBridgeSelector(\n [selectSortedBridgeQuotes],\n (quotes) => (quotes.length > 0 ? quotes[0] : null),\n);\n\nconst selectActiveQuote = createBridgeSelector(\n [\n selectRecommendedQuote,\n (_, { selectedQuote }: BridgeQuotesClientParams) => selectedQuote,\n ],\n (recommendedQuote, selectedQuote) => selectedQuote ?? recommendedQuote,\n);\n\nconst selectIsQuoteGoingToRefresh = createBridgeSelector(\n [\n selectBridgeFeatureFlags,\n (state) => state.quoteRequest.insufficientBal,\n (state) => state.quotesRefreshCount,\n ],\n (featureFlags, insufficientBal, quotesRefreshCount) =>\n insufficientBal ? false : featureFlags.maxRefreshCount > quotesRefreshCount,\n);\n\nconst selectQuoteRefreshRate = createBridgeSelector(\n [selectBridgeFeatureFlags, (state) => state.quoteRequest.srcChainId],\n (featureFlags, srcChainId) =>\n (srcChainId\n ? featureFlags.chains[formatChainIdToCaip(srcChainId)]?.refreshRate\n : featureFlags.refreshRate) ?? featureFlags.refreshRate,\n);\n\nexport const selectIsQuoteExpired = createBridgeSelector(\n [\n selectIsQuoteGoingToRefresh,\n ({ quotesLastFetched }) => quotesLastFetched,\n selectQuoteRefreshRate,\n (_, __, currentTimeInMs: number) => currentTimeInMs,\n ],\n (isQuoteGoingToRefresh, quotesLastFetched, refreshRate, currentTimeInMs) =>\n Boolean(\n !isQuoteGoingToRefresh &&\n quotesLastFetched &&\n currentTimeInMs - quotesLastFetched > refreshRate,\n ),\n);\n\n/**\n * Selects sorted cross-chain swap quotes. By default, the quotes are sorted by cost in ascending order.\n *\n * @param state - The state of the bridge controller and its dependency controllers\n * @param sortOrder - The sort order of the quotes\n * @param selectedQuote - The quote that is currently selected by the user, should be cleared by clients when the req params change\n * @returns The activeQuote, recommendedQuote, sortedQuotes, and other quote fetching metadata\n *\n * @example\n * ```ts\n * const quotes = useSelector(state => selectBridgeQuotes(\n * { ...state.metamask, bridgeConfig: remoteFeatureFlags.bridgeConfig },\n * {\n * sortOrder: state.bridge.sortOrder,\n * selectedQuote: state.bridge.selectedQuote,\n * }\n * ));\n * ```\n */\nexport const selectBridgeQuotes = createStructuredBridgeSelector({\n sortedQuotes: selectSortedBridgeQuotes,\n recommendedQuote: selectRecommendedQuote,\n activeQuote: selectActiveQuote,\n quotesLastFetchedMs: (state) => state.quotesLastFetched,\n isLoading: (state) => state.quotesLoadingStatus === RequestStatus.LOADING,\n quoteFetchError: (state) => state.quoteFetchError,\n quotesRefreshCount: (state) => state.quotesRefreshCount,\n quotesInitialLoadTimeMs: (state) => state.quotesInitialLoadTime,\n isQuoteGoingToRefresh: selectIsQuoteGoingToRefresh,\n});\n\nexport const selectMinimumBalanceForRentExemptionInSOL = (\n state: BridgeAppState,\n) =>\n new BigNumber(state.minimumBalanceForRentExemptionInLamports ?? 0)\n .div(10 ** 9)\n .toString();\n\nexport const selectDefaultSlippagePercentage = createBridgeSelector(\n [\n (state) => selectBridgeFeatureFlags(state).chains,\n (_, slippageParams: Parameters<typeof getDefaultSlippagePercentage>[0]) =>\n slippageParams.srcTokenAddress,\n (_, slippageParams: Parameters<typeof getDefaultSlippagePercentage>[0]) =>\n slippageParams.destTokenAddress,\n (_, slippageParams: Parameters<typeof getDefaultSlippagePercentage>[0]) =>\n slippageParams.srcChainId\n ? formatChainIdToCaip(slippageParams.srcChainId)\n : undefined,\n (_, slippageParams: Parameters<typeof getDefaultSlippagePercentage>[0]) =>\n slippageParams.destChainId\n ? formatChainIdToCaip(slippageParams.destChainId)\n : undefined,\n ],\n (\n featureFlagsByChain,\n srcTokenAddress,\n destTokenAddress,\n srcChainId,\n destChainId,\n ) => {\n return getDefaultSlippagePercentage(\n {\n srcTokenAddress,\n destTokenAddress,\n srcChainId,\n destChainId,\n },\n srcChainId ? featureFlagsByChain[srcChainId]?.stablecoins : undefined,\n destChainId ? featureFlagsByChain[destChainId]?.stablecoins : undefined,\n );\n },\n);\n"]}
|
|
1
|
+
{"version":3,"file":"selectors.mjs","sourceRoot":"","sources":["../src/selectors.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,OAAO,EAAE,WAAW,EAAE,iCAAiC;AAWvD,OAAO,EAAE,iBAAiB,EAAE,wBAAwB;AACpD,OAAO,EAAE,SAAS,EAAE,qBAAqB;;;AAEzC,OAAO,EACL,cAAc,IAAI,eAAe,EACjC,wBAAwB,IAAI,yBAAyB,EACtD,iBAAiB;AAElB,OAAO,EAAE,6BAA6B,EAAE,+BAA2B;AAQnE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,oBAAgB;AACnD,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,eAAe,EACf,eAAe,EAChB,2BAAuB;AACxB,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EACnB,oCAAgC;AACjC,OAAO,EAAE,mBAAmB,EAAE,kCAA8B;AAC5D,OAAO,EACL,kBAAkB,EAClB,QAAQ,EACR,8BAA8B,EAC9B,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,yBAAyB,EACzB,YAAY,EACZ,YAAY,EACZ,4BAA4B,EAC5B,sBAAsB,EACvB,0BAAsB;AACvB,OAAO,EAAE,4BAA4B,EAAE,6BAAyB;AAsBhE;;GAEG;AACH,MAAM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,CACxE,cAAc,CAAC,WAAW;QACxB,CAAC,CAAC,mBAAmB,CAAC,cAAc,CAAC,WAAW,CAAC;QACjD,CAAC,CAAC,SAAS;CAChB,EACD,CACE,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,WAAW,EACX,EAAE;IACF,OAAO,4BAA4B,CACjC;QACE,eAAe;QACf,gBAAgB;QAChB,UAAU;QACV,WAAW;KACZ,EACD,UAAU,CAAC,CAAC,CAAC,mBAAmB,CAAC,UAAU,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,SAAS,EACrE,WAAW,CAAC,CAAC,CAAC,mBAAmB,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC,CAAC,SAAS,CACxE,CAAC;AACJ,CAAC,CACF,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-function-return-type */\nimport { AddressZero } from '@ethersproject/constants';\nimport type {\n CurrencyRateState,\n MultichainAssetsRatesControllerState,\n TokenRatesControllerState,\n} from '@metamask/assets-controllers';\nimport type {\n GasFeeEstimates,\n GasFeeEstimatesByChainId,\n} from '@metamask/gas-fee-controller';\nimport type { CaipAssetType } from '@metamask/utils';\nimport { isStrictHexString } from '@metamask/utils';\nimport { BigNumber } from 'bignumber.js';\nimport { orderBy } from 'lodash';\nimport {\n createSelector as createSelector_,\n createStructuredSelector as createStructuredSelector_,\n} from 'reselect';\n\nimport { BRIDGE_PREFERRED_GAS_ESTIMATE } from './constants/bridge';\nimport type {\n BridgeControllerState,\n ExchangeRate,\n GenericQuoteRequest,\n QuoteMetadata,\n QuoteResponse,\n} from './types';\nimport { RequestStatus, SortOrder } from './types';\nimport {\n getNativeAssetForChainId,\n isEvmQuoteResponse,\n isNativeAddress,\n isNonEvmChainId,\n} from './utils/bridge';\nimport {\n formatAddressToAssetId,\n formatChainIdToCaip,\n formatChainIdToHex,\n} from './utils/caip-formatters';\nimport { processFeatureFlags } from './utils/feature-flags';\nimport {\n calcAdjustedReturn,\n calcCost,\n calcEstimatedAndMaxTotalGasFee,\n calcIncludedTxFees,\n calcRelayerFee,\n calcSentAmount,\n calcNonEvmTotalNetworkFee,\n calcSwapRate,\n calcToAmount,\n calcTotalEstimatedNetworkFee,\n calcTotalMaxNetworkFee,\n} from './utils/quote';\nimport { getDefaultSlippagePercentage } from './utils/slippage';\n\n/**\n * The controller states that provide exchange rates\n */\ntype ExchangeRateControllerState = MultichainAssetsRatesControllerState &\n TokenRatesControllerState &\n CurrencyRateState &\n Pick<BridgeControllerState, 'assetExchangeRates'>;\n/**\n * The state of the bridge controller and all its dependency controllers\n */\ntype RemoteFeatureFlagControllerState = {\n remoteFeatureFlags: {\n bridgeConfig: unknown;\n };\n};\nexport type BridgeAppState = BridgeControllerState & {\n gasFeeEstimatesByChainId: GasFeeEstimatesByChainId;\n} & ExchangeRateControllerState & {\n participateInMetaMetrics: boolean;\n } & RemoteFeatureFlagControllerState;\n/**\n * Creates a structured selector for the bridge controller\n */\nconst createStructuredBridgeSelector =\n createStructuredSelector_.withTypes<BridgeAppState>();\n/**\n * Creates a typed selector for the bridge controller\n */\nconst createBridgeSelector = createSelector_.withTypes<BridgeAppState>();\n/**\n * Required parameters that clients must provide for the bridge quotes selector\n */\ntype BridgeQuotesClientParams = {\n sortOrder: SortOrder;\n selectedQuote: (QuoteResponse & QuoteMetadata) | null;\n};\n\nconst createFeatureFlagsSelector =\n createSelector_.withTypes<RemoteFeatureFlagControllerState>();\n\n/**\n * Selects the bridge feature flags\n *\n * @param state - The state of the bridge controller\n * @returns The bridge feature flags\n *\n * @example\n * ```ts\n * const featureFlags = useSelector(state => selectBridgeFeatureFlags(state));\n *\n * Or\n *\n * export const selectBridgeFeatureFlags = createSelector(\n * selectRemoteFeatureFlags,\n * (remoteFeatureFlags) =>\n * selectBridgeFeatureFlagsBase({\n * bridgeConfig: remoteFeatureFlags.bridgeConfig,\n * }),\n * );\n * ```\n */\nexport const selectBridgeFeatureFlags = createFeatureFlagsSelector(\n [(state) => state.remoteFeatureFlags.bridgeConfig],\n (bridgeConfig: unknown) => processFeatureFlags(bridgeConfig),\n);\n\nconst getExchangeRateByChainIdAndAddress = (\n exchangeRateSources: ExchangeRateControllerState,\n chainId?: GenericQuoteRequest['srcChainId'],\n address?: GenericQuoteRequest['srcTokenAddress'],\n): ExchangeRate => {\n if (!chainId || !address) {\n return {};\n }\n // TODO return usd exchange rate if user has opted into metrics\n const assetId = formatAddressToAssetId(address, chainId);\n if (!assetId) {\n return {};\n }\n\n const { assetExchangeRates, currencyRates, marketData, conversionRates } =\n exchangeRateSources;\n\n // If the asset exchange rate is available in the bridge controller, use it\n // This is defined if the token's rate is not available from the assets controllers\n const bridgeControllerRate =\n assetExchangeRates?.[assetId] ??\n assetExchangeRates?.[assetId.toLowerCase() as CaipAssetType];\n if (bridgeControllerRate?.exchangeRate) {\n return bridgeControllerRate;\n }\n // If the chain is a non-EVM chain, use the conversion rate from the multichain assets controller\n if (isNonEvmChainId(chainId)) {\n const multichainAssetExchangeRate = conversionRates?.[assetId];\n if (multichainAssetExchangeRate) {\n return {\n exchangeRate: multichainAssetExchangeRate.rate,\n usdExchangeRate: undefined,\n };\n }\n return {};\n }\n // If the chain is an EVM chain, use the conversion rate from the currency rates controller\n if (isNativeAddress(address)) {\n const { symbol } = getNativeAssetForChainId(chainId);\n const evmNativeExchangeRate = currencyRates?.[symbol];\n if (evmNativeExchangeRate) {\n return {\n exchangeRate: evmNativeExchangeRate?.conversionRate?.toString(),\n usdExchangeRate: evmNativeExchangeRate?.usdConversionRate?.toString(),\n };\n }\n return {};\n }\n // If the chain is an EVM chain and the asset is not the native asset, use the conversion rate from the token rates controller\n if (!isNonEvmChainId(chainId)) {\n const evmTokenExchangeRates = marketData?.[formatChainIdToHex(chainId)];\n const evmTokenExchangeRateForAddress = isStrictHexString(address)\n ? evmTokenExchangeRates?.[address]\n : null;\n const nativeCurrencyRate = evmTokenExchangeRateForAddress\n ? currencyRates[evmTokenExchangeRateForAddress?.currency]\n : undefined;\n if (evmTokenExchangeRateForAddress && nativeCurrencyRate) {\n return {\n exchangeRate: new BigNumber(evmTokenExchangeRateForAddress.price)\n .multipliedBy(nativeCurrencyRate.conversionRate ?? 0)\n .toString(),\n usdExchangeRate: new BigNumber(evmTokenExchangeRateForAddress.price)\n .multipliedBy(nativeCurrencyRate.usdConversionRate ?? 0)\n .toString(),\n };\n }\n }\n\n return {};\n};\n\n/**\n * Selects the asset exchange rate for a given chain and address\n *\n * @param state The state of the bridge controller and its dependency controllers\n * @param chainId The chain ID of the asset\n * @param address The address of the asset\n * @returns The asset exchange rate for the given chain and address\n */\nexport const selectExchangeRateByChainIdAndAddress = (\n state: BridgeAppState,\n chainId?: GenericQuoteRequest['srcChainId'],\n address?: GenericQuoteRequest['srcTokenAddress'],\n) => {\n return getExchangeRateByChainIdAndAddress(state, chainId, address);\n};\n\n/**\n * Checks whether an exchange rate is available for a given chain and address\n *\n * @param params The parameters to pass to {@link getExchangeRateByChainIdAndAddress}\n * @returns Whether an exchange rate is available for the given chain and address\n */\nexport const selectIsAssetExchangeRateInState = (\n ...params: Parameters<typeof getExchangeRateByChainIdAndAddress>\n) =>\n Boolean(getExchangeRateByChainIdAndAddress(...params)?.exchangeRate) &&\n Boolean(getExchangeRateByChainIdAndAddress(...params)?.usdExchangeRate);\n\n/**\n * Selects the gas fee estimates from the gas fee controller. All potential networks\n * support EIP1559 gas fees so assume that gasFeeEstimates is of type GasFeeEstimates\n *\n * @param state - The state of the bridge controller and its dependency controllers\n * @param state.gasFeeEstimatesByChainId - gasEstimates by Hex ChainId\n * @param state.quotes - Fetched bridge/swap quotes\n * @returns The gas fee estimates in decGWEI\n */\nconst selectBridgeFeesPerGas = createBridgeSelector(\n [\n (state) => state.gasFeeEstimatesByChainId,\n (state) => state.quotes?.[0]?.quote.srcChainId,\n ],\n (gasFeeEstimatesByChainId, srcChainId) => {\n if (!srcChainId) {\n return null;\n }\n if (isNonEvmChainId(srcChainId)) {\n return null;\n }\n // @ts-expect-error - all supported networks use this type of estimates\n const gasFeeEstimates: GasFeeEstimates | undefined =\n gasFeeEstimatesByChainId?.[\n formatChainIdToHex(srcChainId) as keyof typeof gasFeeEstimatesByChainId\n ]?.gasFeeEstimates;\n if (!gasFeeEstimates) {\n return null;\n }\n return {\n estimatedBaseFeeInDecGwei: gasFeeEstimates.estimatedBaseFee,\n feePerGasInDecGwei:\n gasFeeEstimates[BRIDGE_PREFERRED_GAS_ESTIMATE]?.suggestedMaxFeePerGas,\n maxFeePerGasInDecGwei: gasFeeEstimates.high?.suggestedMaxFeePerGas,\n };\n },\n);\n\n// Selects cross-chain swap quotes including their metadata\nconst selectBridgeQuotesWithMetadata = createBridgeSelector(\n [\n ({ quotes }) => quotes,\n selectBridgeFeesPerGas,\n createBridgeSelector(\n [\n (state) => state,\n ({ quoteRequest: { srcChainId } }) => srcChainId,\n ({ quoteRequest: { srcTokenAddress } }) => srcTokenAddress,\n ],\n selectExchangeRateByChainIdAndAddress,\n ),\n createBridgeSelector(\n [\n (state) => state,\n ({ quoteRequest: { destChainId } }) => destChainId,\n ({ quoteRequest: { destTokenAddress } }) => destTokenAddress,\n ],\n selectExchangeRateByChainIdAndAddress,\n ),\n createBridgeSelector(\n [(state) => state, ({ quoteRequest: { srcChainId } }) => srcChainId],\n (state, chainId) =>\n selectExchangeRateByChainIdAndAddress(state, chainId, AddressZero),\n ),\n ],\n (\n quotes,\n bridgeFeesPerGas,\n srcTokenExchangeRate,\n destTokenExchangeRate,\n nativeExchangeRate,\n ) => {\n const newQuotes = quotes.map((quote) => {\n const sentAmount = calcSentAmount(quote.quote, srcTokenExchangeRate);\n const toTokenAmount = calcToAmount(\n quote.quote.destTokenAmount,\n quote.quote.destAsset,\n destTokenExchangeRate,\n );\n const minToTokenAmount = calcToAmount(\n quote.quote.minDestTokenAmount,\n quote.quote.destAsset,\n destTokenExchangeRate,\n );\n\n const includedTxFees = calcIncludedTxFees(\n quote.quote,\n srcTokenExchangeRate,\n destTokenExchangeRate,\n );\n\n let totalEstimatedNetworkFee,\n totalMaxNetworkFee,\n relayerFee,\n gasFee: QuoteMetadata['gasFee'];\n\n if (isEvmQuoteResponse(quote)) {\n relayerFee = calcRelayerFee(quote, nativeExchangeRate);\n gasFee = calcEstimatedAndMaxTotalGasFee({\n bridgeQuote: quote,\n ...bridgeFeesPerGas,\n ...nativeExchangeRate,\n });\n // Uses effectiveGasFee to calculate the total estimated network fee\n totalEstimatedNetworkFee = calcTotalEstimatedNetworkFee(\n gasFee,\n relayerFee,\n );\n totalMaxNetworkFee = calcTotalMaxNetworkFee(gasFee, relayerFee);\n } else {\n // Use the new generic function for all non-EVM chains\n totalEstimatedNetworkFee = calcNonEvmTotalNetworkFee(\n quote,\n nativeExchangeRate,\n );\n gasFee = {\n effective: totalEstimatedNetworkFee,\n total: totalEstimatedNetworkFee,\n max: totalEstimatedNetworkFee,\n };\n totalMaxNetworkFee = totalEstimatedNetworkFee;\n }\n\n const adjustedReturn = calcAdjustedReturn(\n toTokenAmount,\n totalEstimatedNetworkFee,\n quote.quote,\n );\n const cost = calcCost(adjustedReturn, sentAmount);\n\n return {\n ...quote,\n // QuoteMetadata fields\n sentAmount,\n toTokenAmount,\n minToTokenAmount,\n swapRate: calcSwapRate(sentAmount.amount, toTokenAmount.amount),\n /**\n This is the amount required to submit the transactions\n Includes the relayer fee or other native fees\n Should be used for balance checks and tx submission.\n */\n totalNetworkFee: totalEstimatedNetworkFee,\n totalMaxNetworkFee,\n /**\n This contains gas fee estimates for the bridge transaction\n Does not include the relayer fee (if needed), just the gasLimit and effectiveGas returned by the bridge API\n Should only be used for display purposes.\n */\n gasFee,\n adjustedReturn,\n cost,\n includedTxFees,\n };\n });\n\n return newQuotes;\n },\n);\n\nconst selectSortedBridgeQuotes = createBridgeSelector(\n [\n selectBridgeQuotesWithMetadata,\n (_, { sortOrder }: BridgeQuotesClientParams) => sortOrder,\n ],\n (quotesWithMetadata, sortOrder): (QuoteResponse & QuoteMetadata)[] => {\n switch (sortOrder) {\n case SortOrder.ETA_ASC:\n return orderBy(\n quotesWithMetadata,\n (quote) => quote.estimatedProcessingTimeInSeconds,\n 'asc',\n );\n default:\n return orderBy(\n quotesWithMetadata,\n ({ cost }) =>\n cost.valueInCurrency ? Number(cost.valueInCurrency) : 0,\n 'asc',\n );\n }\n },\n);\n\nconst selectRecommendedQuote = createBridgeSelector(\n [selectSortedBridgeQuotes],\n (quotes) => (quotes.length > 0 ? quotes[0] : null),\n);\n\nconst selectActiveQuote = createBridgeSelector(\n [\n selectRecommendedQuote,\n (_, { selectedQuote }: BridgeQuotesClientParams) => selectedQuote,\n ],\n (recommendedQuote, selectedQuote) => selectedQuote ?? recommendedQuote,\n);\n\nconst selectIsQuoteGoingToRefresh = createBridgeSelector(\n [\n selectBridgeFeatureFlags,\n (state) => state.quoteRequest.insufficientBal,\n (state) => state.quotesRefreshCount,\n ],\n (featureFlags, insufficientBal, quotesRefreshCount) =>\n insufficientBal ? false : featureFlags.maxRefreshCount > quotesRefreshCount,\n);\n\nconst selectQuoteRefreshRate = createBridgeSelector(\n [selectBridgeFeatureFlags, (state) => state.quoteRequest.srcChainId],\n (featureFlags, srcChainId) =>\n (srcChainId\n ? featureFlags.chains[formatChainIdToCaip(srcChainId)]?.refreshRate\n : featureFlags.refreshRate) ?? featureFlags.refreshRate,\n);\n\nexport const selectIsQuoteExpired = createBridgeSelector(\n [\n selectIsQuoteGoingToRefresh,\n ({ quotesLastFetched }) => quotesLastFetched,\n selectQuoteRefreshRate,\n (_, _ignoredParam, currentTimeInMs: number) => currentTimeInMs,\n ],\n (isQuoteGoingToRefresh, quotesLastFetched, refreshRate, currentTimeInMs) =>\n Boolean(\n !isQuoteGoingToRefresh &&\n quotesLastFetched &&\n currentTimeInMs - quotesLastFetched > refreshRate,\n ),\n);\n\n/**\n * Selects sorted cross-chain swap quotes. By default, the quotes are sorted by cost in ascending order.\n *\n * @param state - The state of the bridge controller and its dependency controllers\n * @param sortOrder - The sort order of the quotes\n * @param selectedQuote - The quote that is currently selected by the user, should be cleared by clients when the req params change\n * @returns The activeQuote, recommendedQuote, sortedQuotes, and other quote fetching metadata\n *\n * @example\n * ```ts\n * const quotes = useSelector(state => selectBridgeQuotes(\n * { ...state.metamask, bridgeConfig: remoteFeatureFlags.bridgeConfig },\n * {\n * sortOrder: state.bridge.sortOrder,\n * selectedQuote: state.bridge.selectedQuote,\n * }\n * ));\n * ```\n */\nexport const selectBridgeQuotes = createStructuredBridgeSelector({\n sortedQuotes: selectSortedBridgeQuotes,\n recommendedQuote: selectRecommendedQuote,\n activeQuote: selectActiveQuote,\n quotesLastFetchedMs: (state) => state.quotesLastFetched,\n isLoading: (state) => state.quotesLoadingStatus === RequestStatus.LOADING,\n quoteFetchError: (state) => state.quoteFetchError,\n quotesRefreshCount: (state) => state.quotesRefreshCount,\n quotesInitialLoadTimeMs: (state) => state.quotesInitialLoadTime,\n isQuoteGoingToRefresh: selectIsQuoteGoingToRefresh,\n});\n\nexport const selectMinimumBalanceForRentExemptionInSOL = (\n state: BridgeAppState,\n) =>\n new BigNumber(state.minimumBalanceForRentExemptionInLamports ?? 0)\n .div(10 ** 9)\n .toString();\n\nexport const selectDefaultSlippagePercentage = createBridgeSelector(\n [\n (state) => selectBridgeFeatureFlags(state).chains,\n (_, slippageParams: Parameters<typeof getDefaultSlippagePercentage>[0]) =>\n slippageParams.srcTokenAddress,\n (_, slippageParams: Parameters<typeof getDefaultSlippagePercentage>[0]) =>\n slippageParams.destTokenAddress,\n (_, slippageParams: Parameters<typeof getDefaultSlippagePercentage>[0]) =>\n slippageParams.srcChainId\n ? formatChainIdToCaip(slippageParams.srcChainId)\n : undefined,\n (_, slippageParams: Parameters<typeof getDefaultSlippagePercentage>[0]) =>\n slippageParams.destChainId\n ? formatChainIdToCaip(slippageParams.destChainId)\n : undefined,\n ],\n (\n featureFlagsByChain,\n srcTokenAddress,\n destTokenAddress,\n srcChainId,\n destChainId,\n ) => {\n return getDefaultSlippagePercentage(\n {\n srcTokenAddress,\n destTokenAddress,\n srcChainId,\n destChainId,\n },\n srcChainId ? featureFlagsByChain[srcChainId]?.stablecoins : undefined,\n destChainId ? featureFlagsByChain[destChainId]?.stablecoins : undefined,\n );\n },\n);\n"]}
|
package/dist/types.cjs
CHANGED
|
@@ -51,6 +51,7 @@ var ChainId;
|
|
|
51
51
|
ChainId[ChainId["SEI"] = 1329] = "SEI";
|
|
52
52
|
ChainId[ChainId["MONAD"] = 143] = "MONAD";
|
|
53
53
|
ChainId[ChainId["HYPEREVM"] = 999] = "HYPEREVM";
|
|
54
|
+
ChainId[ChainId["MEGAETH"] = 4326] = "MEGAETH";
|
|
54
55
|
})(ChainId || (exports.ChainId = ChainId = {}));
|
|
55
56
|
var RequestStatus;
|
|
56
57
|
(function (RequestStatus) {
|
package/dist/types.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAmDA;;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;AAmFD;;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;AAoDD,IAAY,OAgBX;AAhBD,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;AAChB,CAAC,EAhBW,OAAO,uBAAP,OAAO,QAgBlB;AAID,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,uDAAO,CAAA;IACP,uDAAO,CAAA;IACP,mDAAK,CAAA;AACP,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AACD,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,6DAAyC,CAAA;IACzC,0EAAsD,CAAA;AACxD,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AACD,IAAY,sBAMX;AAND,WAAY,sBAAsB;IAChC,8EAAoD,CAAA;IACpD,oDAA0B,CAAA;IAC1B,iFAAuD,CAAA;IACvD,0EAAgD,CAAA;IAChD,sDAA4B,CAAA;AAC9B,CAAC,EANW,sBAAsB,sCAAtB,sBAAsB,QAMjC","sourcesContent":["import type { AccountsControllerGetAccountByAddressAction } from '@metamask/accounts-controller';\nimport type {\n GetCurrencyRateState,\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 { RemoteFeatureFlagControllerGetStateAction } from '@metamask/remote-feature-flag-controller';\nimport type { HandleSnapRequest } 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 { BRIDGE_CONTROLLER_NAME } from './constants/bridge';\nimport type {\n BitcoinTradeDataSchema,\n BridgeAssetSchema,\n ChainConfigurationSchema,\n ChainRankingSchema,\n FeatureId,\n FeeDataSchema,\n IntentSchema,\n PlatformConfigSchema,\n ProtocolSchema,\n QuoteResponseSchema,\n QuoteSchema,\n StepSchema,\n TronTradeDataSchema,\n TxDataSchema,\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 \"1000000000000000000\"\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 */\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 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: toTokenAmount\n * Otherwise: toTokenAmount - totalNetworkFee\n */\n adjustedReturn: Omit<TokenAmountValues, 'amount'>;\n /**\n * The amount that the user will send, including fees\n * srcTokenAmount + metabridgeFee + txFee\n */\n sentAmount: TokenAmountValues;\n swapRate: string; // destTokenAmount / sentAmount\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\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 QuoteResponse<\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\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}\n\nexport type FeatureFlagsPlatformConfig = Infer<typeof PlatformConfigSchema>;\n\nexport enum RequestStatus {\n LOADING,\n FETCHED,\n ERROR,\n}\nexport enum BridgeUserAction {\n SELECT_DEST_NETWORK = 'selectDestNetwork',\n UPDATE_QUOTE_PARAMS = 'updateBridgeQuoteRequestParams',\n}\nexport enum BridgeBackgroundAction {\n SET_CHAIN_INTERVAL_LENGTH = 'setChainIntervalLength',\n RESET_STATE = 'resetState',\n TRACK_METAMETRICS_EVENT = 'trackUnifiedSwapBridgeEvent',\n STOP_POLLING_FOR_QUOTES = 'stopPollingForQuotes',\n FETCH_QUOTES = 'fetchQuotes',\n}\n\nexport type BridgeControllerState = {\n quoteRequest: Partial<GenericQuoteRequest>;\n quotes: (QuoteResponse & 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\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\n// Maps to BridgeController function names\nexport type BridgeControllerActions =\n | BridgeControllerGetStateAction\n | BridgeControllerAction<BridgeBackgroundAction.SET_CHAIN_INTERVAL_LENGTH>\n | BridgeControllerAction<BridgeBackgroundAction.RESET_STATE>\n | BridgeControllerAction<BridgeBackgroundAction.TRACK_METAMETRICS_EVENT>\n | BridgeControllerAction<BridgeBackgroundAction.STOP_POLLING_FOR_QUOTES>\n | BridgeControllerAction<BridgeBackgroundAction.FETCH_QUOTES>\n | BridgeControllerAction<BridgeUserAction.UPDATE_QUOTE_PARAMS>;\n\nexport type BridgeControllerEvents = BridgeControllerStateChangeEvent;\n\nexport type AllowedActions =\n | AccountsControllerGetAccountByAddressAction\n | GetCurrencyRateState\n | TokenRatesControllerGetStateAction\n | MultichainAssetsRatesControllerGetStateAction\n | HandleSnapRequest\n | NetworkControllerFindNetworkClientIdByChainIdAction\n | NetworkControllerGetNetworkClientByIdAction\n | RemoteFeatureFlagControllerGetStateAction;\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":";;;AAmDA;;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;AAmFD;;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;AAoDD,IAAY,OAiBX;AAjBD,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;AAChB,CAAC,EAjBW,OAAO,uBAAP,OAAO,QAiBlB;AAID,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,uDAAO,CAAA;IACP,uDAAO,CAAA;IACP,mDAAK,CAAA;AACP,CAAC,EAJW,aAAa,6BAAb,aAAa,QAIxB;AACD,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,6DAAyC,CAAA;IACzC,0EAAsD,CAAA;AACxD,CAAC,EAHW,gBAAgB,gCAAhB,gBAAgB,QAG3B;AACD,IAAY,sBAMX;AAND,WAAY,sBAAsB;IAChC,8EAAoD,CAAA;IACpD,oDAA0B,CAAA;IAC1B,iFAAuD,CAAA;IACvD,0EAAgD,CAAA;IAChD,sDAA4B,CAAA;AAC9B,CAAC,EANW,sBAAsB,sCAAtB,sBAAsB,QAMjC","sourcesContent":["import type { AccountsControllerGetAccountByAddressAction } from '@metamask/accounts-controller';\nimport type {\n GetCurrencyRateState,\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 { RemoteFeatureFlagControllerGetStateAction } from '@metamask/remote-feature-flag-controller';\nimport type { HandleSnapRequest } 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 { BRIDGE_CONTROLLER_NAME } from './constants/bridge';\nimport type {\n BitcoinTradeDataSchema,\n BridgeAssetSchema,\n ChainConfigurationSchema,\n ChainRankingSchema,\n FeatureId,\n FeeDataSchema,\n IntentSchema,\n PlatformConfigSchema,\n ProtocolSchema,\n QuoteResponseSchema,\n QuoteSchema,\n StepSchema,\n TronTradeDataSchema,\n TxDataSchema,\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 \"1000000000000000000\"\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 */\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 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: toTokenAmount\n * Otherwise: toTokenAmount - totalNetworkFee\n */\n adjustedReturn: Omit<TokenAmountValues, 'amount'>;\n /**\n * The amount that the user will send, including fees\n * srcTokenAmount + metabridgeFee + txFee\n */\n sentAmount: TokenAmountValues;\n swapRate: string; // destTokenAmount / sentAmount\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\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 QuoteResponse<\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\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}\n\nexport type FeatureFlagsPlatformConfig = Infer<typeof PlatformConfigSchema>;\n\nexport enum RequestStatus {\n LOADING,\n FETCHED,\n ERROR,\n}\nexport enum BridgeUserAction {\n SELECT_DEST_NETWORK = 'selectDestNetwork',\n UPDATE_QUOTE_PARAMS = 'updateBridgeQuoteRequestParams',\n}\nexport enum BridgeBackgroundAction {\n SET_CHAIN_INTERVAL_LENGTH = 'setChainIntervalLength',\n RESET_STATE = 'resetState',\n TRACK_METAMETRICS_EVENT = 'trackUnifiedSwapBridgeEvent',\n STOP_POLLING_FOR_QUOTES = 'stopPollingForQuotes',\n FETCH_QUOTES = 'fetchQuotes',\n}\n\nexport type BridgeControllerState = {\n quoteRequest: Partial<GenericQuoteRequest>;\n quotes: (QuoteResponse & 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\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\n// Maps to BridgeController function names\nexport type BridgeControllerActions =\n | BridgeControllerGetStateAction\n | BridgeControllerAction<BridgeBackgroundAction.SET_CHAIN_INTERVAL_LENGTH>\n | BridgeControllerAction<BridgeBackgroundAction.RESET_STATE>\n | BridgeControllerAction<BridgeBackgroundAction.TRACK_METAMETRICS_EVENT>\n | BridgeControllerAction<BridgeBackgroundAction.STOP_POLLING_FOR_QUOTES>\n | BridgeControllerAction<BridgeBackgroundAction.FETCH_QUOTES>\n | BridgeControllerAction<BridgeUserAction.UPDATE_QUOTE_PARAMS>;\n\nexport type BridgeControllerEvents = BridgeControllerStateChangeEvent;\n\nexport type AllowedActions =\n | AccountsControllerGetAccountByAddressAction\n | GetCurrencyRateState\n | TokenRatesControllerGetStateAction\n | MultichainAssetsRatesControllerGetStateAction\n | HandleSnapRequest\n | NetworkControllerFindNetworkClientIdByChainIdAction\n | NetworkControllerGetNetworkClientByIdAction\n | RemoteFeatureFlagControllerGetStateAction;\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
|
@@ -230,7 +230,8 @@ export declare enum ChainId {
|
|
|
230
230
|
TRON = 728126428,
|
|
231
231
|
SEI = 1329,
|
|
232
232
|
MONAD = 143,
|
|
233
|
-
HYPEREVM = 999
|
|
233
|
+
HYPEREVM = 999,
|
|
234
|
+
MEGAETH = 4326
|
|
234
235
|
}
|
|
235
236
|
export type FeatureFlagsPlatformConfig = Infer<typeof PlatformConfigSchema>;
|
|
236
237
|
export declare enum RequestStatus {
|
package/dist/types.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.cts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2CAA2C,EAAE,sCAAsC;AACjG,OAAO,KAAK,EACV,oBAAoB,EACpB,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,yCAAyC,EAAE,iDAAiD;AAC1G,OAAO,KAAK,EAAE,iBAAiB,EAAE,oCAAoC;AACrE,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,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
|
231
231
|
SEI = 1329,
|
|
232
232
|
MONAD = 143,
|
|
233
|
-
HYPEREVM = 999
|
|
233
|
+
HYPEREVM = 999,
|
|
234
|
+
MEGAETH = 4326
|
|
234
235
|
}
|
|
235
236
|
export type FeatureFlagsPlatformConfig = Infer<typeof PlatformConfigSchema>;
|
|
236
237
|
export declare enum RequestStatus {
|
package/dist/types.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2CAA2C,EAAE,sCAAsC;AACjG,OAAO,KAAK,EACV,oBAAoB,EACpB,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,yCAAyC,EAAE,iDAAiD;AAC1G,OAAO,KAAK,EAAE,iBAAiB,EAAE,oCAAoC;AACrE,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,sBAAsB,EAAE,+BAA2B;AACjE,OAAO,KAAK,EACV,sBAAsB,EACtB,iBAAiB,EACjB,wBAAwB,EACxB,kBAAkB,EAClB,SAAS,EACT,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,UAAU,EACV,mBAAmB,EACnB,YAAY,EACb,+BAA2B;AAE5B,MAAM,MAAM,aAAa,GAAG,CAC1B,KAAK,EAAE,WAAW,GAAG,GAAG,GA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AAgC,GAAG,0BAA0B,CACvE,OAAO,sBAAsB,EAC7B,qBAAqB,CACtB,CAAC;AAGF,MAAM,MAAM,uBAAuB,GAC/B,8BAA8B,GAC9B,sBAAsB,CAAC,sBAAsB,CAAC,yBAAyB,CAAC,GACxE,sBAAsB,CAAC,sBAAsB,CAAC,WAAW,CAAC,GAC1D,sBAAsB,CAAC,sBAAsB,CAAC,uBAAuB,CAAC,GACtE,sBAAsB,CAAC,sBAAsB,CAAC,uBAAuB,CAAC,GACtE,sBAAsB,CAAC,sBAAsB,CAAC,YAAY,CAAC,GAC3D,sBAAsB,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,CAAC;AAEjE,MAAM,MAAM,sBAAsB,GAAG,gCAAgC,CAAC;AAEtE,MAAM,MAAM,cAAc,GACtB,2CAA2C,GAC3C,oBAAoB,GACpB,kCAAkC,GAClC,6CAA6C,GAC7C,iBAAiB,GACjB,mDAAmD,GACnD,2CAA2C,GAC3C,yCAAyC,CAAC;AAC9C,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.mjs
CHANGED
|
@@ -48,6 +48,7 @@ export var ChainId;
|
|
|
48
48
|
ChainId[ChainId["SEI"] = 1329] = "SEI";
|
|
49
49
|
ChainId[ChainId["MONAD"] = 143] = "MONAD";
|
|
50
50
|
ChainId[ChainId["HYPEREVM"] = 999] = "HYPEREVM";
|
|
51
|
+
ChainId[ChainId["MEGAETH"] = 4326] = "MEGAETH";
|
|
51
52
|
})(ChainId || (ChainId = {}));
|
|
52
53
|
export var RequestStatus;
|
|
53
54
|
(function (RequestStatus) {
|
package/dist/types.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"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AAgB,KAAhB,gBAAgB,QAG3B;AACD,MAAM,CAAN,IAAY,sBAMX;AAND,WAAY,sBAAsB;IAChC,8EAAoD,CAAA;IACpD,oDAA0B,CAAA;IAC1B,iFAAuD,CAAA;IACvD,0EAAgD,CAAA;IAChD,sDAA4B,CAAA;AAC9B,CAAC,EANW,sBAAsB,KAAtB,sBAAsB,QAMjC","sourcesContent":["import type { AccountsControllerGetAccountByAddressAction } from '@metamask/accounts-controller';\nimport type {\n GetCurrencyRateState,\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 { RemoteFeatureFlagControllerGetStateAction } from '@metamask/remote-feature-flag-controller';\nimport type { HandleSnapRequest } 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 { BRIDGE_CONTROLLER_NAME } from './constants/bridge';\nimport type {\n BitcoinTradeDataSchema,\n BridgeAssetSchema,\n ChainConfigurationSchema,\n ChainRankingSchema,\n FeatureId,\n FeeDataSchema,\n IntentSchema,\n PlatformConfigSchema,\n ProtocolSchema,\n QuoteResponseSchema,\n QuoteSchema,\n StepSchema,\n TronTradeDataSchema,\n TxDataSchema,\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 \"1000000000000000000\"\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 */\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 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: toTokenAmount\n * Otherwise: toTokenAmount - totalNetworkFee\n */\n adjustedReturn: Omit<TokenAmountValues, 'amount'>;\n /**\n * The amount that the user will send, including fees\n * srcTokenAmount + metabridgeFee + txFee\n */\n sentAmount: TokenAmountValues;\n swapRate: string; // destTokenAmount / sentAmount\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\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 QuoteResponse<\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\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}\n\nexport type FeatureFlagsPlatformConfig = Infer<typeof PlatformConfigSchema>;\n\nexport enum RequestStatus {\n LOADING,\n FETCHED,\n ERROR,\n}\nexport enum BridgeUserAction {\n SELECT_DEST_NETWORK = 'selectDestNetwork',\n UPDATE_QUOTE_PARAMS = 'updateBridgeQuoteRequestParams',\n}\nexport enum BridgeBackgroundAction {\n SET_CHAIN_INTERVAL_LENGTH = 'setChainIntervalLength',\n RESET_STATE = 'resetState',\n TRACK_METAMETRICS_EVENT = 'trackUnifiedSwapBridgeEvent',\n STOP_POLLING_FOR_QUOTES = 'stopPollingForQuotes',\n FETCH_QUOTES = 'fetchQuotes',\n}\n\nexport type BridgeControllerState = {\n quoteRequest: Partial<GenericQuoteRequest>;\n quotes: (QuoteResponse & 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\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\n// Maps to BridgeController function names\nexport type BridgeControllerActions =\n | BridgeControllerGetStateAction\n | BridgeControllerAction<BridgeBackgroundAction.SET_CHAIN_INTERVAL_LENGTH>\n | BridgeControllerAction<BridgeBackgroundAction.RESET_STATE>\n | BridgeControllerAction<BridgeBackgroundAction.TRACK_METAMETRICS_EVENT>\n | BridgeControllerAction<BridgeBackgroundAction.STOP_POLLING_FOR_QUOTES>\n | BridgeControllerAction<BridgeBackgroundAction.FETCH_QUOTES>\n | BridgeControllerAction<BridgeUserAction.UPDATE_QUOTE_PARAMS>;\n\nexport type BridgeControllerEvents = BridgeControllerStateChangeEvent;\n\nexport type AllowedActions =\n | AccountsControllerGetAccountByAddressAction\n | GetCurrencyRateState\n | TokenRatesControllerGetStateAction\n | MultichainAssetsRatesControllerGetStateAction\n | HandleSnapRequest\n | NetworkControllerFindNetworkClientIdByChainIdAction\n | NetworkControllerGetNetworkClientByIdAction\n | RemoteFeatureFlagControllerGetStateAction;\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":"AAmDA;;GAEG;AACH,MAAM,CAAN,IAAY,SAYX;AAZD,W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,IAAY,sBAMX;AAND,WAAY,sBAAsB;IAChC,8EAAoD,CAAA;IACpD,oDAA0B,CAAA;IAC1B,iFAAuD,CAAA;IACvD,0EAAgD,CAAA;IAChD,sDAA4B,CAAA;AAC9B,CAAC,EANW,sBAAsB,KAAtB,sBAAsB,QAMjC","sourcesContent":["import type { AccountsControllerGetAccountByAddressAction } from '@metamask/accounts-controller';\nimport type {\n GetCurrencyRateState,\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 { RemoteFeatureFlagControllerGetStateAction } from '@metamask/remote-feature-flag-controller';\nimport type { HandleSnapRequest } 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 { BRIDGE_CONTROLLER_NAME } from './constants/bridge';\nimport type {\n BitcoinTradeDataSchema,\n BridgeAssetSchema,\n ChainConfigurationSchema,\n ChainRankingSchema,\n FeatureId,\n FeeDataSchema,\n IntentSchema,\n PlatformConfigSchema,\n ProtocolSchema,\n QuoteResponseSchema,\n QuoteSchema,\n StepSchema,\n TronTradeDataSchema,\n TxDataSchema,\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 \"1000000000000000000\"\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 */\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 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: toTokenAmount\n * Otherwise: toTokenAmount - totalNetworkFee\n */\n adjustedReturn: Omit<TokenAmountValues, 'amount'>;\n /**\n * The amount that the user will send, including fees\n * srcTokenAmount + metabridgeFee + txFee\n */\n sentAmount: TokenAmountValues;\n swapRate: string; // destTokenAmount / sentAmount\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\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 QuoteResponse<\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\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}\n\nexport type FeatureFlagsPlatformConfig = Infer<typeof PlatformConfigSchema>;\n\nexport enum RequestStatus {\n LOADING,\n FETCHED,\n ERROR,\n}\nexport enum BridgeUserAction {\n SELECT_DEST_NETWORK = 'selectDestNetwork',\n UPDATE_QUOTE_PARAMS = 'updateBridgeQuoteRequestParams',\n}\nexport enum BridgeBackgroundAction {\n SET_CHAIN_INTERVAL_LENGTH = 'setChainIntervalLength',\n RESET_STATE = 'resetState',\n TRACK_METAMETRICS_EVENT = 'trackUnifiedSwapBridgeEvent',\n STOP_POLLING_FOR_QUOTES = 'stopPollingForQuotes',\n FETCH_QUOTES = 'fetchQuotes',\n}\n\nexport type BridgeControllerState = {\n quoteRequest: Partial<GenericQuoteRequest>;\n quotes: (QuoteResponse & 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\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\n// Maps to BridgeController function names\nexport type BridgeControllerActions =\n | BridgeControllerGetStateAction\n | BridgeControllerAction<BridgeBackgroundAction.SET_CHAIN_INTERVAL_LENGTH>\n | BridgeControllerAction<BridgeBackgroundAction.RESET_STATE>\n | BridgeControllerAction<BridgeBackgroundAction.TRACK_METAMETRICS_EVENT>\n | BridgeControllerAction<BridgeBackgroundAction.STOP_POLLING_FOR_QUOTES>\n | BridgeControllerAction<BridgeBackgroundAction.FETCH_QUOTES>\n | BridgeControllerAction<BridgeUserAction.UPDATE_QUOTE_PARAMS>;\n\nexport type BridgeControllerEvents = BridgeControllerStateChangeEvent;\n\nexport type AllowedActions =\n | AccountsControllerGetAccountByAddressAction\n | GetCurrencyRateState\n | TokenRatesControllerGetStateAction\n | MultichainAssetsRatesControllerGetStateAction\n | HandleSnapRequest\n | NetworkControllerFindNetworkClientIdByChainIdAction\n | NetworkControllerGetNetworkClientByIdAction\n | RemoteFeatureFlagControllerGetStateAction;\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"]}
|