@metamask-previews/bridge-controller 63.2.0-preview-93df243 → 63.2.0-preview-159e76e4
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 +2 -16
- package/dist/bridge-controller.cjs +34 -60
- package/dist/bridge-controller.cjs.map +1 -1
- package/dist/bridge-controller.d.cts +8 -0
- package/dist/bridge-controller.d.cts.map +1 -1
- package/dist/bridge-controller.d.mts +8 -0
- package/dist/bridge-controller.d.mts.map +1 -1
- package/dist/bridge-controller.mjs +36 -62
- package/dist/bridge-controller.mjs.map +1 -1
- package/dist/constants/swaps.cjs +58 -57
- package/dist/constants/swaps.cjs.map +1 -1
- package/dist/constants/swaps.d.cts +1 -0
- package/dist/constants/swaps.d.cts.map +1 -1
- package/dist/constants/swaps.d.mts +1 -0
- package/dist/constants/swaps.d.mts.map +1 -1
- package/dist/constants/swaps.mjs +7 -6
- package/dist/constants/swaps.mjs.map +1 -1
- package/dist/constants/tokens.cjs +16 -15
- package/dist/constants/tokens.cjs.map +1 -1
- package/dist/constants/tokens.d.cts +3 -3
- package/dist/constants/tokens.d.cts.map +1 -1
- package/dist/constants/tokens.d.mts +3 -3
- package/dist/constants/tokens.d.mts.map +1 -1
- package/dist/constants/tokens.mjs +3 -2
- package/dist/constants/tokens.mjs.map +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +1 -1
- package/dist/selectors.d.cts +0 -702
- package/dist/selectors.d.cts.map +1 -1
- package/dist/selectors.d.mts +0 -702
- package/dist/selectors.d.mts.map +1 -1
- package/dist/types.cjs +1 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +2 -9
- package/dist/types.d.cts.map +1 -1
- package/dist/types.d.mts +2 -9
- package/dist/types.d.mts.map +1 -1
- package/dist/types.mjs +1 -0
- package/dist/types.mjs.map +1 -1
- package/dist/utils/bridge.cjs +23 -28
- package/dist/utils/bridge.cjs.map +1 -1
- package/dist/utils/bridge.d.cts +10 -11
- package/dist/utils/bridge.d.cts.map +1 -1
- package/dist/utils/bridge.d.mts +10 -11
- package/dist/utils/bridge.d.mts.map +1 -1
- package/dist/utils/bridge.mjs +21 -26
- package/dist/utils/bridge.mjs.map +1 -1
- package/dist/utils/fetch.cjs +1 -22
- package/dist/utils/fetch.cjs.map +1 -1
- package/dist/utils/fetch.d.cts.map +1 -1
- package/dist/utils/fetch.d.mts.map +1 -1
- package/dist/utils/fetch.mjs +1 -22
- package/dist/utils/fetch.mjs.map +1 -1
- package/dist/utils/metrics/types.cjs.map +1 -1
- package/dist/utils/metrics/types.d.cts +1 -1
- package/dist/utils/metrics/types.d.cts.map +1 -1
- package/dist/utils/metrics/types.d.mts +1 -1
- package/dist/utils/metrics/types.d.mts.map +1 -1
- package/dist/utils/metrics/types.mjs.map +1 -1
- package/dist/utils/quote-fees.cjs +4 -1
- package/dist/utils/quote-fees.cjs.map +1 -1
- package/dist/utils/quote-fees.d.cts +1 -1
- package/dist/utils/quote-fees.d.cts.map +1 -1
- package/dist/utils/quote-fees.d.mts +1 -1
- package/dist/utils/quote-fees.d.mts.map +1 -1
- package/dist/utils/quote-fees.mjs +4 -1
- package/dist/utils/quote-fees.mjs.map +1 -1
- package/dist/utils/quote.cjs +3 -8
- package/dist/utils/quote.cjs.map +1 -1
- package/dist/utils/quote.d.cts +1 -1
- package/dist/utils/quote.d.cts.map +1 -1
- package/dist/utils/quote.d.mts +1 -1
- package/dist/utils/quote.d.mts.map +1 -1
- package/dist/utils/quote.mjs +3 -8
- package/dist/utils/quote.mjs.map +1 -1
- package/dist/utils/swaps.cjs +1 -45
- package/dist/utils/swaps.cjs.map +1 -1
- package/dist/utils/swaps.d.cts +0 -20
- package/dist/utils/swaps.d.cts.map +1 -1
- package/dist/utils/swaps.d.mts +0 -20
- package/dist/utils/swaps.d.mts.map +1 -1
- package/dist/utils/swaps.mjs +0 -43
- package/dist/utils/swaps.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","sourceRoot":"","sources":["../src/selectors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,iBAAiB,EACjB,oCAAoC,EACpC,yBAAyB,EAC1B,qCAAqC;AACtC,OAAO,KAAK,EAAE,eAAe,EAAE,qCAAqC;AAWpE,OAAO,KAAK,EACV,qBAAqB,EACrB,YAAY,EACZ,mBAAmB,EACnB,aAAa,EACb,aAAa,EACd,oBAAgB;AACjB,OAAO,EAAiB,SAAS,EAAE,oBAAgB;AA0BnD,OAAO,EAAE,4BAA4B,EAAE,6BAAyB;AAEhE;;GAEG;AACH,KAAK,2BAA2B,GAAG,oCAAoC,GACrE,yBAAyB,GACzB,iBAAiB,GACjB,IAAI,CAAC,qBAAqB,EAAE,oBAAoB,CAAC,CAAC;AACpD;;GAEG;AACH,KAAK,gCAAgC,GAAG;IACtC,kBAAkB,EAAE;QAClB,YAAY,EAAE,OAAO,CAAC;KACvB,CAAC;CACH,CAAC;AACF,MAAM,MAAM,cAAc,GAAG,qBAAqB,GAAG;IACnD,eAAe,EAAE,eAAe,CAAC;CAClC,GAAG,2BAA2B,GAAG;IAC9B,wBAAwB,EAAE,OAAO,CAAC;CACnC,GAAG,gCAAgC,CAAC;AAUvC;;GAEG;AACH,KAAK,wBAAwB,GAAG;IAC9B,SAAS,EAAE,SAAS,CAAC;IACrB,aAAa,EAAE,CAAC,aAAa,GAAG,aAAa,CAAC,GAAG,IAAI,CAAC;CACvD,CAAC;AAKF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuXnC,CAAC;AAEH,eAAO,MAAM,yCAAyC,UAC7C,cAAc,WAIR,CAAC;AAEhB,eAAO,MAAM,+BAA+B;qBAlYzB,eAAe;;8BAEJ,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4CAmYb,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/types.cjs
CHANGED
|
@@ -65,6 +65,7 @@ var BridgeBackgroundAction;
|
|
|
65
65
|
(function (BridgeBackgroundAction) {
|
|
66
66
|
BridgeBackgroundAction["SET_CHAIN_INTERVAL_LENGTH"] = "setChainIntervalLength";
|
|
67
67
|
BridgeBackgroundAction["RESET_STATE"] = "resetState";
|
|
68
|
+
BridgeBackgroundAction["GET_BRIDGE_ERC20_ALLOWANCE"] = "getBridgeERC20Allowance";
|
|
68
69
|
BridgeBackgroundAction["TRACK_METAMETRICS_EVENT"] = "trackUnifiedSwapBridgeEvent";
|
|
69
70
|
BridgeBackgroundAction["STOP_POLLING_FOR_QUOTES"] = "stopPollingForQuotes";
|
|
70
71
|
BridgeBackgroundAction["FETCH_QUOTES"] = "fetchQuotes";
|
package/dist/types.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAiDA;;GAEG;AACH,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,4DAA4D;IAC5D,8BAAiB,CAAA;IACjB,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AMjC","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 FeatureId,\n FeeDataSchema,\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 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 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 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}\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":";;;AAiDA;;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;AAiFD;;GAEG;AACH,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,wCAA2B,CAAA;AAC7B,CAAC,EAHW,SAAS,yBAAT,SAAS,QAGpB;AAyED,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;AACvB,CAAC,EALW,WAAW,2BAAX,WAAW,QAKtB;AAyCD,IAAY,OAeX;AAfD,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;AACb,CAAC,EAfW,OAAO,uBAAP,OAAO,QAelB;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,sBAOX;AAPD,WAAY,sBAAsB;IAChC,8EAAoD,CAAA;IACpD,oDAA0B,CAAA;IAC1B,gFAAsD,CAAA;IACtD,iFAAuD,CAAA;IACvD,0EAAgD,CAAA;IAChD,sDAA4B,CAAA;AAC9B,CAAC,EAPW,sBAAsB,sCAAtB,sBAAsB,QAOjC","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 FeatureId,\n FeeDataSchema,\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 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 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 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 featureId?: FeatureId;\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}\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 GET_BRIDGE_ERC20_ALLOWANCE = 'getBridgeERC20Allowance',\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.GET_BRIDGE_ERC20_ALLOWANCE>\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
|
@@ -201,15 +201,7 @@ export type TronTradeData = Infer<typeof TronTradeDataSchema>;
|
|
|
201
201
|
export type QuoteResponse<TxDataType = TxData | string | BitcoinTradeData | TronTradeData, ApprovalType = TxData | TronTradeData> = Infer<typeof QuoteResponseSchema> & {
|
|
202
202
|
trade: TxDataType;
|
|
203
203
|
approval?: ApprovalType;
|
|
204
|
-
/**
|
|
205
|
-
* Appended to the quote response based on the quote request
|
|
206
|
-
*/
|
|
207
204
|
featureId?: FeatureId;
|
|
208
|
-
/**
|
|
209
|
-
* Appended to the quote response based on the quote request resetApproval flag
|
|
210
|
-
* If defined, the quote's total network fee will include the reset approval's gas limit.
|
|
211
|
-
*/
|
|
212
|
-
resetApproval?: TxData;
|
|
213
205
|
};
|
|
214
206
|
export declare enum ChainId {
|
|
215
207
|
ETH = 1,
|
|
@@ -240,6 +232,7 @@ export declare enum BridgeUserAction {
|
|
|
240
232
|
export declare enum BridgeBackgroundAction {
|
|
241
233
|
SET_CHAIN_INTERVAL_LENGTH = "setChainIntervalLength",
|
|
242
234
|
RESET_STATE = "resetState",
|
|
235
|
+
GET_BRIDGE_ERC20_ALLOWANCE = "getBridgeERC20Allowance",
|
|
243
236
|
TRACK_METAMETRICS_EVENT = "trackUnifiedSwapBridgeEvent",
|
|
244
237
|
STOP_POLLING_FOR_QUOTES = "stopPollingForQuotes",
|
|
245
238
|
FETCH_QUOTES = "fetchQuotes"
|
|
@@ -288,7 +281,7 @@ export type BridgeControllerAction<FunctionName extends keyof BridgeController>
|
|
|
288
281
|
};
|
|
289
282
|
export type BridgeControllerGetStateAction = ControllerGetStateAction<typeof BRIDGE_CONTROLLER_NAME, BridgeControllerState>;
|
|
290
283
|
export type BridgeControllerStateChangeEvent = ControllerStateChangeEvent<typeof BRIDGE_CONTROLLER_NAME, BridgeControllerState>;
|
|
291
|
-
export type BridgeControllerActions = BridgeControllerGetStateAction | BridgeControllerAction<BridgeBackgroundAction.SET_CHAIN_INTERVAL_LENGTH> | BridgeControllerAction<BridgeBackgroundAction.RESET_STATE> | BridgeControllerAction<BridgeBackgroundAction.TRACK_METAMETRICS_EVENT> | BridgeControllerAction<BridgeBackgroundAction.STOP_POLLING_FOR_QUOTES> | BridgeControllerAction<BridgeBackgroundAction.FETCH_QUOTES> | BridgeControllerAction<BridgeUserAction.UPDATE_QUOTE_PARAMS>;
|
|
284
|
+
export type BridgeControllerActions = BridgeControllerGetStateAction | BridgeControllerAction<BridgeBackgroundAction.SET_CHAIN_INTERVAL_LENGTH> | BridgeControllerAction<BridgeBackgroundAction.RESET_STATE> | BridgeControllerAction<BridgeBackgroundAction.GET_BRIDGE_ERC20_ALLOWANCE> | BridgeControllerAction<BridgeBackgroundAction.TRACK_METAMETRICS_EVENT> | BridgeControllerAction<BridgeBackgroundAction.STOP_POLLING_FOR_QUOTES> | BridgeControllerAction<BridgeBackgroundAction.FETCH_QUOTES> | BridgeControllerAction<BridgeUserAction.UPDATE_QUOTE_PARAMS>;
|
|
292
285
|
export type BridgeControllerEvents = BridgeControllerStateChangeEvent;
|
|
293
286
|
export type AllowedActions = AccountsControllerGetAccountByAddressAction | GetCurrencyRateState | TokenRatesControllerGetStateAction | MultichainAssetsRatesControllerGetStateAction | HandleSnapRequest | NetworkControllerFindNetworkClientIdByChainIdAction | NetworkControllerGetNetworkClientByIdAction | RemoteFeatureFlagControllerGetStateAction;
|
|
294
287
|
export type AllowedEvents = never;
|
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,gBAAgB,EAAE,gCAA4B;AAC5D,OAAO,KAAK,EAAE,sBAAsB,EAAE,+BAA2B;AACjE,OAAO,KAAK,EACV,sBAAsB,EACtB,iBAAiB,EACjB,wBAAwB,EACxB,SAAS,EACT,aAAa,EACb,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,GAAG,MAAM,EACjC,IAAI,CAAC,EAAE,WAAW,KAEf,OAAO,CAAC,GAAG,CAAC,CAAC;AAElB;;GAEG;AACH,oBAAY,SAAS;IACnB,4DAA4D;IAC5D,MAAM,WAAW;IACjB,qBAAqB;IACrB,KAAK,UAAU;IACf,kCAAkC;IAClC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AAM,aAAa,GAAG,KAAK,CAAC;AAElC;;GAEG;AACH,MAAM,MAAM,yBAAyB,GAAG,SAAS,CAC/C,OAAO,sBAAsB,EAC7B,uBAAuB,GAAG,cAAc,EACxC,sBAAsB,GAAG,aAAa,CACvC,CAAC"}
|
package/dist/types.d.mts
CHANGED
|
@@ -201,15 +201,7 @@ export type TronTradeData = Infer<typeof TronTradeDataSchema>;
|
|
|
201
201
|
export type QuoteResponse<TxDataType = TxData | string | BitcoinTradeData | TronTradeData, ApprovalType = TxData | TronTradeData> = Infer<typeof QuoteResponseSchema> & {
|
|
202
202
|
trade: TxDataType;
|
|
203
203
|
approval?: ApprovalType;
|
|
204
|
-
/**
|
|
205
|
-
* Appended to the quote response based on the quote request
|
|
206
|
-
*/
|
|
207
204
|
featureId?: FeatureId;
|
|
208
|
-
/**
|
|
209
|
-
* Appended to the quote response based on the quote request resetApproval flag
|
|
210
|
-
* If defined, the quote's total network fee will include the reset approval's gas limit.
|
|
211
|
-
*/
|
|
212
|
-
resetApproval?: TxData;
|
|
213
205
|
};
|
|
214
206
|
export declare enum ChainId {
|
|
215
207
|
ETH = 1,
|
|
@@ -240,6 +232,7 @@ export declare enum BridgeUserAction {
|
|
|
240
232
|
export declare enum BridgeBackgroundAction {
|
|
241
233
|
SET_CHAIN_INTERVAL_LENGTH = "setChainIntervalLength",
|
|
242
234
|
RESET_STATE = "resetState",
|
|
235
|
+
GET_BRIDGE_ERC20_ALLOWANCE = "getBridgeERC20Allowance",
|
|
243
236
|
TRACK_METAMETRICS_EVENT = "trackUnifiedSwapBridgeEvent",
|
|
244
237
|
STOP_POLLING_FOR_QUOTES = "stopPollingForQuotes",
|
|
245
238
|
FETCH_QUOTES = "fetchQuotes"
|
|
@@ -288,7 +281,7 @@ export type BridgeControllerAction<FunctionName extends keyof BridgeController>
|
|
|
288
281
|
};
|
|
289
282
|
export type BridgeControllerGetStateAction = ControllerGetStateAction<typeof BRIDGE_CONTROLLER_NAME, BridgeControllerState>;
|
|
290
283
|
export type BridgeControllerStateChangeEvent = ControllerStateChangeEvent<typeof BRIDGE_CONTROLLER_NAME, BridgeControllerState>;
|
|
291
|
-
export type BridgeControllerActions = BridgeControllerGetStateAction | BridgeControllerAction<BridgeBackgroundAction.SET_CHAIN_INTERVAL_LENGTH> | BridgeControllerAction<BridgeBackgroundAction.RESET_STATE> | BridgeControllerAction<BridgeBackgroundAction.TRACK_METAMETRICS_EVENT> | BridgeControllerAction<BridgeBackgroundAction.STOP_POLLING_FOR_QUOTES> | BridgeControllerAction<BridgeBackgroundAction.FETCH_QUOTES> | BridgeControllerAction<BridgeUserAction.UPDATE_QUOTE_PARAMS>;
|
|
284
|
+
export type BridgeControllerActions = BridgeControllerGetStateAction | BridgeControllerAction<BridgeBackgroundAction.SET_CHAIN_INTERVAL_LENGTH> | BridgeControllerAction<BridgeBackgroundAction.RESET_STATE> | BridgeControllerAction<BridgeBackgroundAction.GET_BRIDGE_ERC20_ALLOWANCE> | BridgeControllerAction<BridgeBackgroundAction.TRACK_METAMETRICS_EVENT> | BridgeControllerAction<BridgeBackgroundAction.STOP_POLLING_FOR_QUOTES> | BridgeControllerAction<BridgeBackgroundAction.FETCH_QUOTES> | BridgeControllerAction<BridgeUserAction.UPDATE_QUOTE_PARAMS>;
|
|
292
285
|
export type BridgeControllerEvents = BridgeControllerStateChangeEvent;
|
|
293
286
|
export type AllowedActions = AccountsControllerGetAccountByAddressAction | GetCurrencyRateState | TokenRatesControllerGetStateAction | MultichainAssetsRatesControllerGetStateAction | HandleSnapRequest | NetworkControllerFindNetworkClientIdByChainIdAction | NetworkControllerGetNetworkClientByIdAction | RemoteFeatureFlagControllerGetStateAction;
|
|
294
287
|
export type AllowedEvents = never;
|
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,OA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;
|
|
|
62
62
|
(function (BridgeBackgroundAction) {
|
|
63
63
|
BridgeBackgroundAction["SET_CHAIN_INTERVAL_LENGTH"] = "setChainIntervalLength";
|
|
64
64
|
BridgeBackgroundAction["RESET_STATE"] = "resetState";
|
|
65
|
+
BridgeBackgroundAction["GET_BRIDGE_ERC20_ALLOWANCE"] = "getBridgeERC20Allowance";
|
|
65
66
|
BridgeBackgroundAction["TRACK_METAMETRICS_EVENT"] = "trackUnifiedSwapBridgeEvent";
|
|
66
67
|
BridgeBackgroundAction["STOP_POLLING_FOR_QUOTES"] = "stopPollingForQuotes";
|
|
67
68
|
BridgeBackgroundAction["FETCH_QUOTES"] = "fetchQuotes";
|
package/dist/types.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAiDA;;GAEG;AACH,MAAM,CAAN,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,4DAA4D;IAC5D,8BAAiB,CAAA;IACjB,qBAAqB;IACrB,4BAAe,CAAA;IACf,kCAAkC;IAClC,wBAAW,CAAA;IACX;;;OAGG;IACH,gCAAmB,CAAA;AACrB,CAAC,EAZW,SAAS,KAAT,SAAS,QAYpB;AAiFD;;GAEG;AACH,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,wCAA2B,CAAA;AAC7B,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAyED,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;AACvB,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAiDD,MAAM,CAAN,IAAY,OAeX;AAfD,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;AACb,CAAC,EAfW,OAAO,KAAP,OAAO,QAelB;AAID,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,uDAAO,CAAA;IACP,uDAAO,CAAA;IACP,mDAAK,CAAA;AACP,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AACD,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,6DAAyC,CAAA;IACzC,0EAAsD,CAAA;AACxD,CAAC,EAHW,gBAAgB,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 FeatureId,\n FeeDataSchema,\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 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 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 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}\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":"AAiDA;;GAEG;AACH,MAAM,CAAN,IAAY,SAYX;AAZD,WAAY,SAAS;IACnB,4DAA4D;IAC5D,8BAAiB,CAAA;IACjB,qBAAqB;IACrB,4BAAe,CAAA;IACf,kCAAkC;IAClC,wBAAW,CAAA;IACX;;;OAGG;IACH,gCAAmB,CAAA;AACrB,CAAC,EAZW,SAAS,KAAT,SAAS,QAYpB;AAiFD;;GAEG;AACH,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wCAA2B,CAAA;IAC3B,wCAA2B,CAAA;AAC7B,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAyED,MAAM,CAAN,IAAY,WAKX;AALD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;IACnB,oCAAqB,CAAA;AACvB,CAAC,EALW,WAAW,KAAX,WAAW,QAKtB;AAyCD,MAAM,CAAN,IAAY,OAeX;AAfD,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;AACb,CAAC,EAfW,OAAO,KAAP,OAAO,QAelB;AAID,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,uDAAO,CAAA;IACP,uDAAO,CAAA;IACP,mDAAK,CAAA;AACP,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB;AACD,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,6DAAyC,CAAA;IACzC,0EAAsD,CAAA;AACxD,CAAC,EAHW,gBAAgB,KAAhB,gBAAgB,QAG3B;AACD,MAAM,CAAN,IAAY,sBAOX;AAPD,WAAY,sBAAsB;IAChC,8EAAoD,CAAA;IACpD,oDAA0B,CAAA;IAC1B,gFAAsD,CAAA;IACtD,iFAAuD,CAAA;IACvD,0EAAgD,CAAA;IAChD,sDAA4B,CAAA;AAC9B,CAAC,EAPW,sBAAsB,KAAtB,sBAAsB,QAOjC","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 FeatureId,\n FeeDataSchema,\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 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 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 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 featureId?: FeatureId;\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}\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 GET_BRIDGE_ERC20_ALLOWANCE = 'getBridgeERC20Allowance',\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.GET_BRIDGE_ERC20_ALLOWANCE>\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/utils/bridge.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isEvmQuoteResponse = exports.isNonEvmChainId = exports.isTronChainId = exports.isBitcoinChainId = exports.isSolanaChainId = exports.isNativeAddress = exports.isSwapsDefaultTokenSymbol = exports.isSwapsDefaultTokenAddress = exports.sumHexes = exports.isEthUsdt = exports.getEthUsdtResetData = exports.getNativeAssetForChainId = exports.getDefaultBridgeControllerState =
|
|
3
|
+
exports.isCrossChain = exports.isEvmQuoteResponse = exports.isNonEvmChainId = exports.isTronChainId = exports.isBitcoinChainId = exports.isSolanaChainId = exports.isNativeAddress = exports.isSwapsDefaultTokenSymbol = exports.isSwapsDefaultTokenAddress = exports.sumHexes = exports.isEthUsdt = exports.getEthUsdtResetData = exports.getNativeAssetForChainId = exports.getDefaultBridgeControllerState = void 0;
|
|
4
4
|
const constants_1 = require("@ethersproject/constants");
|
|
5
5
|
const contracts_1 = require("@ethersproject/contracts");
|
|
6
6
|
const keyring_api_1 = require("@metamask/keyring-api");
|
|
@@ -9,28 +9,8 @@ const utils_1 = require("@metamask/utils");
|
|
|
9
9
|
const caip_formatters_1 = require("./caip-formatters.cjs");
|
|
10
10
|
const bridge_1 = require("../constants/bridge.cjs");
|
|
11
11
|
const chains_1 = require("../constants/chains.cjs");
|
|
12
|
-
const swaps_1 = require("../constants/swaps.cjs");
|
|
13
12
|
const tokens_1 = require("../constants/tokens.cjs");
|
|
14
13
|
const types_1 = require("../types.cjs");
|
|
15
|
-
/**
|
|
16
|
-
* Checks whether the transaction is a cross-chain transaction by comparing the source and destination chainIds
|
|
17
|
-
*
|
|
18
|
-
* @param srcChainId - The source chainId
|
|
19
|
-
* @param destChainId - The destination chainId
|
|
20
|
-
* @returns Whether the transaction is a cross-chain transaction
|
|
21
|
-
*/
|
|
22
|
-
const isCrossChain = (srcChainId, destChainId) => {
|
|
23
|
-
try {
|
|
24
|
-
if (!destChainId) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
return (0, caip_formatters_1.formatChainIdToCaip)(srcChainId) !== (0, caip_formatters_1.formatChainIdToCaip)(destChainId);
|
|
28
|
-
}
|
|
29
|
-
catch {
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
exports.isCrossChain = isCrossChain;
|
|
34
14
|
const getDefaultBridgeControllerState = () => {
|
|
35
15
|
return bridge_1.DEFAULT_BRIDGE_CONTROLLER_STATE;
|
|
36
16
|
};
|
|
@@ -70,23 +50,19 @@ exports.getNativeAssetForChainId = getNativeAssetForChainId;
|
|
|
70
50
|
/**
|
|
71
51
|
* A function to return the txParam data for setting allowance to 0 for USDT on Ethereum
|
|
72
52
|
*
|
|
73
|
-
* @param destChainId - The destination chain ID
|
|
74
53
|
* @returns The txParam data that will reset allowance to 0, combine it with the approval tx params received from Bridge API
|
|
75
54
|
*/
|
|
76
|
-
const getEthUsdtResetData = (
|
|
77
|
-
const spenderAddress = (0, exports.isCrossChain)(chains_1.CHAIN_IDS.MAINNET, destChainId)
|
|
78
|
-
? bridge_1.METABRIDGE_ETHEREUM_ADDRESS
|
|
79
|
-
: swaps_1.SWAPS_CONTRACT_ADDRESSES[chains_1.CHAIN_IDS.MAINNET];
|
|
55
|
+
const getEthUsdtResetData = () => {
|
|
80
56
|
const UsdtContractInterface = new contracts_1.Contract(bridge_1.ETH_USDT_ADDRESS, metamask_eth_abis_1.abiERC20)
|
|
81
57
|
.interface;
|
|
82
58
|
const data = UsdtContractInterface.encodeFunctionData('approve', [
|
|
83
|
-
|
|
59
|
+
bridge_1.METABRIDGE_ETHEREUM_ADDRESS,
|
|
84
60
|
'0',
|
|
85
61
|
]);
|
|
86
62
|
return data;
|
|
87
63
|
};
|
|
88
64
|
exports.getEthUsdtResetData = getEthUsdtResetData;
|
|
89
|
-
const isEthUsdt = (chainId, address) =>
|
|
65
|
+
const isEthUsdt = (chainId, address) => chainId === chains_1.CHAIN_IDS.MAINNET &&
|
|
90
66
|
address.toLowerCase() === bridge_1.ETH_USDT_ADDRESS.toLowerCase();
|
|
91
67
|
exports.isEthUsdt = isEthUsdt;
|
|
92
68
|
const sumHexes = (...hexStrings) => {
|
|
@@ -185,4 +161,23 @@ const isEvmQuoteResponse = (quoteResponse) => {
|
|
|
185
161
|
return !(0, exports.isNonEvmChainId)(quoteResponse.quote.srcChainId);
|
|
186
162
|
};
|
|
187
163
|
exports.isEvmQuoteResponse = isEvmQuoteResponse;
|
|
164
|
+
/**
|
|
165
|
+
* Checks whether the transaction is a cross-chain transaction by comparing the source and destination chainIds
|
|
166
|
+
*
|
|
167
|
+
* @param srcChainId - The source chainId
|
|
168
|
+
* @param destChainId - The destination chainId
|
|
169
|
+
* @returns Whether the transaction is a cross-chain transaction
|
|
170
|
+
*/
|
|
171
|
+
const isCrossChain = (srcChainId, destChainId) => {
|
|
172
|
+
try {
|
|
173
|
+
if (!destChainId) {
|
|
174
|
+
return false;
|
|
175
|
+
}
|
|
176
|
+
return (0, caip_formatters_1.formatChainIdToCaip)(srcChainId) !== (0, caip_formatters_1.formatChainIdToCaip)(destChainId);
|
|
177
|
+
}
|
|
178
|
+
catch {
|
|
179
|
+
return false;
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
exports.isCrossChain = isCrossChain;
|
|
188
183
|
//# sourceMappingURL=bridge.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.cjs","sourceRoot":"","sources":["../../src/utils/bridge.ts"],"names":[],"mappings":";;;AAAA,wDAAuD;AACvD,wDAAoD;AACpD,uDAAqE;AACrE,mEAAuD;AAEvD,2CAA6E;AAE7E,2DAI2B;AAC3B,oDAI6B;AAC7B,oDAAgD;AAChD,kDAA8D;AAC9D,oDAI6B;AAQ7B,wCAAmC;AAEnC;;;;;;GAMG;AACI,MAAM,YAAY,GAAG,CAC1B,UAA6C,EAC7C,WAAgD,EAChD,EAAE;IACF,IAAI,CAAC;QACH,IAAI,CAAC,WAAW,EAAE,C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AC5C,EAAE;IACF,IAAI,IAAA,qBAAa,EAAC,OAAO,CAAC,EAAE,CAAC;QAC3B,OAAO,OAAO,KAAK,sBAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;IACjD,CAAC;IACD,OAAO,OAAO,CAAC,QAAQ,EAAE,KAAK,eAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC;AACvD,CAAC,CAAC;AAPW,QAAA,gBAAgB,oBAO3B;AAEK,MAAM,aAAa,GAAG,CAAC,OAA4C,EAAE,EAAE;IAC5E,IAAI,IAAA,qBAAa,EAAC,OAAO,CAAC,EAAE,CAAC;QAC3B,OAAO,OAAO,KAAK,sBAAQ,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC;IACjD,CAAC;IACD,OAAO,OAAO,CAAC,QAAQ,EAAE,KAAK,eAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;AACxD,CAAC,CAAC;AALW,QAAA,aAAa,iBAKxB;AAEF;;;;;;GAMG;AACI,MAAM,eAAe,GAAG,CAC7B,OAA0C,EACjC,EAAE;IACX,OAAO,CACL,IAAA,uBAAe,EAAC,OAAO,CAAC;QACxB,IAAA,wBAAgB,EAAC,OAAO,CAAC;QACzB,IAAA,qBAAa,EAAC,OAAO,CAAC,CACvB,CAAC;AACJ,CAAC,CAAC;AARW,QAAA,eAAe,mBAQ1B;AAEK,MAAM,kBAAkB,GAAG,CAChC,aAA4B,EACoB,EAAE;IAClD,OAAO,CAAC,IAAA,uBAAe,EAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;AAC1D,CAAC,CAAC;AAJW,QAAA,kBAAkB,sBAI7B","sourcesContent":["import { AddressZero } from '@ethersproject/constants';\nimport { Contract } from '@ethersproject/contracts';\nimport { BtcScope, SolScope, TrxScope } from '@metamask/keyring-api';\nimport { abiERC20 } from '@metamask/metamask-eth-abis';\nimport type { CaipAssetType, CaipChainId } from '@metamask/utils';\nimport { isCaipChainId, isStrictHexString, type Hex } from '@metamask/utils';\n\nimport {\n formatChainIdToCaip,\n formatChainIdToDec,\n formatChainIdToHex,\n} from './caip-formatters';\nimport {\n DEFAULT_BRIDGE_CONTROLLER_STATE,\n ETH_USDT_ADDRESS,\n METABRIDGE_ETHEREUM_ADDRESS,\n} from '../constants/bridge';\nimport { CHAIN_IDS } from '../constants/chains';\nimport { SWAPS_CONTRACT_ADDRESSES } from '../constants/swaps';\nimport {\n SWAPS_CHAINID_DEFAULT_TOKEN_MAP,\n SYMBOL_TO_SLIP44_MAP,\n type SupportedSwapsNativeCurrencySymbols,\n} from '../constants/tokens';\nimport type {\n BridgeAsset,\n BridgeControllerState,\n GenericQuoteRequest,\n QuoteResponse,\n TxData,\n} from '../types';\nimport { ChainId } from '../types';\n\n/**\n * Checks whether the transaction is a cross-chain transaction by comparing the source and destination chainIds\n *\n * @param srcChainId - The source chainId\n * @param destChainId - The destination chainId\n * @returns Whether the transaction is a cross-chain transaction\n */\nexport const isCrossChain = (\n srcChainId: GenericQuoteRequest['srcChainId'],\n destChainId?: GenericQuoteRequest['destChainId'],\n) => {\n try {\n if (!destChainId) {\n return false;\n }\n return formatChainIdToCaip(srcChainId) !== formatChainIdToCaip(destChainId);\n } catch {\n return false;\n }\n};\n\nexport const getDefaultBridgeControllerState = (): BridgeControllerState => {\n return DEFAULT_BRIDGE_CONTROLLER_STATE;\n};\n\n/**\n * Returns the native assetType for a given chainId and native currency symbol\n * Note that the return value is used as the assetId although it is a CaipAssetType\n *\n * @param chainId - The chainId to get the native assetType for\n * @param nativeCurrencySymbol - The native currency symbol for the given chainId\n * @returns The native assetType for the given chainId\n */\nconst getNativeAssetCaipAssetType = (\n chainId: CaipChainId,\n nativeCurrencySymbol: SupportedSwapsNativeCurrencySymbols,\n): CaipAssetType => {\n return `${formatChainIdToCaip(chainId)}/${SYMBOL_TO_SLIP44_MAP[nativeCurrencySymbol]}`;\n};\n\n/**\n * Returns the native swaps or bridge asset for a given chainId\n *\n * @param chainId - The chainId to get the default token for\n * @returns The native asset for the given chainId\n * @throws If no native asset is defined for the given chainId\n */\nexport const getNativeAssetForChainId = (\n chainId: string | number | Hex | CaipChainId,\n): BridgeAsset => {\n const chainIdInCaip = formatChainIdToCaip(chainId);\n const nativeToken =\n SWAPS_CHAINID_DEFAULT_TOKEN_MAP[\n formatChainIdToCaip(\n chainId,\n ) as keyof typeof SWAPS_CHAINID_DEFAULT_TOKEN_MAP\n ] ??\n SWAPS_CHAINID_DEFAULT_TOKEN_MAP[\n formatChainIdToHex(\n chainId,\n ) as keyof typeof SWAPS_CHAINID_DEFAULT_TOKEN_MAP\n ];\n\n if (!nativeToken) {\n throw new Error(\n `No XChain Swaps native asset found for chainId: ${chainId}`,\n );\n }\n\n return {\n ...nativeToken,\n chainId: formatChainIdToDec(chainId),\n assetId: getNativeAssetCaipAssetType(chainIdInCaip, nativeToken.symbol),\n };\n};\n\n/**\n * A function to return the txParam data for setting allowance to 0 for USDT on Ethereum\n *\n * @param destChainId - The destination chain ID\n * @returns The txParam data that will reset allowance to 0, combine it with the approval tx params received from Bridge API\n */\nexport const getEthUsdtResetData = (\n destChainId: GenericQuoteRequest['destChainId'],\n) => {\n const spenderAddress = isCrossChain(CHAIN_IDS.MAINNET, destChainId)\n ? METABRIDGE_ETHEREUM_ADDRESS\n : SWAPS_CONTRACT_ADDRESSES[CHAIN_IDS.MAINNET];\n const UsdtContractInterface = new Contract(ETH_USDT_ADDRESS, abiERC20)\n .interface;\n const data = UsdtContractInterface.encodeFunctionData('approve', [\n spenderAddress,\n '0',\n ]);\n\n return data;\n};\n\nexport const isEthUsdt = (\n chainId: GenericQuoteRequest['srcChainId'],\n address: string,\n) =>\n formatChainIdToDec(chainId) === ChainId.ETH &&\n address.toLowerCase() === ETH_USDT_ADDRESS.toLowerCase();\n\nexport const sumHexes = (...hexStrings: string[]): Hex => {\n if (hexStrings.length === 0) {\n return '0x0';\n }\n\n const sum = hexStrings.reduce((acc, hex) => acc + BigInt(hex), BigInt(0));\n return `0x${sum.toString(16)}`;\n};\n\n/**\n * Checks whether the provided address is strictly equal to the address for\n * the default swaps token of the provided chain.\n *\n * @param address - The string to compare to the default token address\n * @param chainId - The hex encoded chain ID of the default swaps token to check\n * @returns Whether the address is the provided chain's default token address\n */\nexport const isSwapsDefaultTokenAddress = (\n address: string,\n chainId: Hex | CaipChainId,\n) => {\n if (!address || !chainId) {\n return false;\n }\n\n return address === getNativeAssetForChainId(chainId)?.address;\n};\n\n/**\n * Checks whether the provided symbol is strictly equal to the symbol for\n * the default swaps token of the provided chain.\n *\n * @param symbol - The string to compare to the default token symbol\n * @param chainId - The hex encoded chain ID of the default swaps token to check\n * @returns Whether the symbol is the provided chain's default token symbol\n */\nexport const isSwapsDefaultTokenSymbol = (\n symbol: string,\n chainId: Hex | CaipChainId,\n) => {\n if (!symbol || !chainId) {\n return false;\n }\n\n return symbol === getNativeAssetForChainId(chainId)?.symbol;\n};\n\n/**\n * Checks whether the address is a native asset in any supported xchain swaps network\n *\n * @param address - The address to check\n * @returns Whether the address is a native asset\n */\nexport const isNativeAddress = (address?: string | null) =>\n address === AddressZero || // bridge and swap apis set the native asset address to zero\n address === '' || // assets controllers set the native asset address to an empty string\n !address ||\n (!isStrictHexString(address) &&\n Object.values(SYMBOL_TO_SLIP44_MAP).some(\n // check if it matches any supported SLIP44 references\n (reference) => address.includes(reference) || reference.endsWith(address),\n ));\n\n/**\n * Checks whether the chainId matches Solana in CaipChainId or number format\n *\n * @param chainId - The chainId to check\n * @returns Whether the chainId is Solana\n */\nexport const isSolanaChainId = (\n chainId: Hex | number | CaipChainId | string,\n) => {\n if (isCaipChainId(chainId)) {\n return chainId === SolScope.Mainnet.toString();\n }\n return chainId.toString() === ChainId.SOLANA.toString();\n};\n\nexport const isBitcoinChainId = (\n chainId: Hex | number | CaipChainId | string,\n) => {\n if (isCaipChainId(chainId)) {\n return chainId === BtcScope.Mainnet.toString();\n }\n return chainId.toString() === ChainId.BTC.toString();\n};\n\nexport const isTronChainId = (chainId: Hex | number | CaipChainId | string) => {\n if (isCaipChainId(chainId)) {\n return chainId === TrxScope.Mainnet.toString();\n }\n return chainId.toString() === ChainId.TRON.toString();\n};\n\n/**\n * Checks if a chain ID represents a non-EVM blockchain supported by swaps\n * Currently supports Solana, Bitcoin and Tron\n *\n * @param chainId - The chain ID to check\n * @returns True if the chain is a supported non-EVM chain, false otherwise\n */\nexport const isNonEvmChainId = (\n chainId: GenericQuoteRequest['srcChainId'],\n): boolean => {\n return (\n isSolanaChainId(chainId) ||\n isBitcoinChainId(chainId) ||\n isTronChainId(chainId)\n );\n};\n\nexport const isEvmQuoteResponse = (\n quoteResponse: QuoteResponse,\n): quoteResponse is QuoteResponse<TxData, TxData> => {\n return !isNonEvmChainId(quoteResponse.quote.srcChainId);\n};\n"]}
|
|
1
|
+
{"version":3,"file":"bridge.cjs","sourceRoot":"","sources":["../../src/utils/bridge.ts"],"names":[],"mappings":";;;AAAA,wDAAuD;AACvD,wDAAoD;AACpD,uDAAqE;AACrE,mEAAuD;AAEvD,2CAA6E;AAE7E,2DAI2B;AAC3B,oDAI6B;AAC7B,oDAAgD;AAChD,oDAI6B;AAQ7B,wCAAmC;AAE5B,MAAM,+BAA+B,GAAG,GAA0B,EAAE;IACzE,OAAO,wCAA+B,CAAC;AACzC,CAAC,CAAC;AAFW,QAAA,+BAA+B,mCAE1C;AAEF;;;;;;;GAOG;AACH,MAAM,2BAA2B,GAAG,CAClC,OAAoB,EACpB,oBAAyD,EAC1C,EAAE;IACjB,OAAO,GAAG,IAAA,qCAAmB,EAAC,OAAO,CAAC,IAAI,6BAAoB,CAAC,oBAAoB,CAAC,EAAE,CAAC;AACzF,CAAC,CAAC;AAEF;;;;;;GAMG;AACI,MAAM,wBAAwB,GAAG,CACtC,OAA4C,EAC/B,EAAE;IACf,MAAM,aAAa,GAAG,IAAA,qCAAmB,EAAC,OAAO,CAAC,CAAC;IACnD,MAAM,WAAW,GACf,wCAA+B,CAC7B,IAAA,qCAAmB,EACjB,OAAO,CACwC,C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AU,CAAC,CAAC;AAC1D,CAAC,CAAC;AAJW,QAAA,kBAAkB,sBAI7B;AAEF;;;;;;GAMG;AACI,MAAM,YAAY,GAAG,CAC1B,UAA6C,EAC7C,WAAgD,EAChD,EAAE;IACF,IAAI,CAAC;QACH,IAAI,CAAC,WAAW,EAAE,CAAC;YACjB,OAAO,KAAK,CAAC;QACf,CAAC;QACD,OAAO,IAAA,qCAAmB,EAAC,UAAU,CAAC,KAAK,IAAA,qCAAmB,EAAC,WAAW,CAAC,CAAC;IAC9E,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC;AAZW,QAAA,YAAY,gBAYvB","sourcesContent":["import { AddressZero } from '@ethersproject/constants';\nimport { Contract } from '@ethersproject/contracts';\nimport { BtcScope, SolScope, TrxScope } from '@metamask/keyring-api';\nimport { abiERC20 } from '@metamask/metamask-eth-abis';\nimport type { CaipAssetType, CaipChainId } from '@metamask/utils';\nimport { isCaipChainId, isStrictHexString, type Hex } from '@metamask/utils';\n\nimport {\n formatChainIdToCaip,\n formatChainIdToDec,\n formatChainIdToHex,\n} from './caip-formatters';\nimport {\n DEFAULT_BRIDGE_CONTROLLER_STATE,\n ETH_USDT_ADDRESS,\n METABRIDGE_ETHEREUM_ADDRESS,\n} from '../constants/bridge';\nimport { CHAIN_IDS } from '../constants/chains';\nimport {\n SWAPS_CHAINID_DEFAULT_TOKEN_MAP,\n SYMBOL_TO_SLIP44_MAP,\n type SupportedSwapsNativeCurrencySymbols,\n} from '../constants/tokens';\nimport type {\n BridgeAsset,\n BridgeControllerState,\n GenericQuoteRequest,\n QuoteResponse,\n TxData,\n} from '../types';\nimport { ChainId } from '../types';\n\nexport const getDefaultBridgeControllerState = (): BridgeControllerState => {\n return DEFAULT_BRIDGE_CONTROLLER_STATE;\n};\n\n/**\n * Returns the native assetType for a given chainId and native currency symbol\n * Note that the return value is used as the assetId although it is a CaipAssetType\n *\n * @param chainId - The chainId to get the native assetType for\n * @param nativeCurrencySymbol - The native currency symbol for the given chainId\n * @returns The native assetType for the given chainId\n */\nconst getNativeAssetCaipAssetType = (\n chainId: CaipChainId,\n nativeCurrencySymbol: SupportedSwapsNativeCurrencySymbols,\n): CaipAssetType => {\n return `${formatChainIdToCaip(chainId)}/${SYMBOL_TO_SLIP44_MAP[nativeCurrencySymbol]}`;\n};\n\n/**\n * Returns the native swaps or bridge asset for a given chainId\n *\n * @param chainId - The chainId to get the default token for\n * @returns The native asset for the given chainId\n * @throws If no native asset is defined for the given chainId\n */\nexport const getNativeAssetForChainId = (\n chainId: string | number | Hex | CaipChainId,\n): BridgeAsset => {\n const chainIdInCaip = formatChainIdToCaip(chainId);\n const nativeToken =\n SWAPS_CHAINID_DEFAULT_TOKEN_MAP[\n formatChainIdToCaip(\n chainId,\n ) as keyof typeof SWAPS_CHAINID_DEFAULT_TOKEN_MAP\n ] ??\n SWAPS_CHAINID_DEFAULT_TOKEN_MAP[\n formatChainIdToHex(\n chainId,\n ) as keyof typeof SWAPS_CHAINID_DEFAULT_TOKEN_MAP\n ];\n\n if (!nativeToken) {\n throw new Error(\n `No XChain Swaps native asset found for chainId: ${chainId}`,\n );\n }\n\n return {\n ...nativeToken,\n chainId: formatChainIdToDec(chainId),\n assetId: getNativeAssetCaipAssetType(chainIdInCaip, nativeToken.symbol),\n };\n};\n\n/**\n * A function to return the txParam data for setting allowance to 0 for USDT on Ethereum\n *\n * @returns The txParam data that will reset allowance to 0, combine it with the approval tx params received from Bridge API\n */\nexport const getEthUsdtResetData = () => {\n const UsdtContractInterface = new Contract(ETH_USDT_ADDRESS, abiERC20)\n .interface;\n const data = UsdtContractInterface.encodeFunctionData('approve', [\n METABRIDGE_ETHEREUM_ADDRESS,\n '0',\n ]);\n\n return data;\n};\n\nexport const isEthUsdt = (chainId: Hex, address: string) =>\n chainId === CHAIN_IDS.MAINNET &&\n address.toLowerCase() === ETH_USDT_ADDRESS.toLowerCase();\n\nexport const sumHexes = (...hexStrings: string[]): Hex => {\n if (hexStrings.length === 0) {\n return '0x0';\n }\n\n const sum = hexStrings.reduce((acc, hex) => acc + BigInt(hex), BigInt(0));\n return `0x${sum.toString(16)}`;\n};\n\n/**\n * Checks whether the provided address is strictly equal to the address for\n * the default swaps token of the provided chain.\n *\n * @param address - The string to compare to the default token address\n * @param chainId - The hex encoded chain ID of the default swaps token to check\n * @returns Whether the address is the provided chain's default token address\n */\nexport const isSwapsDefaultTokenAddress = (\n address: string,\n chainId: Hex | CaipChainId,\n) => {\n if (!address || !chainId) {\n return false;\n }\n\n return address === getNativeAssetForChainId(chainId)?.address;\n};\n\n/**\n * Checks whether the provided symbol is strictly equal to the symbol for\n * the default swaps token of the provided chain.\n *\n * @param symbol - The string to compare to the default token symbol\n * @param chainId - The hex encoded chain ID of the default swaps token to check\n * @returns Whether the symbol is the provided chain's default token symbol\n */\nexport const isSwapsDefaultTokenSymbol = (\n symbol: string,\n chainId: Hex | CaipChainId,\n) => {\n if (!symbol || !chainId) {\n return false;\n }\n\n return symbol === getNativeAssetForChainId(chainId)?.symbol;\n};\n\n/**\n * Checks whether the address is a native asset in any supported xchain swaps network\n *\n * @param address - The address to check\n * @returns Whether the address is a native asset\n */\nexport const isNativeAddress = (address?: string | null) =>\n address === AddressZero || // bridge and swap apis set the native asset address to zero\n address === '' || // assets controllers set the native asset address to an empty string\n !address ||\n (!isStrictHexString(address) &&\n Object.values(SYMBOL_TO_SLIP44_MAP).some(\n // check if it matches any supported SLIP44 references\n (reference) => address.includes(reference) || reference.endsWith(address),\n ));\n\n/**\n * Checks whether the chainId matches Solana in CaipChainId or number format\n *\n * @param chainId - The chainId to check\n * @returns Whether the chainId is Solana\n */\nexport const isSolanaChainId = (\n chainId: Hex | number | CaipChainId | string,\n) => {\n if (isCaipChainId(chainId)) {\n return chainId === SolScope.Mainnet.toString();\n }\n return chainId.toString() === ChainId.SOLANA.toString();\n};\n\nexport const isBitcoinChainId = (\n chainId: Hex | number | CaipChainId | string,\n) => {\n if (isCaipChainId(chainId)) {\n return chainId === BtcScope.Mainnet.toString();\n }\n return chainId.toString() === ChainId.BTC.toString();\n};\n\nexport const isTronChainId = (chainId: Hex | number | CaipChainId | string) => {\n if (isCaipChainId(chainId)) {\n return chainId === TrxScope.Mainnet.toString();\n }\n return chainId.toString() === ChainId.TRON.toString();\n};\n\n/**\n * Checks if a chain ID represents a non-EVM blockchain supported by swaps\n * Currently supports Solana, Bitcoin and Tron\n *\n * @param chainId - The chain ID to check\n * @returns True if the chain is a supported non-EVM chain, false otherwise\n */\nexport const isNonEvmChainId = (\n chainId: GenericQuoteRequest['srcChainId'],\n): boolean => {\n return (\n isSolanaChainId(chainId) ||\n isBitcoinChainId(chainId) ||\n isTronChainId(chainId)\n );\n};\n\nexport const isEvmQuoteResponse = (\n quoteResponse: QuoteResponse,\n): quoteResponse is QuoteResponse<TxData, TxData> => {\n return !isNonEvmChainId(quoteResponse.quote.srcChainId);\n};\n\n/**\n * Checks whether the transaction is a cross-chain transaction by comparing the source and destination chainIds\n *\n * @param srcChainId - The source chainId\n * @param destChainId - The destination chainId\n * @returns Whether the transaction is a cross-chain transaction\n */\nexport const isCrossChain = (\n srcChainId: GenericQuoteRequest['srcChainId'],\n destChainId?: GenericQuoteRequest['destChainId'],\n) => {\n try {\n if (!destChainId) {\n return false;\n }\n return formatChainIdToCaip(srcChainId) !== formatChainIdToCaip(destChainId);\n } catch {\n return false;\n }\n};\n"]}
|
package/dist/utils/bridge.d.cts
CHANGED
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import type { CaipChainId } from "@metamask/utils";
|
|
2
2
|
import { type Hex } from "@metamask/utils";
|
|
3
3
|
import type { BridgeAsset, BridgeControllerState, GenericQuoteRequest, QuoteResponse } from "../types.cjs";
|
|
4
|
-
/**
|
|
5
|
-
* Checks whether the transaction is a cross-chain transaction by comparing the source and destination chainIds
|
|
6
|
-
*
|
|
7
|
-
* @param srcChainId - The source chainId
|
|
8
|
-
* @param destChainId - The destination chainId
|
|
9
|
-
* @returns Whether the transaction is a cross-chain transaction
|
|
10
|
-
*/
|
|
11
|
-
export declare const isCrossChain: (srcChainId: GenericQuoteRequest['srcChainId'], destChainId?: GenericQuoteRequest['destChainId']) => boolean;
|
|
12
4
|
export declare const getDefaultBridgeControllerState: () => BridgeControllerState;
|
|
13
5
|
/**
|
|
14
6
|
* Returns the native swaps or bridge asset for a given chainId
|
|
@@ -21,11 +13,10 @@ export declare const getNativeAssetForChainId: (chainId: string | number | Hex |
|
|
|
21
13
|
/**
|
|
22
14
|
* A function to return the txParam data for setting allowance to 0 for USDT on Ethereum
|
|
23
15
|
*
|
|
24
|
-
* @param destChainId - The destination chain ID
|
|
25
16
|
* @returns The txParam data that will reset allowance to 0, combine it with the approval tx params received from Bridge API
|
|
26
17
|
*/
|
|
27
|
-
export declare const getEthUsdtResetData: (
|
|
28
|
-
export declare const isEthUsdt: (chainId:
|
|
18
|
+
export declare const getEthUsdtResetData: () => string;
|
|
19
|
+
export declare const isEthUsdt: (chainId: Hex, address: string) => boolean;
|
|
29
20
|
export declare const sumHexes: (...hexStrings: string[]) => Hex;
|
|
30
21
|
/**
|
|
31
22
|
* Checks whether the provided address is strictly equal to the address for
|
|
@@ -86,4 +77,12 @@ export declare const isEvmQuoteResponse: (quoteResponse: QuoteResponse) => quote
|
|
|
86
77
|
gasLimit: number | null;
|
|
87
78
|
effectiveGas?: number | undefined;
|
|
88
79
|
}>;
|
|
80
|
+
/**
|
|
81
|
+
* Checks whether the transaction is a cross-chain transaction by comparing the source and destination chainIds
|
|
82
|
+
*
|
|
83
|
+
* @param srcChainId - The source chainId
|
|
84
|
+
* @param destChainId - The destination chainId
|
|
85
|
+
* @returns Whether the transaction is a cross-chain transaction
|
|
86
|
+
*/
|
|
87
|
+
export declare const isCrossChain: (srcChainId: GenericQuoteRequest['srcChainId'], destChainId?: GenericQuoteRequest['destChainId']) => boolean;
|
|
89
88
|
//# sourceMappingURL=bridge.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bridge.d.cts","sourceRoot":"","sources":["../../src/utils/bridge.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAiB,WAAW,EAAE,wBAAwB;AAClE,OAAO,EAAoC,KAAK,GAAG,EAAE,wBAAwB;
|
|
1
|
+
{"version":3,"file":"bridge.d.cts","sourceRoot":"","sources":["../../src/utils/bridge.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAiB,WAAW,EAAE,wBAAwB;AAClE,OAAO,EAAoC,KAAK,GAAG,EAAE,wBAAwB;AAkB7E,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EAEd,qBAAiB;AAGlB,eAAO,MAAM,+BAA+B,QAAO,qBAElD,CAAC;AAiBF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,YAC1B,MAAM,GAAG,MAAM,GAAG,GAAG,GAAG,WAAW,KAC3C,WAyBF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,cAS/B,CAAC;AAEF,eAAO,MAAM,SAAS,YAAa,GAAG,WAAW,MAAM,YAEG,CAAC;AAE3D,eAAO,MAAM,QAAQ,kBAAmB,MAAM,EAAE,KAAG,GAOlD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,0BAA0B,YAC5B,MAAM,WACN,GAAG,GAAG,WAAW,YAO3B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,yBAAyB,WAC5B,MAAM,WACL,GAAG,GAAG,WAAW,YAO3B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,eAAe,aAAc,MAAM,GAAG,IAAI,YAQjD,CAAC;AAEP;;;;;GAKG;AACH,eAAO,MAAM,eAAe,YACjB,GAAG,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,YAM7C,CAAC;AAEF,eAAO,MAAM,gBAAgB,YAClB,GAAG,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,YAM7C,CAAC;AAEF,eAAO,M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