From e0b9c059e74d282241643f958aa60d2a340a0b95 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Thu, 25 Apr 2024 19:25:45 -0230 Subject: [PATCH] fix: Fix gas estimates (#24253) This is a patch of the bug fix included in https://github.com/MetaMask/core/pull/4214 --- ...fee-controller-npm-14.0.1-59e9d16a4e.patch | 1665 +++++++++++++++++ CHANGELOG.md | 7 +- package.json | 5 +- yarn.lock | 25 +- 4 files changed, 1697 insertions(+), 5 deletions(-) create mode 100644 .yarn/patches/@metamask-gas-fee-controller-npm-14.0.1-59e9d16a4e.patch diff --git a/.yarn/patches/@metamask-gas-fee-controller-npm-14.0.1-59e9d16a4e.patch b/.yarn/patches/@metamask-gas-fee-controller-npm-14.0.1-59e9d16a4e.patch new file mode 100644 index 000000000000..fa91530b9cce --- /dev/null +++ b/.yarn/patches/@metamask-gas-fee-controller-npm-14.0.1-59e9d16a4e.patch @@ -0,0 +1,1665 @@ +diff --git a/PATCH.txt b/PATCH.txt +new file mode 100644 +index 0000000000000000000000000000000000000000..990650b52e8bad8a30a9ae51d5a9e0fd5704cd8c +--- /dev/null ++++ b/PATCH.txt +@@ -0,0 +1,7 @@ ++============= PATCH NOTES ================ ++This patch is to ensure `state.gasFeeEstimates` always reflects the gas estiomtes ++for the globally selected chain. ++ ++Core PR: https://github.com/MetaMask/core/pull/4214/files ++ ++Patch available on core branch `extension-gas-fee-controller-14.0.1-patch` +diff --git a/dist/GasFeeController.js b/dist/GasFeeController.js +index 96938dadea567b0e37e3fcf1ca957724429ff044..ae29d8b953c95871ea3ea0ec95aeaeed283ffd0e 100644 +--- a/dist/GasFeeController.js ++++ b/dist/GasFeeController.js +@@ -3,7 +3,7 @@ + + + +-var _chunkN5BANBTWjs = require('./chunk-N5BANBTW.js'); ++var _chunkIBADKXI6js = require('./chunk-IBADKXI6.js'); + require('./chunk-EZVGDV5H.js'); + require('./chunk-5INBFZXY.js'); + require('./chunk-F46NZXRQ.js'); +@@ -16,5 +16,5 @@ require('./chunk-Z4BLTVTB.js'); + + + +-exports.GAS_ESTIMATE_TYPES = _chunkN5BANBTWjs.GAS_ESTIMATE_TYPES; exports.GasFeeController = _chunkN5BANBTWjs.GasFeeController; exports.LEGACY_GAS_PRICES_API_URL = _chunkN5BANBTWjs.LEGACY_GAS_PRICES_API_URL; exports.default = _chunkN5BANBTWjs.GasFeeController_default; ++exports.GAS_ESTIMATE_TYPES = _chunkIBADKXI6js.GAS_ESTIMATE_TYPES; exports.GasFeeController = _chunkIBADKXI6js.GasFeeController; exports.LEGACY_GAS_PRICES_API_URL = _chunkIBADKXI6js.LEGACY_GAS_PRICES_API_URL; exports.default = _chunkIBADKXI6js.GasFeeController_default; + //# sourceMappingURL=GasFeeController.js.map +\ No newline at end of file +diff --git a/dist/GasFeeController.mjs b/dist/GasFeeController.mjs +index 3e9cd997b462360cf221132b947fd38575579c64..061377459d0ddd218bded9ba2ce3318419a522cd 100644 +--- a/dist/GasFeeController.mjs ++++ b/dist/GasFeeController.mjs +@@ -3,7 +3,7 @@ import { + GasFeeController, + GasFeeController_default, + LEGACY_GAS_PRICES_API_URL +-} from "./chunk-4T54ULFA.mjs"; ++} from "./chunk-L45HVISM.mjs"; + import "./chunk-EXCWMMNV.mjs"; + import "./chunk-AQN4AQEF.mjs"; + import "./chunk-CCRUODGE.mjs"; +diff --git a/dist/chunk-4T54ULFA.mjs b/dist/chunk-4T54ULFA.mjs +deleted file mode 100644 +index 049ff5858719fd487665c5705ca815d99a21c10d..0000000000000000000000000000000000000000 +--- a/dist/chunk-4T54ULFA.mjs ++++ /dev/null +@@ -1,367 +0,0 @@ +-import { +- fetchGasEstimatesViaEthFeeHistory +-} from "./chunk-EXCWMMNV.mjs"; +-import { +- calculateTimeEstimate, +- fetchEthGasPriceEstimate, +- fetchGasEstimates, +- fetchLegacyGasPriceEstimates +-} from "./chunk-CCRUODGE.mjs"; +-import { +- __privateAdd, +- __privateGet, +- __privateMethod, +- __privateSet +-} from "./chunk-XUI43LEZ.mjs"; +- +-// src/GasFeeController.ts +-import { +- convertHexToDecimal, +- safelyExecute, +- toHex +-} from "@metamask/controller-utils"; +-import EthQuery from "@metamask/eth-query"; +-import { StaticIntervalPollingController } from "@metamask/polling-controller"; +-import { v1 as random } from "uuid"; +-var LEGACY_GAS_PRICES_API_URL = `https://api.metaswap.codefi.network/gasPrices`; +-var GAS_ESTIMATE_TYPES = { +- FEE_MARKET: "fee-market", +- LEGACY: "legacy", +- ETH_GASPRICE: "eth_gasPrice", +- NONE: "none" +-}; +-var metadata = { +- gasFeeEstimatesByChainId: { +- persist: true, +- anonymous: false +- }, +- gasFeeEstimates: { persist: true, anonymous: false }, +- estimatedGasFeeTimeBounds: { persist: true, anonymous: false }, +- gasEstimateType: { persist: true, anonymous: false } +-}; +-var name = "GasFeeController"; +-var defaultState = { +- gasFeeEstimatesByChainId: {}, +- gasFeeEstimates: {}, +- estimatedGasFeeTimeBounds: {}, +- gasEstimateType: GAS_ESTIMATE_TYPES.NONE +-}; +-var _getProvider, _onNetworkControllerDidChange, onNetworkControllerDidChange_fn; +-var GasFeeController = class extends StaticIntervalPollingController { +- /** +- * Creates a GasFeeController instance. +- * +- * @param options - The controller options. +- * @param options.interval - The time in milliseconds to wait between polls. +- * @param options.messenger - The controller messenger. +- * @param options.state - The initial state. +- * @param options.getCurrentNetworkEIP1559Compatibility - Determines whether or not the current +- * network is EIP-1559 compatible. +- * @param options.getCurrentNetworkLegacyGasAPICompatibility - Determines whether or not the +- * current network is compatible with the legacy gas price API. +- * @param options.getCurrentAccountEIP1559Compatibility - Determines whether or not the current +- * account is EIP-1559 compatible. +- * @param options.getChainId - Returns the current chain ID. +- * @param options.getProvider - Returns a network provider for the current network. +- * @param options.onNetworkDidChange - A function for registering an event handler for the +- * network state change event. +- * @param options.legacyAPIEndpoint - The legacy gas price API URL. This option is primarily for +- * testing purposes. +- * @param options.EIP1559APIEndpoint - The EIP-1559 gas price API URL. +- * @param options.clientId - The client ID used to identify to the gas estimation API who is +- * asking for estimates. +- */ +- constructor({ +- interval = 15e3, +- messenger, +- state, +- getCurrentNetworkEIP1559Compatibility, +- getCurrentAccountEIP1559Compatibility, +- getChainId, +- getCurrentNetworkLegacyGasAPICompatibility, +- getProvider, +- onNetworkDidChange, +- legacyAPIEndpoint = LEGACY_GAS_PRICES_API_URL, +- EIP1559APIEndpoint, +- clientId +- }) { +- super({ +- name, +- metadata, +- messenger, +- state: { ...defaultState, ...state } +- }); +- __privateAdd(this, _onNetworkControllerDidChange); +- __privateAdd(this, _getProvider, void 0); +- this.intervalDelay = interval; +- this.setIntervalLength(interval); +- this.pollTokens = /* @__PURE__ */ new Set(); +- this.getCurrentNetworkEIP1559Compatibility = getCurrentNetworkEIP1559Compatibility; +- this.getCurrentNetworkLegacyGasAPICompatibility = getCurrentNetworkLegacyGasAPICompatibility; +- this.getCurrentAccountEIP1559Compatibility = getCurrentAccountEIP1559Compatibility; +- __privateSet(this, _getProvider, getProvider); +- this.EIP1559APIEndpoint = EIP1559APIEndpoint; +- this.legacyAPIEndpoint = legacyAPIEndpoint; +- this.clientId = clientId; +- this.ethQuery = new EthQuery(__privateGet(this, _getProvider).call(this)); +- if (onNetworkDidChange && getChainId) { +- this.currentChainId = getChainId(); +- onNetworkDidChange(async (networkControllerState) => { +- await __privateMethod(this, _onNetworkControllerDidChange, onNetworkControllerDidChange_fn).call(this, networkControllerState); +- }); +- } else { +- this.currentChainId = this.messagingSystem.call( +- "NetworkController:getState" +- ).providerConfig.chainId; +- this.messagingSystem.subscribe( +- "NetworkController:networkDidChange", +- async (networkControllerState) => { +- await __privateMethod(this, _onNetworkControllerDidChange, onNetworkControllerDidChange_fn).call(this, networkControllerState); +- } +- ); +- } +- } +- async resetPolling() { +- if (this.pollTokens.size !== 0) { +- const tokens = Array.from(this.pollTokens); +- this.stopPolling(); +- await this.getGasFeeEstimatesAndStartPolling(tokens[0]); +- tokens.slice(1).forEach((token) => { +- this.pollTokens.add(token); +- }); +- } +- } +- async fetchGasFeeEstimates(options) { +- return await this._fetchGasFeeEstimateData(options); +- } +- async getGasFeeEstimatesAndStartPolling(pollToken) { +- const _pollToken = pollToken || random(); +- this.pollTokens.add(_pollToken); +- if (this.pollTokens.size === 1) { +- await this._fetchGasFeeEstimateData(); +- this._poll(); +- } +- return _pollToken; +- } +- /** +- * Gets and sets gasFeeEstimates in state. +- * +- * @param options - The gas fee estimate options. +- * @param options.shouldUpdateState - Determines whether the state should be updated with the +- * updated gas estimates. +- * @returns The gas fee estimates. +- */ +- async _fetchGasFeeEstimateData(options = {}) { +- const { shouldUpdateState = true, networkClientId } = options; +- let ethQuery, isEIP1559Compatible, isLegacyGasAPICompatible, decimalChainId; +- if (networkClientId !== void 0) { +- const networkClient = this.messagingSystem.call( +- "NetworkController:getNetworkClientById", +- networkClientId +- ); +- isLegacyGasAPICompatible = networkClient.configuration.chainId === "0x38"; +- decimalChainId = convertHexToDecimal(networkClient.configuration.chainId); +- try { +- const result = await this.messagingSystem.call( +- "NetworkController:getEIP1559Compatibility", +- networkClientId +- ); +- isEIP1559Compatible = result || false; +- } catch { +- isEIP1559Compatible = false; +- } +- ethQuery = new EthQuery(networkClient.provider); +- } +- ethQuery ?? (ethQuery = this.ethQuery); +- isLegacyGasAPICompatible ?? (isLegacyGasAPICompatible = this.getCurrentNetworkLegacyGasAPICompatibility()); +- decimalChainId ?? (decimalChainId = convertHexToDecimal(this.currentChainId)); +- try { +- isEIP1559Compatible ?? (isEIP1559Compatible = await this.getEIP1559Compatibility()); +- } catch (e) { +- console.error(e); +- isEIP1559Compatible ?? (isEIP1559Compatible = false); +- } +- const gasFeeCalculations = await determineGasFeeCalculations({ +- isEIP1559Compatible, +- isLegacyGasAPICompatible, +- fetchGasEstimates, +- fetchGasEstimatesUrl: this.EIP1559APIEndpoint.replace( +- "", +- `${decimalChainId}` +- ), +- fetchGasEstimatesViaEthFeeHistory, +- fetchLegacyGasPriceEstimates, +- fetchLegacyGasPriceEstimatesUrl: this.legacyAPIEndpoint.replace( +- "", +- `${decimalChainId}` +- ), +- fetchEthGasPriceEstimate, +- calculateTimeEstimate, +- clientId: this.clientId, +- ethQuery +- }); +- if (shouldUpdateState) { +- this.update((state) => { +- state.gasFeeEstimates = gasFeeCalculations.gasFeeEstimates; +- state.estimatedGasFeeTimeBounds = gasFeeCalculations.estimatedGasFeeTimeBounds; +- state.gasEstimateType = gasFeeCalculations.gasEstimateType; +- state.gasFeeEstimatesByChainId ?? (state.gasFeeEstimatesByChainId = {}); +- state.gasFeeEstimatesByChainId[toHex(decimalChainId)] = { +- gasFeeEstimates: gasFeeCalculations.gasFeeEstimates, +- estimatedGasFeeTimeBounds: gasFeeCalculations.estimatedGasFeeTimeBounds, +- gasEstimateType: gasFeeCalculations.gasEstimateType +- }; +- }); +- } +- return gasFeeCalculations; +- } +- /** +- * Remove the poll token, and stop polling if the set of poll tokens is empty. +- * +- * @param pollToken - The poll token to disconnect. +- */ +- disconnectPoller(pollToken) { +- this.pollTokens.delete(pollToken); +- if (this.pollTokens.size === 0) { +- this.stopPolling(); +- } +- } +- stopPolling() { +- if (this.intervalId) { +- clearInterval(this.intervalId); +- } +- this.pollTokens.clear(); +- this.resetState(); +- } +- /** +- * Prepare to discard this controller. +- * +- * This stops any active polling. +- */ +- destroy() { +- super.destroy(); +- this.stopPolling(); +- } +- _poll() { +- if (this.intervalId) { +- clearInterval(this.intervalId); +- } +- this.intervalId = setInterval(async () => { +- await safelyExecute(() => this._fetchGasFeeEstimateData()); +- }, this.intervalDelay); +- } +- /** +- * Fetching token list from the Token Service API. +- * +- * @private +- * @param networkClientId - The ID of the network client triggering the fetch. +- * @returns A promise that resolves when this operation completes. +- */ +- async _executePoll(networkClientId) { +- await this._fetchGasFeeEstimateData({ networkClientId }); +- } +- resetState() { +- this.update(() => { +- return defaultState; +- }); +- } +- async getEIP1559Compatibility() { +- const currentNetworkIsEIP1559Compatible = await this.getCurrentNetworkEIP1559Compatibility(); +- const currentAccountIsEIP1559Compatible = this.getCurrentAccountEIP1559Compatibility?.() ?? true; +- return currentNetworkIsEIP1559Compatible && currentAccountIsEIP1559Compatible; +- } +- getTimeEstimate(maxPriorityFeePerGas, maxFeePerGas) { +- if (!this.state.gasFeeEstimates || this.state.gasEstimateType !== GAS_ESTIMATE_TYPES.FEE_MARKET) { +- return {}; +- } +- return calculateTimeEstimate( +- maxPriorityFeePerGas, +- maxFeePerGas, +- this.state.gasFeeEstimates +- ); +- } +-}; +-_getProvider = new WeakMap(); +-_onNetworkControllerDidChange = new WeakSet(); +-onNetworkControllerDidChange_fn = async function(networkControllerState) { +- const newChainId = networkControllerState.providerConfig.chainId; +- if (newChainId !== this.currentChainId) { +- this.ethQuery = new EthQuery(__privateGet(this, _getProvider).call(this)); +- await this.resetPolling(); +- this.currentChainId = newChainId; +- } +-}; +-var GasFeeController_default = GasFeeController; +- +-// src/determineGasFeeCalculations.ts +-async function determineGasFeeCalculations({ +- isEIP1559Compatible, +- isLegacyGasAPICompatible, +- fetchGasEstimates: fetchGasEstimates2, +- fetchGasEstimatesUrl, +- fetchGasEstimatesViaEthFeeHistory: fetchGasEstimatesViaEthFeeHistory2, +- fetchLegacyGasPriceEstimates: fetchLegacyGasPriceEstimates2, +- fetchLegacyGasPriceEstimatesUrl, +- fetchEthGasPriceEstimate: fetchEthGasPriceEstimate2, +- calculateTimeEstimate: calculateTimeEstimate2, +- clientId, +- ethQuery +-}) { +- try { +- if (isEIP1559Compatible) { +- let estimates; +- try { +- estimates = await fetchGasEstimates2(fetchGasEstimatesUrl, clientId); +- } catch { +- estimates = await fetchGasEstimatesViaEthFeeHistory2(ethQuery); +- } +- const { suggestedMaxPriorityFeePerGas, suggestedMaxFeePerGas } = estimates.medium; +- const estimatedGasFeeTimeBounds = calculateTimeEstimate2( +- suggestedMaxPriorityFeePerGas, +- suggestedMaxFeePerGas, +- estimates +- ); +- return { +- gasFeeEstimates: estimates, +- estimatedGasFeeTimeBounds, +- gasEstimateType: GAS_ESTIMATE_TYPES.FEE_MARKET +- }; +- } else if (isLegacyGasAPICompatible) { +- const estimates = await fetchLegacyGasPriceEstimates2( +- fetchLegacyGasPriceEstimatesUrl, +- clientId +- ); +- return { +- gasFeeEstimates: estimates, +- estimatedGasFeeTimeBounds: {}, +- gasEstimateType: GAS_ESTIMATE_TYPES.LEGACY +- }; +- } +- throw new Error("Main gas fee/price estimation failed. Use fallback"); +- } catch { +- try { +- const estimates = await fetchEthGasPriceEstimate2(ethQuery); +- return { +- gasFeeEstimates: estimates, +- estimatedGasFeeTimeBounds: {}, +- gasEstimateType: GAS_ESTIMATE_TYPES.ETH_GASPRICE +- }; +- } catch (error) { +- if (error instanceof Error) { +- throw new Error( +- `Gas fee/price estimation failed. Message: ${error.message}` +- ); +- } +- throw error; +- } +- } +-} +- +-export { +- determineGasFeeCalculations, +- LEGACY_GAS_PRICES_API_URL, +- GAS_ESTIMATE_TYPES, +- GasFeeController, +- GasFeeController_default +-}; +-//# sourceMappingURL=chunk-4T54ULFA.mjs.map +\ No newline at end of file +diff --git a/dist/chunk-4T54ULFA.mjs.map b/dist/chunk-4T54ULFA.mjs.map +deleted file mode 100644 +index afa8fb46c485be85d49f57b63ff8211979da31e4..0000000000000000000000000000000000000000 +--- a/dist/chunk-4T54ULFA.mjs.map ++++ /dev/null +@@ -1 +0,0 @@ +-{"version":3,"sources":["../src/GasFeeController.ts","../src/determineGasFeeCalculations.ts"],"sourcesContent":["import type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n RestrictedControllerMessenger,\n} from '@metamask/base-controller';\nimport {\n convertHexToDecimal,\n safelyExecute,\n toHex,\n} from '@metamask/controller-utils';\nimport EthQuery from '@metamask/eth-query';\nimport type {\n NetworkClientId,\n NetworkControllerGetEIP1559CompatibilityAction,\n NetworkControllerGetNetworkClientByIdAction,\n NetworkControllerGetStateAction,\n NetworkControllerNetworkDidChangeEvent,\n NetworkState,\n ProviderProxy,\n} from '@metamask/network-controller';\nimport { StaticIntervalPollingController } from '@metamask/polling-controller';\nimport type { Hex } from '@metamask/utils';\nimport { v1 as random } from 'uuid';\n\nimport determineGasFeeCalculations from './determineGasFeeCalculations';\nimport fetchGasEstimatesViaEthFeeHistory from './fetchGasEstimatesViaEthFeeHistory';\nimport {\n fetchGasEstimates,\n fetchLegacyGasPriceEstimates,\n fetchEthGasPriceEstimate,\n calculateTimeEstimate,\n} from './gas-util';\n\nexport const LEGACY_GAS_PRICES_API_URL = `https://api.metaswap.codefi.network/gasPrices`;\n\nexport type unknownString = 'unknown';\n\n// Fee Market describes the way gas is set after the london hardfork, and was\n// defined by EIP-1559.\nexport type FeeMarketEstimateType = 'fee-market';\n// Legacy describes gasPrice estimates from before london hardfork, when the\n// user is connected to mainnet and are presented with fast/average/slow\n// estimate levels to choose from.\nexport type LegacyEstimateType = 'legacy';\n// EthGasPrice describes a gasPrice estimate received from eth_gasPrice. Post\n// london this value should only be used for legacy type transactions when on\n// networks that support EIP-1559. This type of estimate is the most accurate\n// to display on custom networks that don't support EIP-1559.\nexport type EthGasPriceEstimateType = 'eth_gasPrice';\n// NoEstimate describes the state of the controller before receiving its first\n// estimate.\nexport type NoEstimateType = 'none';\n\n/**\n * Indicates which type of gasEstimate the controller is currently returning.\n * This is useful as a way of asserting that the shape of gasEstimates matches\n * expectations. NONE is a special case indicating that no previous gasEstimate\n * has been fetched.\n */\nexport const GAS_ESTIMATE_TYPES = {\n FEE_MARKET: 'fee-market' as FeeMarketEstimateType,\n LEGACY: 'legacy' as LegacyEstimateType,\n ETH_GASPRICE: 'eth_gasPrice' as EthGasPriceEstimateType,\n NONE: 'none' as NoEstimateType,\n};\n\nexport type GasEstimateType =\n | FeeMarketEstimateType\n | EthGasPriceEstimateType\n | LegacyEstimateType\n | NoEstimateType;\n\nexport type EstimatedGasFeeTimeBounds = {\n lowerTimeBound: number | null;\n upperTimeBound: number | unknownString;\n};\n\n/**\n * @type EthGasPriceEstimate\n *\n * A single gas price estimate for networks and accounts that don't support EIP-1559\n * This estimate comes from eth_gasPrice but is converted to dec gwei to match other\n * return values\n * @property gasPrice - A GWEI dec string\n */\n\nexport type EthGasPriceEstimate = {\n gasPrice: string;\n};\n\n/**\n * @type LegacyGasPriceEstimate\n *\n * A set of gas price estimates for networks and accounts that don't support EIP-1559\n * These estimates include low, medium and high all as strings representing gwei in\n * decimal format.\n * @property high - gasPrice, in decimal gwei string format, suggested for fast inclusion\n * @property medium - gasPrice, in decimal gwei string format, suggested for avg inclusion\n * @property low - gasPrice, in decimal gwei string format, suggested for slow inclusion\n */\nexport type LegacyGasPriceEstimate = {\n high: string;\n medium: string;\n low: string;\n};\n\n/**\n * @type Eip1559GasFee\n *\n * Data necessary to provide an estimate of a gas fee with a specific tip\n * @property minWaitTimeEstimate - The fastest the transaction will take, in milliseconds\n * @property maxWaitTimeEstimate - The slowest the transaction will take, in milliseconds\n * @property suggestedMaxPriorityFeePerGas - A suggested \"tip\", a GWEI hex number\n * @property suggestedMaxFeePerGas - A suggested max fee, the most a user will pay. a GWEI hex number\n */\nexport type Eip1559GasFee = {\n minWaitTimeEstimate: number; // a time duration in milliseconds\n maxWaitTimeEstimate: number; // a time duration in milliseconds\n suggestedMaxPriorityFeePerGas: string; // a GWEI decimal number\n suggestedMaxFeePerGas: string; // a GWEI decimal number\n};\n\n/**\n * @type GasFeeEstimates\n *\n * Data necessary to provide multiple GasFee estimates, and supporting information, to the user\n * @property low - A GasFee for a minimum necessary combination of tip and maxFee\n * @property medium - A GasFee for a recommended combination of tip and maxFee\n * @property high - A GasFee for a high combination of tip and maxFee\n * @property estimatedBaseFee - An estimate of what the base fee will be for the pending/next block. A GWEI dec number\n * @property networkCongestion - A normalized number that can be used to gauge the congestion\n * level of the network, with 0 meaning not congested and 1 meaning extremely congested\n */\nexport type GasFeeEstimates = SourcedGasFeeEstimates | FallbackGasFeeEstimates;\n\ntype SourcedGasFeeEstimates = {\n low: Eip1559GasFee;\n medium: Eip1559GasFee;\n high: Eip1559GasFee;\n estimatedBaseFee: string;\n historicalBaseFeeRange: [string, string];\n baseFeeTrend: 'up' | 'down' | 'level';\n latestPriorityFeeRange: [string, string];\n historicalPriorityFeeRange: [string, string];\n priorityFeeTrend: 'up' | 'down' | 'level';\n networkCongestion: number;\n};\n\ntype FallbackGasFeeEstimates = {\n low: Eip1559GasFee;\n medium: Eip1559GasFee;\n high: Eip1559GasFee;\n estimatedBaseFee: string;\n historicalBaseFeeRange: null;\n baseFeeTrend: null;\n latestPriorityFeeRange: null;\n historicalPriorityFeeRange: null;\n priorityFeeTrend: null;\n networkCongestion: null;\n};\n\nconst metadata = {\n gasFeeEstimatesByChainId: {\n persist: true,\n anonymous: false,\n },\n gasFeeEstimates: { persist: true, anonymous: false },\n estimatedGasFeeTimeBounds: { persist: true, anonymous: false },\n gasEstimateType: { persist: true, anonymous: false },\n};\n\nexport type GasFeeStateEthGasPrice = {\n gasFeeEstimates: EthGasPriceEstimate;\n estimatedGasFeeTimeBounds: Record;\n gasEstimateType: EthGasPriceEstimateType;\n};\n\nexport type GasFeeStateFeeMarket = {\n gasFeeEstimates: GasFeeEstimates;\n estimatedGasFeeTimeBounds: EstimatedGasFeeTimeBounds | Record;\n gasEstimateType: FeeMarketEstimateType;\n};\n\nexport type GasFeeStateLegacy = {\n gasFeeEstimates: LegacyGasPriceEstimate;\n estimatedGasFeeTimeBounds: Record;\n gasEstimateType: LegacyEstimateType;\n};\n\nexport type GasFeeStateNoEstimates = {\n gasFeeEstimates: Record;\n estimatedGasFeeTimeBounds: Record;\n gasEstimateType: NoEstimateType;\n};\n\nexport type FetchGasFeeEstimateOptions = {\n shouldUpdateState?: boolean;\n networkClientId?: NetworkClientId;\n};\n\n/**\n * @type GasFeeState\n *\n * Gas Fee controller state\n * @property gasFeeEstimates - Gas fee estimate data based on new EIP-1559 properties\n * @property estimatedGasFeeTimeBounds - Estimates representing the minimum and maximum\n */\nexport type SingleChainGasFeeState =\n | GasFeeStateEthGasPrice\n | GasFeeStateFeeMarket\n | GasFeeStateLegacy\n | GasFeeStateNoEstimates;\n\nexport type GasFeeEstimatesByChainId = {\n gasFeeEstimatesByChainId?: Record;\n};\n\nexport type GasFeeState = GasFeeEstimatesByChainId & SingleChainGasFeeState;\n\nconst name = 'GasFeeController';\n\nexport type GasFeeStateChange = ControllerStateChangeEvent<\n typeof name,\n GasFeeState\n>;\n\nexport type GetGasFeeState = ControllerGetStateAction;\n\nexport type GasFeeControllerActions = GetGasFeeState;\n\nexport type GasFeeControllerEvents = GasFeeStateChange;\n\ntype AllowedActions =\n | NetworkControllerGetStateAction\n | NetworkControllerGetNetworkClientByIdAction\n | NetworkControllerGetEIP1559CompatibilityAction;\n\ntype GasFeeMessenger = RestrictedControllerMessenger<\n typeof name,\n GasFeeControllerActions | AllowedActions,\n GasFeeControllerEvents | NetworkControllerNetworkDidChangeEvent,\n AllowedActions['type'],\n NetworkControllerNetworkDidChangeEvent['type']\n>;\n\nconst defaultState: GasFeeState = {\n gasFeeEstimatesByChainId: {},\n gasFeeEstimates: {},\n estimatedGasFeeTimeBounds: {},\n gasEstimateType: GAS_ESTIMATE_TYPES.NONE,\n};\n\n/**\n * Controller that retrieves gas fee estimate data and polls for updated data on a set interval\n */\nexport class GasFeeController extends StaticIntervalPollingController<\n typeof name,\n GasFeeState,\n GasFeeMessenger\n> {\n private intervalId?: ReturnType;\n\n private readonly intervalDelay;\n\n private readonly pollTokens: Set;\n\n private readonly legacyAPIEndpoint: string;\n\n private readonly EIP1559APIEndpoint: string;\n\n private readonly getCurrentNetworkEIP1559Compatibility;\n\n private readonly getCurrentNetworkLegacyGasAPICompatibility;\n\n private readonly getCurrentAccountEIP1559Compatibility;\n\n private currentChainId;\n\n private ethQuery?: EthQuery;\n\n private readonly clientId?: string;\n\n #getProvider: () => ProviderProxy;\n\n /**\n * Creates a GasFeeController instance.\n *\n * @param options - The controller options.\n * @param options.interval - The time in milliseconds to wait between polls.\n * @param options.messenger - The controller messenger.\n * @param options.state - The initial state.\n * @param options.getCurrentNetworkEIP1559Compatibility - Determines whether or not the current\n * network is EIP-1559 compatible.\n * @param options.getCurrentNetworkLegacyGasAPICompatibility - Determines whether or not the\n * current network is compatible with the legacy gas price API.\n * @param options.getCurrentAccountEIP1559Compatibility - Determines whether or not the current\n * account is EIP-1559 compatible.\n * @param options.getChainId - Returns the current chain ID.\n * @param options.getProvider - Returns a network provider for the current network.\n * @param options.onNetworkDidChange - A function for registering an event handler for the\n * network state change event.\n * @param options.legacyAPIEndpoint - The legacy gas price API URL. This option is primarily for\n * testing purposes.\n * @param options.EIP1559APIEndpoint - The EIP-1559 gas price API URL.\n * @param options.clientId - The client ID used to identify to the gas estimation API who is\n * asking for estimates.\n */\n constructor({\n interval = 15000,\n messenger,\n state,\n getCurrentNetworkEIP1559Compatibility,\n getCurrentAccountEIP1559Compatibility,\n getChainId,\n getCurrentNetworkLegacyGasAPICompatibility,\n getProvider,\n onNetworkDidChange,\n legacyAPIEndpoint = LEGACY_GAS_PRICES_API_URL,\n EIP1559APIEndpoint,\n clientId,\n }: {\n interval?: number;\n messenger: GasFeeMessenger;\n state?: GasFeeState;\n getCurrentNetworkEIP1559Compatibility: () => Promise;\n getCurrentNetworkLegacyGasAPICompatibility: () => boolean;\n getCurrentAccountEIP1559Compatibility?: () => boolean;\n getChainId?: () => Hex;\n getProvider: () => ProviderProxy;\n onNetworkDidChange?: (listener: (state: NetworkState) => void) => void;\n legacyAPIEndpoint?: string;\n EIP1559APIEndpoint: string;\n clientId?: string;\n }) {\n super({\n name,\n metadata,\n messenger,\n state: { ...defaultState, ...state },\n });\n this.intervalDelay = interval;\n this.setIntervalLength(interval);\n this.pollTokens = new Set();\n this.getCurrentNetworkEIP1559Compatibility =\n getCurrentNetworkEIP1559Compatibility;\n this.getCurrentNetworkLegacyGasAPICompatibility =\n getCurrentNetworkLegacyGasAPICompatibility;\n this.getCurrentAccountEIP1559Compatibility =\n getCurrentAccountEIP1559Compatibility;\n this.#getProvider = getProvider;\n this.EIP1559APIEndpoint = EIP1559APIEndpoint;\n this.legacyAPIEndpoint = legacyAPIEndpoint;\n this.clientId = clientId;\n\n this.ethQuery = new EthQuery(this.#getProvider());\n\n if (onNetworkDidChange && getChainId) {\n this.currentChainId = getChainId();\n onNetworkDidChange(async (networkControllerState) => {\n await this.#onNetworkControllerDidChange(networkControllerState);\n });\n } else {\n this.currentChainId = this.messagingSystem.call(\n 'NetworkController:getState',\n ).providerConfig.chainId;\n this.messagingSystem.subscribe(\n 'NetworkController:networkDidChange',\n async (networkControllerState) => {\n await this.#onNetworkControllerDidChange(networkControllerState);\n },\n );\n }\n }\n\n async resetPolling() {\n if (this.pollTokens.size !== 0) {\n const tokens = Array.from(this.pollTokens);\n this.stopPolling();\n await this.getGasFeeEstimatesAndStartPolling(tokens[0]);\n tokens.slice(1).forEach((token) => {\n this.pollTokens.add(token);\n });\n }\n }\n\n async fetchGasFeeEstimates(options?: FetchGasFeeEstimateOptions) {\n return await this._fetchGasFeeEstimateData(options);\n }\n\n async getGasFeeEstimatesAndStartPolling(\n pollToken: string | undefined,\n ): Promise {\n const _pollToken = pollToken || random();\n\n this.pollTokens.add(_pollToken);\n\n if (this.pollTokens.size === 1) {\n await this._fetchGasFeeEstimateData();\n this._poll();\n }\n\n return _pollToken;\n }\n\n /**\n * Gets and sets gasFeeEstimates in state.\n *\n * @param options - The gas fee estimate options.\n * @param options.shouldUpdateState - Determines whether the state should be updated with the\n * updated gas estimates.\n * @returns The gas fee estimates.\n */\n async _fetchGasFeeEstimateData(\n options: FetchGasFeeEstimateOptions = {},\n ): Promise {\n const { shouldUpdateState = true, networkClientId } = options;\n\n let ethQuery,\n isEIP1559Compatible,\n isLegacyGasAPICompatible,\n decimalChainId: number;\n\n if (networkClientId !== undefined) {\n const networkClient = this.messagingSystem.call(\n 'NetworkController:getNetworkClientById',\n networkClientId,\n );\n isLegacyGasAPICompatible = networkClient.configuration.chainId === '0x38';\n\n decimalChainId = convertHexToDecimal(networkClient.configuration.chainId);\n\n try {\n const result = await this.messagingSystem.call(\n 'NetworkController:getEIP1559Compatibility',\n networkClientId,\n );\n isEIP1559Compatible = result || false;\n } catch {\n isEIP1559Compatible = false;\n }\n ethQuery = new EthQuery(networkClient.provider);\n }\n\n ethQuery ??= this.ethQuery;\n\n isLegacyGasAPICompatible ??=\n this.getCurrentNetworkLegacyGasAPICompatibility();\n\n decimalChainId ??= convertHexToDecimal(this.currentChainId);\n\n try {\n isEIP1559Compatible ??= await this.getEIP1559Compatibility();\n } catch (e) {\n console.error(e);\n isEIP1559Compatible ??= false;\n }\n\n const gasFeeCalculations = await determineGasFeeCalculations({\n isEIP1559Compatible,\n isLegacyGasAPICompatible,\n fetchGasEstimates,\n fetchGasEstimatesUrl: this.EIP1559APIEndpoint.replace(\n '',\n `${decimalChainId}`,\n ),\n fetchGasEstimatesViaEthFeeHistory,\n fetchLegacyGasPriceEstimates,\n fetchLegacyGasPriceEstimatesUrl: this.legacyAPIEndpoint.replace(\n '',\n `${decimalChainId}`,\n ),\n fetchEthGasPriceEstimate,\n calculateTimeEstimate,\n clientId: this.clientId,\n ethQuery,\n });\n\n if (shouldUpdateState) {\n this.update((state) => {\n state.gasFeeEstimates = gasFeeCalculations.gasFeeEstimates;\n state.estimatedGasFeeTimeBounds =\n gasFeeCalculations.estimatedGasFeeTimeBounds;\n state.gasEstimateType = gasFeeCalculations.gasEstimateType;\n state.gasFeeEstimatesByChainId ??= {};\n state.gasFeeEstimatesByChainId[toHex(decimalChainId)] = {\n gasFeeEstimates: gasFeeCalculations.gasFeeEstimates,\n estimatedGasFeeTimeBounds:\n gasFeeCalculations.estimatedGasFeeTimeBounds,\n gasEstimateType: gasFeeCalculations.gasEstimateType,\n } as SingleChainGasFeeState;\n });\n }\n\n return gasFeeCalculations;\n }\n\n /**\n * Remove the poll token, and stop polling if the set of poll tokens is empty.\n *\n * @param pollToken - The poll token to disconnect.\n */\n disconnectPoller(pollToken: string) {\n this.pollTokens.delete(pollToken);\n if (this.pollTokens.size === 0) {\n this.stopPolling();\n }\n }\n\n stopPolling() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n this.pollTokens.clear();\n this.resetState();\n }\n\n /**\n * Prepare to discard this controller.\n *\n * This stops any active polling.\n */\n override destroy() {\n super.destroy();\n this.stopPolling();\n }\n\n private _poll() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n\n this.intervalId = setInterval(async () => {\n await safelyExecute(() => this._fetchGasFeeEstimateData());\n }, this.intervalDelay);\n }\n\n /**\n * Fetching token list from the Token Service API.\n *\n * @private\n * @param networkClientId - The ID of the network client triggering the fetch.\n * @returns A promise that resolves when this operation completes.\n */\n async _executePoll(networkClientId: string): Promise {\n await this._fetchGasFeeEstimateData({ networkClientId });\n }\n\n private resetState() {\n this.update(() => {\n return defaultState;\n });\n }\n\n private async getEIP1559Compatibility() {\n const currentNetworkIsEIP1559Compatible =\n await this.getCurrentNetworkEIP1559Compatibility();\n const currentAccountIsEIP1559Compatible =\n this.getCurrentAccountEIP1559Compatibility?.() ?? true;\n\n return (\n currentNetworkIsEIP1559Compatible && currentAccountIsEIP1559Compatible\n );\n }\n\n getTimeEstimate(\n maxPriorityFeePerGas: string,\n maxFeePerGas: string,\n ): EstimatedGasFeeTimeBounds | Record {\n if (\n !this.state.gasFeeEstimates ||\n this.state.gasEstimateType !== GAS_ESTIMATE_TYPES.FEE_MARKET\n ) {\n return {};\n }\n return calculateTimeEstimate(\n maxPriorityFeePerGas,\n maxFeePerGas,\n this.state.gasFeeEstimates,\n );\n }\n\n async #onNetworkControllerDidChange(networkControllerState: NetworkState) {\n const newChainId = networkControllerState.providerConfig.chainId;\n\n if (newChainId !== this.currentChainId) {\n this.ethQuery = new EthQuery(this.#getProvider());\n await this.resetPolling();\n\n this.currentChainId = newChainId;\n }\n }\n}\n\nexport default GasFeeController;\n","import type {\n EstimatedGasFeeTimeBounds,\n EthGasPriceEstimate,\n GasFeeEstimates,\n GasFeeState as GasFeeCalculations,\n LegacyGasPriceEstimate,\n} from './GasFeeController';\nimport { GAS_ESTIMATE_TYPES } from './GasFeeController';\n\n/**\n * Obtains a set of max base and priority fee estimates along with time estimates so that we\n * can present them to users when they are sending transactions or making swaps.\n *\n * @param args - The arguments.\n * @param args.isEIP1559Compatible - Governs whether or not we can use an EIP-1559-only method to\n * produce estimates.\n * @param args.isLegacyGasAPICompatible - Governs whether or not we can use a non-EIP-1559 method to\n * produce estimates (for instance, testnets do not support estimates altogether).\n * @param args.fetchGasEstimates - A function that fetches gas estimates using an EIP-1559-specific\n * API.\n * @param args.fetchGasEstimatesUrl - The URL for the API we can use to obtain EIP-1559-specific\n * estimates.\n * @param args.fetchGasEstimatesViaEthFeeHistory - A function that fetches gas estimates using\n * `eth_feeHistory` (an EIP-1559 feature).\n * @param args.fetchLegacyGasPriceEstimates - A function that fetches gas estimates using an\n * non-EIP-1559-specific API.\n * @param args.fetchLegacyGasPriceEstimatesUrl - The URL for the API we can use to obtain\n * non-EIP-1559-specific estimates.\n * @param args.fetchEthGasPriceEstimate - A function that fetches gas estimates using\n * `eth_gasPrice`.\n * @param args.calculateTimeEstimate - A function that determine time estimate bounds.\n * @param args.clientId - An identifier that an API can use to know who is asking for estimates.\n * @param args.ethQuery - An EthQuery instance we can use to talk to Ethereum directly.\n * @returns The gas fee calculations.\n */\nexport default async function determineGasFeeCalculations({\n isEIP1559Compatible,\n isLegacyGasAPICompatible,\n fetchGasEstimates,\n fetchGasEstimatesUrl,\n fetchGasEstimatesViaEthFeeHistory,\n fetchLegacyGasPriceEstimates,\n fetchLegacyGasPriceEstimatesUrl,\n fetchEthGasPriceEstimate,\n calculateTimeEstimate,\n clientId,\n ethQuery,\n}: {\n isEIP1559Compatible: boolean;\n isLegacyGasAPICompatible: boolean;\n fetchGasEstimates: (\n url: string,\n clientId?: string,\n ) => Promise;\n fetchGasEstimatesUrl: string;\n fetchGasEstimatesViaEthFeeHistory: (\n // TODO: Replace `any` with type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ethQuery: any,\n ) => Promise;\n fetchLegacyGasPriceEstimates: (\n url: string,\n clientId?: string,\n ) => Promise;\n fetchLegacyGasPriceEstimatesUrl: string;\n // TODO: Replace `any` with type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fetchEthGasPriceEstimate: (ethQuery: any) => Promise;\n calculateTimeEstimate: (\n maxPriorityFeePerGas: string,\n maxFeePerGas: string,\n gasFeeEstimates: GasFeeEstimates,\n ) => EstimatedGasFeeTimeBounds;\n clientId: string | undefined;\n // TODO: Replace `any` with type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ethQuery: any;\n}): Promise {\n try {\n if (isEIP1559Compatible) {\n let estimates: GasFeeEstimates;\n try {\n estimates = await fetchGasEstimates(fetchGasEstimatesUrl, clientId);\n } catch {\n estimates = await fetchGasEstimatesViaEthFeeHistory(ethQuery);\n }\n const { suggestedMaxPriorityFeePerGas, suggestedMaxFeePerGas } =\n estimates.medium;\n const estimatedGasFeeTimeBounds = calculateTimeEstimate(\n suggestedMaxPriorityFeePerGas,\n suggestedMaxFeePerGas,\n estimates,\n );\n return {\n gasFeeEstimates: estimates,\n estimatedGasFeeTimeBounds,\n gasEstimateType: GAS_ESTIMATE_TYPES.FEE_MARKET,\n };\n } else if (isLegacyGasAPICompatible) {\n const estimates = await fetchLegacyGasPriceEstimates(\n fetchLegacyGasPriceEstimatesUrl,\n clientId,\n );\n return {\n gasFeeEstimates: estimates,\n estimatedGasFeeTimeBounds: {},\n gasEstimateType: GAS_ESTIMATE_TYPES.LEGACY,\n };\n }\n throw new Error('Main gas fee/price estimation failed. Use fallback');\n } catch {\n try {\n const estimates = await fetchEthGasPriceEstimate(ethQuery);\n return {\n gasFeeEstimates: estimates,\n estimatedGasFeeTimeBounds: {},\n gasEstimateType: GAS_ESTIMATE_TYPES.ETH_GASPRICE,\n };\n } catch (error) {\n if (error instanceof Error) {\n throw new Error(\n `Gas fee/price estimation failed. Message: ${error.message}`,\n );\n }\n throw error;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAKA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,OAAO,cAAc;A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AA,QAC5D;AAAA,MACF;AACA,YAAM;AAAA,IACR;AAAA,EACF;AACF;","names":["fetchGasEstimates","fetchGasEstimatesViaEthFeeHistory","fetchLegacyGasPriceEstimates","fetchEthGasPriceEstimate","calculateTimeEstimate"]} +\ No newline at end of file +diff --git a/dist/chunk-IBADKXI6.js b/dist/chunk-IBADKXI6.js +new file mode 100644 +index 0000000000000000000000000000000000000000..d69fcfd95d4e2de007c82ab6743ca18a2af45a76 +--- /dev/null ++++ b/dist/chunk-IBADKXI6.js +@@ -0,0 +1,370 @@ ++"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } ++ ++var _chunkEZVGDV5Hjs = require('./chunk-EZVGDV5H.js'); ++ ++ ++ ++ ++ ++var _chunkF46NZXRQjs = require('./chunk-F46NZXRQ.js'); ++ ++ ++ ++ ++ ++var _chunkZ4BLTVTBjs = require('./chunk-Z4BLTVTB.js'); ++ ++// src/GasFeeController.ts ++ ++ ++ ++ ++var _controllerutils = require('@metamask/controller-utils'); ++var _ethquery = require('@metamask/eth-query'); var _ethquery2 = _interopRequireDefault(_ethquery); ++var _pollingcontroller = require('@metamask/polling-controller'); ++var _uuid = require('uuid'); ++var LEGACY_GAS_PRICES_API_URL = `https://api.metaswap.codefi.network/gasPrices`; ++var GAS_ESTIMATE_TYPES = { ++ FEE_MARKET: "fee-market", ++ LEGACY: "legacy", ++ ETH_GASPRICE: "eth_gasPrice", ++ NONE: "none" ++}; ++var metadata = { ++ gasFeeEstimatesByChainId: { ++ persist: true, ++ anonymous: false ++ }, ++ gasFeeEstimates: { persist: true, anonymous: false }, ++ estimatedGasFeeTimeBounds: { persist: true, anonymous: false }, ++ gasEstimateType: { persist: true, anonymous: false } ++}; ++var name = "GasFeeController"; ++var defaultState = { ++ gasFeeEstimatesByChainId: {}, ++ gasFeeEstimates: {}, ++ estimatedGasFeeTimeBounds: {}, ++ gasEstimateType: GAS_ESTIMATE_TYPES.NONE ++}; ++var _getProvider, _onNetworkControllerDidChange, onNetworkControllerDidChange_fn; ++var GasFeeController = class extends _pollingcontroller.StaticIntervalPollingController { ++ /** ++ * Creates a GasFeeController instance. ++ * ++ * @param options - The controller options. ++ * @param options.interval - The time in milliseconds to wait between polls. ++ * @param options.messenger - The controller messenger. ++ * @param options.state - The initial state. ++ * @param options.getCurrentNetworkEIP1559Compatibility - Determines whether or not the current ++ * network is EIP-1559 compatible. ++ * @param options.getCurrentNetworkLegacyGasAPICompatibility - Determines whether or not the ++ * current network is compatible with the legacy gas price API. ++ * @param options.getCurrentAccountEIP1559Compatibility - Determines whether or not the current ++ * account is EIP-1559 compatible. ++ * @param options.getChainId - Returns the current chain ID. ++ * @param options.getProvider - Returns a network provider for the current network. ++ * @param options.onNetworkDidChange - A function for registering an event handler for the ++ * network state change event. ++ * @param options.legacyAPIEndpoint - The legacy gas price API URL. This option is primarily for ++ * testing purposes. ++ * @param options.EIP1559APIEndpoint - The EIP-1559 gas price API URL. ++ * @param options.clientId - The client ID used to identify to the gas estimation API who is ++ * asking for estimates. ++ */ ++ constructor({ ++ interval = 15e3, ++ messenger, ++ state, ++ getCurrentNetworkEIP1559Compatibility, ++ getCurrentAccountEIP1559Compatibility, ++ getChainId, ++ getCurrentNetworkLegacyGasAPICompatibility, ++ getProvider, ++ onNetworkDidChange, ++ legacyAPIEndpoint = LEGACY_GAS_PRICES_API_URL, ++ EIP1559APIEndpoint, ++ clientId ++ }) { ++ super({ ++ name, ++ metadata, ++ messenger, ++ state: { ...defaultState, ...state } ++ }); ++ _chunkZ4BLTVTBjs.__privateAdd.call(void 0, this, _onNetworkControllerDidChange); ++ _chunkZ4BLTVTBjs.__privateAdd.call(void 0, this, _getProvider, void 0); ++ this.intervalDelay = interval; ++ this.setIntervalLength(interval); ++ this.pollTokens = /* @__PURE__ */ new Set(); ++ this.getCurrentNetworkEIP1559Compatibility = getCurrentNetworkEIP1559Compatibility; ++ this.getCurrentNetworkLegacyGasAPICompatibility = getCurrentNetworkLegacyGasAPICompatibility; ++ this.getCurrentAccountEIP1559Compatibility = getCurrentAccountEIP1559Compatibility; ++ _chunkZ4BLTVTBjs.__privateSet.call(void 0, this, _getProvider, getProvider); ++ this.EIP1559APIEndpoint = EIP1559APIEndpoint; ++ this.legacyAPIEndpoint = legacyAPIEndpoint; ++ this.clientId = clientId; ++ this.ethQuery = new (0, _ethquery2.default)(_chunkZ4BLTVTBjs.__privateGet.call(void 0, this, _getProvider).call(this)); ++ if (onNetworkDidChange && getChainId) { ++ this.currentChainId = getChainId(); ++ onNetworkDidChange(async (networkControllerState) => { ++ await _chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _onNetworkControllerDidChange, onNetworkControllerDidChange_fn).call(this, networkControllerState); ++ }); ++ } else { ++ this.currentChainId = this.messagingSystem.call( ++ "NetworkController:getState" ++ ).providerConfig.chainId; ++ this.messagingSystem.subscribe( ++ "NetworkController:networkDidChange", ++ async (networkControllerState) => { ++ await _chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _onNetworkControllerDidChange, onNetworkControllerDidChange_fn).call(this, networkControllerState); ++ } ++ ); ++ } ++ } ++ async resetPolling() { ++ if (this.pollTokens.size !== 0) { ++ const tokens = Array.from(this.pollTokens); ++ this.stopPolling(); ++ await this.getGasFeeEstimatesAndStartPolling(tokens[0]); ++ tokens.slice(1).forEach((token) => { ++ this.pollTokens.add(token); ++ }); ++ } ++ } ++ async fetchGasFeeEstimates(options) { ++ return await this._fetchGasFeeEstimateData(options); ++ } ++ async getGasFeeEstimatesAndStartPolling(pollToken) { ++ const _pollToken = pollToken || _uuid.v1.call(void 0, ); ++ this.pollTokens.add(_pollToken); ++ if (this.pollTokens.size === 1) { ++ await this._fetchGasFeeEstimateData(); ++ this._poll(); ++ } ++ return _pollToken; ++ } ++ /** ++ * Gets and sets gasFeeEstimates in state. ++ * ++ * @param options - The gas fee estimate options. ++ * @param options.shouldUpdateState - Determines whether the state should be updated with the ++ * updated gas estimates. ++ * @returns The gas fee estimates. ++ */ ++ async _fetchGasFeeEstimateData(options = {}) { ++ const { shouldUpdateState = true, networkClientId } = options; ++ let ethQuery, isEIP1559Compatible, isLegacyGasAPICompatible, decimalChainId; ++ if (networkClientId !== void 0) { ++ const networkClient = this.messagingSystem.call( ++ "NetworkController:getNetworkClientById", ++ networkClientId ++ ); ++ isLegacyGasAPICompatible = networkClient.configuration.chainId === "0x38"; ++ decimalChainId = _controllerutils.convertHexToDecimal.call(void 0, networkClient.configuration.chainId); ++ try { ++ const result = await this.messagingSystem.call( ++ "NetworkController:getEIP1559Compatibility", ++ networkClientId ++ ); ++ isEIP1559Compatible = result || false; ++ } catch { ++ isEIP1559Compatible = false; ++ } ++ ethQuery = new (0, _ethquery2.default)(networkClient.provider); ++ } ++ ethQuery ?? (ethQuery = this.ethQuery); ++ isLegacyGasAPICompatible ?? (isLegacyGasAPICompatible = this.getCurrentNetworkLegacyGasAPICompatibility()); ++ decimalChainId ?? (decimalChainId = _controllerutils.convertHexToDecimal.call(void 0, this.currentChainId)); ++ try { ++ isEIP1559Compatible ?? (isEIP1559Compatible = await this.getEIP1559Compatibility()); ++ } catch (e) { ++ console.error(e); ++ isEIP1559Compatible ?? (isEIP1559Compatible = false); ++ } ++ const gasFeeCalculations = await determineGasFeeCalculations({ ++ isEIP1559Compatible, ++ isLegacyGasAPICompatible, ++ fetchGasEstimates: _chunkF46NZXRQjs.fetchGasEstimates, ++ fetchGasEstimatesUrl: this.EIP1559APIEndpoint.replace( ++ "", ++ `${decimalChainId}` ++ ), ++ fetchGasEstimatesViaEthFeeHistory: _chunkEZVGDV5Hjs.fetchGasEstimatesViaEthFeeHistory, ++ fetchLegacyGasPriceEstimates: _chunkF46NZXRQjs.fetchLegacyGasPriceEstimates, ++ fetchLegacyGasPriceEstimatesUrl: this.legacyAPIEndpoint.replace( ++ "", ++ `${decimalChainId}` ++ ), ++ fetchEthGasPriceEstimate: _chunkF46NZXRQjs.fetchEthGasPriceEstimate, ++ calculateTimeEstimate: _chunkF46NZXRQjs.calculateTimeEstimate, ++ clientId: this.clientId, ++ ethQuery ++ }); ++ if (shouldUpdateState) { ++ const chainId = _controllerutils.toHex.call(void 0, decimalChainId); ++ this.update((state) => { ++ if (this.currentChainId === chainId) { ++ state.gasFeeEstimates = gasFeeCalculations.gasFeeEstimates; ++ state.estimatedGasFeeTimeBounds = gasFeeCalculations.estimatedGasFeeTimeBounds; ++ state.gasEstimateType = gasFeeCalculations.gasEstimateType; ++ } ++ state.gasFeeEstimatesByChainId ?? (state.gasFeeEstimatesByChainId = {}); ++ state.gasFeeEstimatesByChainId[chainId] = { ++ gasFeeEstimates: gasFeeCalculations.gasFeeEstimates, ++ estimatedGasFeeTimeBounds: gasFeeCalculations.estimatedGasFeeTimeBounds, ++ gasEstimateType: gasFeeCalculations.gasEstimateType ++ }; ++ }); ++ } ++ return gasFeeCalculations; ++ } ++ /** ++ * Remove the poll token, and stop polling if the set of poll tokens is empty. ++ * ++ * @param pollToken - The poll token to disconnect. ++ */ ++ disconnectPoller(pollToken) { ++ this.pollTokens.delete(pollToken); ++ if (this.pollTokens.size === 0) { ++ this.stopPolling(); ++ } ++ } ++ stopPolling() { ++ if (this.intervalId) { ++ clearInterval(this.intervalId); ++ } ++ this.pollTokens.clear(); ++ this.resetState(); ++ } ++ /** ++ * Prepare to discard this controller. ++ * ++ * This stops any active polling. ++ */ ++ destroy() { ++ super.destroy(); ++ this.stopPolling(); ++ } ++ _poll() { ++ if (this.intervalId) { ++ clearInterval(this.intervalId); ++ } ++ this.intervalId = setInterval(async () => { ++ await _controllerutils.safelyExecute.call(void 0, () => this._fetchGasFeeEstimateData()); ++ }, this.intervalDelay); ++ } ++ /** ++ * Fetching token list from the Token Service API. ++ * ++ * @private ++ * @param networkClientId - The ID of the network client triggering the fetch. ++ * @returns A promise that resolves when this operation completes. ++ */ ++ async _executePoll(networkClientId) { ++ await this._fetchGasFeeEstimateData({ networkClientId }); ++ } ++ resetState() { ++ this.update(() => { ++ return defaultState; ++ }); ++ } ++ async getEIP1559Compatibility() { ++ const currentNetworkIsEIP1559Compatible = await this.getCurrentNetworkEIP1559Compatibility(); ++ const currentAccountIsEIP1559Compatible = this.getCurrentAccountEIP1559Compatibility?.() ?? true; ++ return currentNetworkIsEIP1559Compatible && currentAccountIsEIP1559Compatible; ++ } ++ getTimeEstimate(maxPriorityFeePerGas, maxFeePerGas) { ++ if (!this.state.gasFeeEstimates || this.state.gasEstimateType !== GAS_ESTIMATE_TYPES.FEE_MARKET) { ++ return {}; ++ } ++ return _chunkF46NZXRQjs.calculateTimeEstimate.call(void 0, ++ maxPriorityFeePerGas, ++ maxFeePerGas, ++ this.state.gasFeeEstimates ++ ); ++ } ++}; ++_getProvider = new WeakMap(); ++_onNetworkControllerDidChange = new WeakSet(); ++onNetworkControllerDidChange_fn = async function(networkControllerState) { ++ const newChainId = networkControllerState.providerConfig.chainId; ++ if (newChainId !== this.currentChainId) { ++ this.ethQuery = new (0, _ethquery2.default)(_chunkZ4BLTVTBjs.__privateGet.call(void 0, this, _getProvider).call(this)); ++ await this.resetPolling(); ++ this.currentChainId = newChainId; ++ } ++}; ++var GasFeeController_default = GasFeeController; ++ ++// src/determineGasFeeCalculations.ts ++async function determineGasFeeCalculations({ ++ isEIP1559Compatible, ++ isLegacyGasAPICompatible, ++ fetchGasEstimates: fetchGasEstimates2, ++ fetchGasEstimatesUrl, ++ fetchGasEstimatesViaEthFeeHistory: fetchGasEstimatesViaEthFeeHistory2, ++ fetchLegacyGasPriceEstimates: fetchLegacyGasPriceEstimates2, ++ fetchLegacyGasPriceEstimatesUrl, ++ fetchEthGasPriceEstimate: fetchEthGasPriceEstimate2, ++ calculateTimeEstimate: calculateTimeEstimate2, ++ clientId, ++ ethQuery ++}) { ++ try { ++ if (isEIP1559Compatible) { ++ let estimates; ++ try { ++ estimates = await fetchGasEstimates2(fetchGasEstimatesUrl, clientId); ++ } catch { ++ estimates = await fetchGasEstimatesViaEthFeeHistory2(ethQuery); ++ } ++ const { suggestedMaxPriorityFeePerGas, suggestedMaxFeePerGas } = estimates.medium; ++ const estimatedGasFeeTimeBounds = calculateTimeEstimate2( ++ suggestedMaxPriorityFeePerGas, ++ suggestedMaxFeePerGas, ++ estimates ++ ); ++ return { ++ gasFeeEstimates: estimates, ++ estimatedGasFeeTimeBounds, ++ gasEstimateType: GAS_ESTIMATE_TYPES.FEE_MARKET ++ }; ++ } else if (isLegacyGasAPICompatible) { ++ const estimates = await fetchLegacyGasPriceEstimates2( ++ fetchLegacyGasPriceEstimatesUrl, ++ clientId ++ ); ++ return { ++ gasFeeEstimates: estimates, ++ estimatedGasFeeTimeBounds: {}, ++ gasEstimateType: GAS_ESTIMATE_TYPES.LEGACY ++ }; ++ } ++ throw new Error("Main gas fee/price estimation failed. Use fallback"); ++ } catch { ++ try { ++ const estimates = await fetchEthGasPriceEstimate2(ethQuery); ++ return { ++ gasFeeEstimates: estimates, ++ estimatedGasFeeTimeBounds: {}, ++ gasEstimateType: GAS_ESTIMATE_TYPES.ETH_GASPRICE ++ }; ++ } catch (error) { ++ if (error instanceof Error) { ++ throw new Error( ++ `Gas fee/price estimation failed. Message: ${error.message}` ++ ); ++ } ++ throw error; ++ } ++ } ++} ++ ++ ++ ++ ++ ++ ++ ++exports.determineGasFeeCalculations = determineGasFeeCalculations; exports.LEGACY_GAS_PRICES_API_URL = LEGACY_GAS_PRICES_API_URL; exports.GAS_ESTIMATE_TYPES = GAS_ESTIMATE_TYPES; exports.GasFeeController = GasFeeController; exports.GasFeeController_default = GasFeeController_default; ++//# sourceMappingURL=chunk-IBADKXI6.js.map +\ No newline at end of file +diff --git a/dist/chunk-IBADKXI6.js.map b/dist/chunk-IBADKXI6.js.map +new file mode 100644 +index 0000000000000000000000000000000000000000..7d650730cb2225437c3dda8b0603243cd1586082 +--- /dev/null ++++ b/dist/chunk-IBADKXI6.js.map +@@ -0,0 +1 @@ ++{"version":3,"sources":["../src/GasFeeController.ts","../src/determineGasFeeCalculations.ts"],"names":["fetchGasEstim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AACF,YAAM,YAAY,MAAMC,0BAAyB,QAAQ;AACzD,aAAO;AAAA,QACL,iBAAiB;AAAA,QACjB,2BAA2B,CAAC;AAAA,QAC5B,iBAAiB,mBAAmB;AAAA,MACtC;AAAA,IACF,SAAS,OAAO;AACd,UAAI,iBAAiB,OAAO;AAC1B,cAAM,IAAI;AAAA,UACR,6CAA6C,MAAM,OAAO;AAAA,QAC5D;AAAA,MACF;AACA,YAAM;AAAA,IACR;AAAA,EACF;AACF","sourcesContent":["import type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n RestrictedControllerMessenger,\n} from '@metamask/base-controller';\nimport {\n convertHexToDecimal,\n safelyExecute,\n toHex,\n} from '@metamask/controller-utils';\nimport EthQuery from '@metamask/eth-query';\nimport type {\n NetworkClientId,\n NetworkControllerGetEIP1559CompatibilityAction,\n NetworkControllerGetNetworkClientByIdAction,\n NetworkControllerGetStateAction,\n NetworkControllerNetworkDidChangeEvent,\n NetworkState,\n ProviderProxy,\n} from '@metamask/network-controller';\nimport { StaticIntervalPollingController } from '@metamask/polling-controller';\nimport type { Hex } from '@metamask/utils';\nimport { v1 as random } from 'uuid';\n\nimport determineGasFeeCalculations from './determineGasFeeCalculations';\nimport fetchGasEstimatesViaEthFeeHistory from './fetchGasEstimatesViaEthFeeHistory';\nimport {\n fetchGasEstimates,\n fetchLegacyGasPriceEstimates,\n fetchEthGasPriceEstimate,\n calculateTimeEstimate,\n} from './gas-util';\n\nexport const LEGACY_GAS_PRICES_API_URL = `https://api.metaswap.codefi.network/gasPrices`;\n\nexport type unknownString = 'unknown';\n\n// Fee Market describes the way gas is set after the london hardfork, and was\n// defined by EIP-1559.\nexport type FeeMarketEstimateType = 'fee-market';\n// Legacy describes gasPrice estimates from before london hardfork, when the\n// user is connected to mainnet and are presented with fast/average/slow\n// estimate levels to choose from.\nexport type LegacyEstimateType = 'legacy';\n// EthGasPrice describes a gasPrice estimate received from eth_gasPrice. Post\n// london this value should only be used for legacy type transactions when on\n// networks that support EIP-1559. This type of estimate is the most accurate\n// to display on custom networks that don't support EIP-1559.\nexport type EthGasPriceEstimateType = 'eth_gasPrice';\n// NoEstimate describes the state of the controller before receiving its first\n// estimate.\nexport type NoEstimateType = 'none';\n\n/**\n * Indicates which type of gasEstimate the controller is currently returning.\n * This is useful as a way of asserting that the shape of gasEstimates matches\n * expectations. NONE is a special case indicating that no previous gasEstimate\n * has been fetched.\n */\nexport const GAS_ESTIMATE_TYPES = {\n FEE_MARKET: 'fee-market' as FeeMarketEstimateType,\n LEGACY: 'legacy' as LegacyEstimateType,\n ETH_GASPRICE: 'eth_gasPrice' as EthGasPriceEstimateType,\n NONE: 'none' as NoEstimateType,\n};\n\nexport type GasEstimateType =\n | FeeMarketEstimateType\n | EthGasPriceEstimateType\n | LegacyEstimateType\n | NoEstimateType;\n\nexport type EstimatedGasFeeTimeBounds = {\n lowerTimeBound: number | null;\n upperTimeBound: number | unknownString;\n};\n\n/**\n * @type EthGasPriceEstimate\n *\n * A single gas price estimate for networks and accounts that don't support EIP-1559\n * This estimate comes from eth_gasPrice but is converted to dec gwei to match other\n * return values\n * @property gasPrice - A GWEI dec string\n */\n\nexport type EthGasPriceEstimate = {\n gasPrice: string;\n};\n\n/**\n * @type LegacyGasPriceEstimate\n *\n * A set of gas price estimates for networks and accounts that don't support EIP-1559\n * These estimates include low, medium and high all as strings representing gwei in\n * decimal format.\n * @property high - gasPrice, in decimal gwei string format, suggested for fast inclusion\n * @property medium - gasPrice, in decimal gwei string format, suggested for avg inclusion\n * @property low - gasPrice, in decimal gwei string format, suggested for slow inclusion\n */\nexport type LegacyGasPriceEstimate = {\n high: string;\n medium: string;\n low: string;\n};\n\n/**\n * @type Eip1559GasFee\n *\n * Data necessary to provide an estimate of a gas fee with a specific tip\n * @property minWaitTimeEstimate - The fastest the transaction will take, in milliseconds\n * @property maxWaitTimeEstimate - The slowest the transaction will take, in milliseconds\n * @property suggestedMaxPriorityFeePerGas - A suggested \"tip\", a GWEI hex number\n * @property suggestedMaxFeePerGas - A suggested max fee, the most a user will pay. a GWEI hex number\n */\nexport type Eip1559GasFee = {\n minWaitTimeEstimate: number; // a time duration in milliseconds\n maxWaitTimeEstimate: number; // a time duration in milliseconds\n suggestedMaxPriorityFeePerGas: string; // a GWEI decimal number\n suggestedMaxFeePerGas: string; // a GWEI decimal number\n};\n\n/**\n * @type GasFeeEstimates\n *\n * Data necessary to provide multiple GasFee estimates, and supporting information, to the user\n * @property low - A GasFee for a minimum necessary combination of tip and maxFee\n * @property medium - A GasFee for a recommended combination of tip and maxFee\n * @property high - A GasFee for a high combination of tip and maxFee\n * @property estimatedBaseFee - An estimate of what the base fee will be for the pending/next block. A GWEI dec number\n * @property networkCongestion - A normalized number that can be used to gauge the congestion\n * level of the network, with 0 meaning not congested and 1 meaning extremely congested\n */\nexport type GasFeeEstimates = SourcedGasFeeEstimates | FallbackGasFeeEstimates;\n\ntype SourcedGasFeeEstimates = {\n low: Eip1559GasFee;\n medium: Eip1559GasFee;\n high: Eip1559GasFee;\n estimatedBaseFee: string;\n historicalBaseFeeRange: [string, string];\n baseFeeTrend: 'up' | 'down' | 'level';\n latestPriorityFeeRange: [string, string];\n historicalPriorityFeeRange: [string, string];\n priorityFeeTrend: 'up' | 'down' | 'level';\n networkCongestion: number;\n};\n\ntype FallbackGasFeeEstimates = {\n low: Eip1559GasFee;\n medium: Eip1559GasFee;\n high: Eip1559GasFee;\n estimatedBaseFee: string;\n historicalBaseFeeRange: null;\n baseFeeTrend: null;\n latestPriorityFeeRange: null;\n historicalPriorityFeeRange: null;\n priorityFeeTrend: null;\n networkCongestion: null;\n};\n\nconst metadata = {\n gasFeeEstimatesByChainId: {\n persist: true,\n anonymous: false,\n },\n gasFeeEstimates: { persist: true, anonymous: false },\n estimatedGasFeeTimeBounds: { persist: true, anonymous: false },\n gasEstimateType: { persist: true, anonymous: false },\n};\n\nexport type GasFeeStateEthGasPrice = {\n gasFeeEstimates: EthGasPriceEstimate;\n estimatedGasFeeTimeBounds: Record;\n gasEstimateType: EthGasPriceEstimateType;\n};\n\nexport type GasFeeStateFeeMarket = {\n gasFeeEstimates: GasFeeEstimates;\n estimatedGasFeeTimeBounds: EstimatedGasFeeTimeBounds | Record;\n gasEstimateType: FeeMarketEstimateType;\n};\n\nexport type GasFeeStateLegacy = {\n gasFeeEstimates: LegacyGasPriceEstimate;\n estimatedGasFeeTimeBounds: Record;\n gasEstimateType: LegacyEstimateType;\n};\n\nexport type GasFeeStateNoEstimates = {\n gasFeeEstimates: Record;\n estimatedGasFeeTimeBounds: Record;\n gasEstimateType: NoEstimateType;\n};\n\nexport type FetchGasFeeEstimateOptions = {\n shouldUpdateState?: boolean;\n networkClientId?: NetworkClientId;\n};\n\n/**\n * @type GasFeeState\n *\n * Gas Fee controller state\n * @property gasFeeEstimates - Gas fee estimate data based on new EIP-1559 properties\n * @property estimatedGasFeeTimeBounds - Estimates representing the minimum and maximum\n */\nexport type SingleChainGasFeeState =\n | GasFeeStateEthGasPrice\n | GasFeeStateFeeMarket\n | GasFeeStateLegacy\n | GasFeeStateNoEstimates;\n\nexport type GasFeeEstimatesByChainId = {\n gasFeeEstimatesByChainId?: Record;\n};\n\nexport type GasFeeState = GasFeeEstimatesByChainId & SingleChainGasFeeState;\n\nconst name = 'GasFeeController';\n\nexport type GasFeeStateChange = ControllerStateChangeEvent<\n typeof name,\n GasFeeState\n>;\n\nexport type GetGasFeeState = ControllerGetStateAction;\n\nexport type GasFeeControllerActions = GetGasFeeState;\n\nexport type GasFeeControllerEvents = GasFeeStateChange;\n\ntype AllowedActions =\n | NetworkControllerGetStateAction\n | NetworkControllerGetNetworkClientByIdAction\n | NetworkControllerGetEIP1559CompatibilityAction;\n\ntype GasFeeMessenger = RestrictedControllerMessenger<\n typeof name,\n GasFeeControllerActions | AllowedActions,\n GasFeeControllerEvents | NetworkControllerNetworkDidChangeEvent,\n AllowedActions['type'],\n NetworkControllerNetworkDidChangeEvent['type']\n>;\n\nconst defaultState: GasFeeState = {\n gasFeeEstimatesByChainId: {},\n gasFeeEstimates: {},\n estimatedGasFeeTimeBounds: {},\n gasEstimateType: GAS_ESTIMATE_TYPES.NONE,\n};\n\n/**\n * Controller that retrieves gas fee estimate data and polls for updated data on a set interval\n */\nexport class GasFeeController extends StaticIntervalPollingController<\n typeof name,\n GasFeeState,\n GasFeeMessenger\n> {\n private intervalId?: ReturnType;\n\n private readonly intervalDelay;\n\n private readonly pollTokens: Set;\n\n private readonly legacyAPIEndpoint: string;\n\n private readonly EIP1559APIEndpoint: string;\n\n private readonly getCurrentNetworkEIP1559Compatibility;\n\n private readonly getCurrentNetworkLegacyGasAPICompatibility;\n\n private readonly getCurrentAccountEIP1559Compatibility;\n\n private currentChainId;\n\n private ethQuery?: EthQuery;\n\n private readonly clientId?: string;\n\n #getProvider: () => ProviderProxy;\n\n /**\n * Creates a GasFeeController instance.\n *\n * @param options - The controller options.\n * @param options.interval - The time in milliseconds to wait between polls.\n * @param options.messenger - The controller messenger.\n * @param options.state - The initial state.\n * @param options.getCurrentNetworkEIP1559Compatibility - Determines whether or not the current\n * network is EIP-1559 compatible.\n * @param options.getCurrentNetworkLegacyGasAPICompatibility - Determines whether or not the\n * current network is compatible with the legacy gas price API.\n * @param options.getCurrentAccountEIP1559Compatibility - Determines whether or not the current\n * account is EIP-1559 compatible.\n * @param options.getChainId - Returns the current chain ID.\n * @param options.getProvider - Returns a network provider for the current network.\n * @param options.onNetworkDidChange - A function for registering an event handler for the\n * network state change event.\n * @param options.legacyAPIEndpoint - The legacy gas price API URL. This option is primarily for\n * testing purposes.\n * @param options.EIP1559APIEndpoint - The EIP-1559 gas price API URL.\n * @param options.clientId - The client ID used to identify to the gas estimation API who is\n * asking for estimates.\n */\n constructor({\n interval = 15000,\n messenger,\n state,\n getCurrentNetworkEIP1559Compatibility,\n getCurrentAccountEIP1559Compatibility,\n getChainId,\n getCurrentNetworkLegacyGasAPICompatibility,\n getProvider,\n onNetworkDidChange,\n legacyAPIEndpoint = LEGACY_GAS_PRICES_API_URL,\n EIP1559APIEndpoint,\n clientId,\n }: {\n interval?: number;\n messenger: GasFeeMessenger;\n state?: GasFeeState;\n getCurrentNetworkEIP1559Compatibility: () => Promise;\n getCurrentNetworkLegacyGasAPICompatibility: () => boolean;\n getCurrentAccountEIP1559Compatibility?: () => boolean;\n getChainId?: () => Hex;\n getProvider: () => ProviderProxy;\n onNetworkDidChange?: (listener: (state: NetworkState) => void) => void;\n legacyAPIEndpoint?: string;\n EIP1559APIEndpoint: string;\n clientId?: string;\n }) {\n super({\n name,\n metadata,\n messenger,\n state: { ...defaultState, ...state },\n });\n this.intervalDelay = interval;\n this.setIntervalLength(interval);\n this.pollTokens = new Set();\n this.getCurrentNetworkEIP1559Compatibility =\n getCurrentNetworkEIP1559Compatibility;\n this.getCurrentNetworkLegacyGasAPICompatibility =\n getCurrentNetworkLegacyGasAPICompatibility;\n this.getCurrentAccountEIP1559Compatibility =\n getCurrentAccountEIP1559Compatibility;\n this.#getProvider = getProvider;\n this.EIP1559APIEndpoint = EIP1559APIEndpoint;\n this.legacyAPIEndpoint = legacyAPIEndpoint;\n this.clientId = clientId;\n\n this.ethQuery = new EthQuery(this.#getProvider());\n\n if (onNetworkDidChange && getChainId) {\n this.currentChainId = getChainId();\n onNetworkDidChange(async (networkControllerState) => {\n await this.#onNetworkControllerDidChange(networkControllerState);\n });\n } else {\n this.currentChainId = this.messagingSystem.call(\n 'NetworkController:getState',\n ).providerConfig.chainId;\n this.messagingSystem.subscribe(\n 'NetworkController:networkDidChange',\n async (networkControllerState) => {\n await this.#onNetworkControllerDidChange(networkControllerState);\n },\n );\n }\n }\n\n async resetPolling() {\n if (this.pollTokens.size !== 0) {\n const tokens = Array.from(this.pollTokens);\n this.stopPolling();\n await this.getGasFeeEstimatesAndStartPolling(tokens[0]);\n tokens.slice(1).forEach((token) => {\n this.pollTokens.add(token);\n });\n }\n }\n\n async fetchGasFeeEstimates(options?: FetchGasFeeEstimateOptions) {\n return await this._fetchGasFeeEstimateData(options);\n }\n\n async getGasFeeEstimatesAndStartPolling(\n pollToken: string | undefined,\n ): Promise {\n const _pollToken = pollToken || random();\n\n this.pollTokens.add(_pollToken);\n\n if (this.pollTokens.size === 1) {\n await this._fetchGasFeeEstimateData();\n this._poll();\n }\n\n return _pollToken;\n }\n\n /**\n * Gets and sets gasFeeEstimates in state.\n *\n * @param options - The gas fee estimate options.\n * @param options.shouldUpdateState - Determines whether the state should be updated with the\n * updated gas estimates.\n * @returns The gas fee estimates.\n */\n async _fetchGasFeeEstimateData(\n options: FetchGasFeeEstimateOptions = {},\n ): Promise {\n const { shouldUpdateState = true, networkClientId } = options;\n\n let ethQuery,\n isEIP1559Compatible,\n isLegacyGasAPICompatible,\n decimalChainId: number;\n\n if (networkClientId !== undefined) {\n const networkClient = this.messagingSystem.call(\n 'NetworkController:getNetworkClientById',\n networkClientId,\n );\n isLegacyGasAPICompatible = networkClient.configuration.chainId === '0x38';\n\n decimalChainId = convertHexToDecimal(networkClient.configuration.chainId);\n\n try {\n const result = await this.messagingSystem.call(\n 'NetworkController:getEIP1559Compatibility',\n networkClientId,\n );\n isEIP1559Compatible = result || false;\n } catch {\n isEIP1559Compatible = false;\n }\n ethQuery = new EthQuery(networkClient.provider);\n }\n\n ethQuery ??= this.ethQuery;\n\n isLegacyGasAPICompatible ??=\n this.getCurrentNetworkLegacyGasAPICompatibility();\n\n decimalChainId ??= convertHexToDecimal(this.currentChainId);\n\n try {\n isEIP1559Compatible ??= await this.getEIP1559Compatibility();\n } catch (e) {\n console.error(e);\n isEIP1559Compatible ??= false;\n }\n\n const gasFeeCalculations = await determineGasFeeCalculations({\n isEIP1559Compatible,\n isLegacyGasAPICompatible,\n fetchGasEstimates,\n fetchGasEstimatesUrl: this.EIP1559APIEndpoint.replace(\n '',\n `${decimalChainId}`,\n ),\n fetchGasEstimatesViaEthFeeHistory,\n fetchLegacyGasPriceEstimates,\n fetchLegacyGasPriceEstimatesUrl: this.legacyAPIEndpoint.replace(\n '',\n `${decimalChainId}`,\n ),\n fetchEthGasPriceEstimate,\n calculateTimeEstimate,\n clientId: this.clientId,\n ethQuery,\n });\n\n if (shouldUpdateState) {\n const chainId = toHex(decimalChainId);\n this.update((state) => {\n if (this.currentChainId === chainId) {\n state.gasFeeEstimates = gasFeeCalculations.gasFeeEstimates;\n state.estimatedGasFeeTimeBounds =\n gasFeeCalculations.estimatedGasFeeTimeBounds;\n state.gasEstimateType = gasFeeCalculations.gasEstimateType;\n }\n state.gasFeeEstimatesByChainId ??= {};\n state.gasFeeEstimatesByChainId[chainId] = {\n gasFeeEstimates: gasFeeCalculations.gasFeeEstimates,\n estimatedGasFeeTimeBounds:\n gasFeeCalculations.estimatedGasFeeTimeBounds,\n gasEstimateType: gasFeeCalculations.gasEstimateType,\n } as SingleChainGasFeeState;\n });\n }\n\n return gasFeeCalculations;\n }\n\n /**\n * Remove the poll token, and stop polling if the set of poll tokens is empty.\n *\n * @param pollToken - The poll token to disconnect.\n */\n disconnectPoller(pollToken: string) {\n this.pollTokens.delete(pollToken);\n if (this.pollTokens.size === 0) {\n this.stopPolling();\n }\n }\n\n stopPolling() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n this.pollTokens.clear();\n this.resetState();\n }\n\n /**\n * Prepare to discard this controller.\n *\n * This stops any active polling.\n */\n override destroy() {\n super.destroy();\n this.stopPolling();\n }\n\n private _poll() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n\n this.intervalId = setInterval(async () => {\n await safelyExecute(() => this._fetchGasFeeEstimateData());\n }, this.intervalDelay);\n }\n\n /**\n * Fetching token list from the Token Service API.\n *\n * @private\n * @param networkClientId - The ID of the network client triggering the fetch.\n * @returns A promise that resolves when this operation completes.\n */\n async _executePoll(networkClientId: string): Promise {\n await this._fetchGasFeeEstimateData({ networkClientId });\n }\n\n private resetState() {\n this.update(() => {\n return defaultState;\n });\n }\n\n private async getEIP1559Compatibility() {\n const currentNetworkIsEIP1559Compatible =\n await this.getCurrentNetworkEIP1559Compatibility();\n const currentAccountIsEIP1559Compatible =\n this.getCurrentAccountEIP1559Compatibility?.() ?? true;\n\n return (\n currentNetworkIsEIP1559Compatible && currentAccountIsEIP1559Compatible\n );\n }\n\n getTimeEstimate(\n maxPriorityFeePerGas: string,\n maxFeePerGas: string,\n ): EstimatedGasFeeTimeBounds | Record {\n if (\n !this.state.gasFeeEstimates ||\n this.state.gasEstimateType !== GAS_ESTIMATE_TYPES.FEE_MARKET\n ) {\n return {};\n }\n return calculateTimeEstimate(\n maxPriorityFeePerGas,\n maxFeePerGas,\n this.state.gasFeeEstimates,\n );\n }\n\n async #onNetworkControllerDidChange(networkControllerState: NetworkState) {\n const newChainId = networkControllerState.providerConfig.chainId;\n\n if (newChainId !== this.currentChainId) {\n this.ethQuery = new EthQuery(this.#getProvider());\n await this.resetPolling();\n\n this.currentChainId = newChainId;\n }\n }\n}\n\nexport default GasFeeController;\n","import type {\n EstimatedGasFeeTimeBounds,\n EthGasPriceEstimate,\n GasFeeEstimates,\n GasFeeState as GasFeeCalculations,\n LegacyGasPriceEstimate,\n} from './GasFeeController';\nimport { GAS_ESTIMATE_TYPES } from './GasFeeController';\n\n/**\n * Obtains a set of max base and priority fee estimates along with time estimates so that we\n * can present them to users when they are sending transactions or making swaps.\n *\n * @param args - The arguments.\n * @param args.isEIP1559Compatible - Governs whether or not we can use an EIP-1559-only method to\n * produce estimates.\n * @param args.isLegacyGasAPICompatible - Governs whether or not we can use a non-EIP-1559 method to\n * produce estimates (for instance, testnets do not support estimates altogether).\n * @param args.fetchGasEstimates - A function that fetches gas estimates using an EIP-1559-specific\n * API.\n * @param args.fetchGasEstimatesUrl - The URL for the API we can use to obtain EIP-1559-specific\n * estimates.\n * @param args.fetchGasEstimatesViaEthFeeHistory - A function that fetches gas estimates using\n * `eth_feeHistory` (an EIP-1559 feature).\n * @param args.fetchLegacyGasPriceEstimates - A function that fetches gas estimates using an\n * non-EIP-1559-specific API.\n * @param args.fetchLegacyGasPriceEstimatesUrl - The URL for the API we can use to obtain\n * non-EIP-1559-specific estimates.\n * @param args.fetchEthGasPriceEstimate - A function that fetches gas estimates using\n * `eth_gasPrice`.\n * @param args.calculateTimeEstimate - A function that determine time estimate bounds.\n * @param args.clientId - An identifier that an API can use to know who is asking for estimates.\n * @param args.ethQuery - An EthQuery instance we can use to talk to Ethereum directly.\n * @returns The gas fee calculations.\n */\nexport default async function determineGasFeeCalculations({\n isEIP1559Compatible,\n isLegacyGasAPICompatible,\n fetchGasEstimates,\n fetchGasEstimatesUrl,\n fetchGasEstimatesViaEthFeeHistory,\n fetchLegacyGasPriceEstimates,\n fetchLegacyGasPriceEstimatesUrl,\n fetchEthGasPriceEstimate,\n calculateTimeEstimate,\n clientId,\n ethQuery,\n}: {\n isEIP1559Compatible: boolean;\n isLegacyGasAPICompatible: boolean;\n fetchGasEstimates: (\n url: string,\n clientId?: string,\n ) => Promise;\n fetchGasEstimatesUrl: string;\n fetchGasEstimatesViaEthFeeHistory: (\n // TODO: Replace `any` with type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ethQuery: any,\n ) => Promise;\n fetchLegacyGasPriceEstimates: (\n url: string,\n clientId?: string,\n ) => Promise;\n fetchLegacyGasPriceEstimatesUrl: string;\n // TODO: Replace `any` with type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fetchEthGasPriceEstimate: (ethQuery: any) => Promise;\n calculateTimeEstimate: (\n maxPriorityFeePerGas: string,\n maxFeePerGas: string,\n gasFeeEstimates: GasFeeEstimates,\n ) => EstimatedGasFeeTimeBounds;\n clientId: string | undefined;\n // TODO: Replace `any` with type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ethQuery: any;\n}): Promise {\n try {\n if (isEIP1559Compatible) {\n let estimates: GasFeeEstimates;\n try {\n estimates = await fetchGasEstimates(fetchGasEstimatesUrl, clientId);\n } catch {\n estimates = await fetchGasEstimatesViaEthFeeHistory(ethQuery);\n }\n const { suggestedMaxPriorityFeePerGas, suggestedMaxFeePerGas } =\n estimates.medium;\n const estimatedGasFeeTimeBounds = calculateTimeEstimate(\n suggestedMaxPriorityFeePerGas,\n suggestedMaxFeePerGas,\n estimates,\n );\n return {\n gasFeeEstimates: estimates,\n estimatedGasFeeTimeBounds,\n gasEstimateType: GAS_ESTIMATE_TYPES.FEE_MARKET,\n };\n } else if (isLegacyGasAPICompatible) {\n const estimates = await fetchLegacyGasPriceEstimates(\n fetchLegacyGasPriceEstimatesUrl,\n clientId,\n );\n return {\n gasFeeEstimates: estimates,\n estimatedGasFeeTimeBounds: {},\n gasEstimateType: GAS_ESTIMATE_TYPES.LEGACY,\n };\n }\n throw new Error('Main gas fee/price estimation failed. Use fallback');\n } catch {\n try {\n const estimates = await fetchEthGasPriceEstimate(ethQuery);\n return {\n gasFeeEstimates: estimates,\n estimatedGasFeeTimeBounds: {},\n gasEstimateType: GAS_ESTIMATE_TYPES.ETH_GASPRICE,\n };\n } catch (error) {\n if (error instanceof Error) {\n throw new Error(\n `Gas fee/price estimation failed. Message: ${error.message}`,\n );\n }\n throw error;\n }\n }\n}\n"]} +\ No newline at end of file +diff --git a/dist/chunk-L45HVISM.mjs b/dist/chunk-L45HVISM.mjs +new file mode 100644 +index 0000000000000000000000000000000000000000..219a2f2e453cc4104da16c60a54c4cdd27dbb504 +--- /dev/null ++++ b/dist/chunk-L45HVISM.mjs +@@ -0,0 +1,370 @@ ++import { ++ fetchGasEstimatesViaEthFeeHistory ++} from "./chunk-EXCWMMNV.mjs"; ++import { ++ calculateTimeEstimate, ++ fetchEthGasPriceEstimate, ++ fetchGasEstimates, ++ fetchLegacyGasPriceEstimates ++} from "./chunk-CCRUODGE.mjs"; ++import { ++ __privateAdd, ++ __privateGet, ++ __privateMethod, ++ __privateSet ++} from "./chunk-XUI43LEZ.mjs"; ++ ++// src/GasFeeController.ts ++import { ++ convertHexToDecimal, ++ safelyExecute, ++ toHex ++} from "@metamask/controller-utils"; ++import EthQuery from "@metamask/eth-query"; ++import { StaticIntervalPollingController } from "@metamask/polling-controller"; ++import { v1 as random } from "uuid"; ++var LEGACY_GAS_PRICES_API_URL = `https://api.metaswap.codefi.network/gasPrices`; ++var GAS_ESTIMATE_TYPES = { ++ FEE_MARKET: "fee-market", ++ LEGACY: "legacy", ++ ETH_GASPRICE: "eth_gasPrice", ++ NONE: "none" ++}; ++var metadata = { ++ gasFeeEstimatesByChainId: { ++ persist: true, ++ anonymous: false ++ }, ++ gasFeeEstimates: { persist: true, anonymous: false }, ++ estimatedGasFeeTimeBounds: { persist: true, anonymous: false }, ++ gasEstimateType: { persist: true, anonymous: false } ++}; ++var name = "GasFeeController"; ++var defaultState = { ++ gasFeeEstimatesByChainId: {}, ++ gasFeeEstimates: {}, ++ estimatedGasFeeTimeBounds: {}, ++ gasEstimateType: GAS_ESTIMATE_TYPES.NONE ++}; ++var _getProvider, _onNetworkControllerDidChange, onNetworkControllerDidChange_fn; ++var GasFeeController = class extends StaticIntervalPollingController { ++ /** ++ * Creates a GasFeeController instance. ++ * ++ * @param options - The controller options. ++ * @param options.interval - The time in milliseconds to wait between polls. ++ * @param options.messenger - The controller messenger. ++ * @param options.state - The initial state. ++ * @param options.getCurrentNetworkEIP1559Compatibility - Determines whether or not the current ++ * network is EIP-1559 compatible. ++ * @param options.getCurrentNetworkLegacyGasAPICompatibility - Determines whether or not the ++ * current network is compatible with the legacy gas price API. ++ * @param options.getCurrentAccountEIP1559Compatibility - Determines whether or not the current ++ * account is EIP-1559 compatible. ++ * @param options.getChainId - Returns the current chain ID. ++ * @param options.getProvider - Returns a network provider for the current network. ++ * @param options.onNetworkDidChange - A function for registering an event handler for the ++ * network state change event. ++ * @param options.legacyAPIEndpoint - The legacy gas price API URL. This option is primarily for ++ * testing purposes. ++ * @param options.EIP1559APIEndpoint - The EIP-1559 gas price API URL. ++ * @param options.clientId - The client ID used to identify to the gas estimation API who is ++ * asking for estimates. ++ */ ++ constructor({ ++ interval = 15e3, ++ messenger, ++ state, ++ getCurrentNetworkEIP1559Compatibility, ++ getCurrentAccountEIP1559Compatibility, ++ getChainId, ++ getCurrentNetworkLegacyGasAPICompatibility, ++ getProvider, ++ onNetworkDidChange, ++ legacyAPIEndpoint = LEGACY_GAS_PRICES_API_URL, ++ EIP1559APIEndpoint, ++ clientId ++ }) { ++ super({ ++ name, ++ metadata, ++ messenger, ++ state: { ...defaultState, ...state } ++ }); ++ __privateAdd(this, _onNetworkControllerDidChange); ++ __privateAdd(this, _getProvider, void 0); ++ this.intervalDelay = interval; ++ this.setIntervalLength(interval); ++ this.pollTokens = /* @__PURE__ */ new Set(); ++ this.getCurrentNetworkEIP1559Compatibility = getCurrentNetworkEIP1559Compatibility; ++ this.getCurrentNetworkLegacyGasAPICompatibility = getCurrentNetworkLegacyGasAPICompatibility; ++ this.getCurrentAccountEIP1559Compatibility = getCurrentAccountEIP1559Compatibility; ++ __privateSet(this, _getProvider, getProvider); ++ this.EIP1559APIEndpoint = EIP1559APIEndpoint; ++ this.legacyAPIEndpoint = legacyAPIEndpoint; ++ this.clientId = clientId; ++ this.ethQuery = new EthQuery(__privateGet(this, _getProvider).call(this)); ++ if (onNetworkDidChange && getChainId) { ++ this.currentChainId = getChainId(); ++ onNetworkDidChange(async (networkControllerState) => { ++ await __privateMethod(this, _onNetworkControllerDidChange, onNetworkControllerDidChange_fn).call(this, networkControllerState); ++ }); ++ } else { ++ this.currentChainId = this.messagingSystem.call( ++ "NetworkController:getState" ++ ).providerConfig.chainId; ++ this.messagingSystem.subscribe( ++ "NetworkController:networkDidChange", ++ async (networkControllerState) => { ++ await __privateMethod(this, _onNetworkControllerDidChange, onNetworkControllerDidChange_fn).call(this, networkControllerState); ++ } ++ ); ++ } ++ } ++ async resetPolling() { ++ if (this.pollTokens.size !== 0) { ++ const tokens = Array.from(this.pollTokens); ++ this.stopPolling(); ++ await this.getGasFeeEstimatesAndStartPolling(tokens[0]); ++ tokens.slice(1).forEach((token) => { ++ this.pollTokens.add(token); ++ }); ++ } ++ } ++ async fetchGasFeeEstimates(options) { ++ return await this._fetchGasFeeEstimateData(options); ++ } ++ async getGasFeeEstimatesAndStartPolling(pollToken) { ++ const _pollToken = pollToken || random(); ++ this.pollTokens.add(_pollToken); ++ if (this.pollTokens.size === 1) { ++ await this._fetchGasFeeEstimateData(); ++ this._poll(); ++ } ++ return _pollToken; ++ } ++ /** ++ * Gets and sets gasFeeEstimates in state. ++ * ++ * @param options - The gas fee estimate options. ++ * @param options.shouldUpdateState - Determines whether the state should be updated with the ++ * updated gas estimates. ++ * @returns The gas fee estimates. ++ */ ++ async _fetchGasFeeEstimateData(options = {}) { ++ const { shouldUpdateState = true, networkClientId } = options; ++ let ethQuery, isEIP1559Compatible, isLegacyGasAPICompatible, decimalChainId; ++ if (networkClientId !== void 0) { ++ const networkClient = this.messagingSystem.call( ++ "NetworkController:getNetworkClientById", ++ networkClientId ++ ); ++ isLegacyGasAPICompatible = networkClient.configuration.chainId === "0x38"; ++ decimalChainId = convertHexToDecimal(networkClient.configuration.chainId); ++ try { ++ const result = await this.messagingSystem.call( ++ "NetworkController:getEIP1559Compatibility", ++ networkClientId ++ ); ++ isEIP1559Compatible = result || false; ++ } catch { ++ isEIP1559Compatible = false; ++ } ++ ethQuery = new EthQuery(networkClient.provider); ++ } ++ ethQuery ?? (ethQuery = this.ethQuery); ++ isLegacyGasAPICompatible ?? (isLegacyGasAPICompatible = this.getCurrentNetworkLegacyGasAPICompatibility()); ++ decimalChainId ?? (decimalChainId = convertHexToDecimal(this.currentChainId)); ++ try { ++ isEIP1559Compatible ?? (isEIP1559Compatible = await this.getEIP1559Compatibility()); ++ } catch (e) { ++ console.error(e); ++ isEIP1559Compatible ?? (isEIP1559Compatible = false); ++ } ++ const gasFeeCalculations = await determineGasFeeCalculations({ ++ isEIP1559Compatible, ++ isLegacyGasAPICompatible, ++ fetchGasEstimates, ++ fetchGasEstimatesUrl: this.EIP1559APIEndpoint.replace( ++ "", ++ `${decimalChainId}` ++ ), ++ fetchGasEstimatesViaEthFeeHistory, ++ fetchLegacyGasPriceEstimates, ++ fetchLegacyGasPriceEstimatesUrl: this.legacyAPIEndpoint.replace( ++ "", ++ `${decimalChainId}` ++ ), ++ fetchEthGasPriceEstimate, ++ calculateTimeEstimate, ++ clientId: this.clientId, ++ ethQuery ++ }); ++ if (shouldUpdateState) { ++ const chainId = toHex(decimalChainId); ++ this.update((state) => { ++ if (this.currentChainId === chainId) { ++ state.gasFeeEstimates = gasFeeCalculations.gasFeeEstimates; ++ state.estimatedGasFeeTimeBounds = gasFeeCalculations.estimatedGasFeeTimeBounds; ++ state.gasEstimateType = gasFeeCalculations.gasEstimateType; ++ } ++ state.gasFeeEstimatesByChainId ?? (state.gasFeeEstimatesByChainId = {}); ++ state.gasFeeEstimatesByChainId[chainId] = { ++ gasFeeEstimates: gasFeeCalculations.gasFeeEstimates, ++ estimatedGasFeeTimeBounds: gasFeeCalculations.estimatedGasFeeTimeBounds, ++ gasEstimateType: gasFeeCalculations.gasEstimateType ++ }; ++ }); ++ } ++ return gasFeeCalculations; ++ } ++ /** ++ * Remove the poll token, and stop polling if the set of poll tokens is empty. ++ * ++ * @param pollToken - The poll token to disconnect. ++ */ ++ disconnectPoller(pollToken) { ++ this.pollTokens.delete(pollToken); ++ if (this.pollTokens.size === 0) { ++ this.stopPolling(); ++ } ++ } ++ stopPolling() { ++ if (this.intervalId) { ++ clearInterval(this.intervalId); ++ } ++ this.pollTokens.clear(); ++ this.resetState(); ++ } ++ /** ++ * Prepare to discard this controller. ++ * ++ * This stops any active polling. ++ */ ++ destroy() { ++ super.destroy(); ++ this.stopPolling(); ++ } ++ _poll() { ++ if (this.intervalId) { ++ clearInterval(this.intervalId); ++ } ++ this.intervalId = setInterval(async () => { ++ await safelyExecute(() => this._fetchGasFeeEstimateData()); ++ }, this.intervalDelay); ++ } ++ /** ++ * Fetching token list from the Token Service API. ++ * ++ * @private ++ * @param networkClientId - The ID of the network client triggering the fetch. ++ * @returns A promise that resolves when this operation completes. ++ */ ++ async _executePoll(networkClientId) { ++ await this._fetchGasFeeEstimateData({ networkClientId }); ++ } ++ resetState() { ++ this.update(() => { ++ return defaultState; ++ }); ++ } ++ async getEIP1559Compatibility() { ++ const currentNetworkIsEIP1559Compatible = await this.getCurrentNetworkEIP1559Compatibility(); ++ const currentAccountIsEIP1559Compatible = this.getCurrentAccountEIP1559Compatibility?.() ?? true; ++ return currentNetworkIsEIP1559Compatible && currentAccountIsEIP1559Compatible; ++ } ++ getTimeEstimate(maxPriorityFeePerGas, maxFeePerGas) { ++ if (!this.state.gasFeeEstimates || this.state.gasEstimateType !== GAS_ESTIMATE_TYPES.FEE_MARKET) { ++ return {}; ++ } ++ return calculateTimeEstimate( ++ maxPriorityFeePerGas, ++ maxFeePerGas, ++ this.state.gasFeeEstimates ++ ); ++ } ++}; ++_getProvider = new WeakMap(); ++_onNetworkControllerDidChange = new WeakSet(); ++onNetworkControllerDidChange_fn = async function(networkControllerState) { ++ const newChainId = networkControllerState.providerConfig.chainId; ++ if (newChainId !== this.currentChainId) { ++ this.ethQuery = new EthQuery(__privateGet(this, _getProvider).call(this)); ++ await this.resetPolling(); ++ this.currentChainId = newChainId; ++ } ++}; ++var GasFeeController_default = GasFeeController; ++ ++// src/determineGasFeeCalculations.ts ++async function determineGasFeeCalculations({ ++ isEIP1559Compatible, ++ isLegacyGasAPICompatible, ++ fetchGasEstimates: fetchGasEstimates2, ++ fetchGasEstimatesUrl, ++ fetchGasEstimatesViaEthFeeHistory: fetchGasEstimatesViaEthFeeHistory2, ++ fetchLegacyGasPriceEstimates: fetchLegacyGasPriceEstimates2, ++ fetchLegacyGasPriceEstimatesUrl, ++ fetchEthGasPriceEstimate: fetchEthGasPriceEstimate2, ++ calculateTimeEstimate: calculateTimeEstimate2, ++ clientId, ++ ethQuery ++}) { ++ try { ++ if (isEIP1559Compatible) { ++ let estimates; ++ try { ++ estimates = await fetchGasEstimates2(fetchGasEstimatesUrl, clientId); ++ } catch { ++ estimates = await fetchGasEstimatesViaEthFeeHistory2(ethQuery); ++ } ++ const { suggestedMaxPriorityFeePerGas, suggestedMaxFeePerGas } = estimates.medium; ++ const estimatedGasFeeTimeBounds = calculateTimeEstimate2( ++ suggestedMaxPriorityFeePerGas, ++ suggestedMaxFeePerGas, ++ estimates ++ ); ++ return { ++ gasFeeEstimates: estimates, ++ estimatedGasFeeTimeBounds, ++ gasEstimateType: GAS_ESTIMATE_TYPES.FEE_MARKET ++ }; ++ } else if (isLegacyGasAPICompatible) { ++ const estimates = await fetchLegacyGasPriceEstimates2( ++ fetchLegacyGasPriceEstimatesUrl, ++ clientId ++ ); ++ return { ++ gasFeeEstimates: estimates, ++ estimatedGasFeeTimeBounds: {}, ++ gasEstimateType: GAS_ESTIMATE_TYPES.LEGACY ++ }; ++ } ++ throw new Error("Main gas fee/price estimation failed. Use fallback"); ++ } catch { ++ try { ++ const estimates = await fetchEthGasPriceEstimate2(ethQuery); ++ return { ++ gasFeeEstimates: estimates, ++ estimatedGasFeeTimeBounds: {}, ++ gasEstimateType: GAS_ESTIMATE_TYPES.ETH_GASPRICE ++ }; ++ } catch (error) { ++ if (error instanceof Error) { ++ throw new Error( ++ `Gas fee/price estimation failed. Message: ${error.message}` ++ ); ++ } ++ throw error; ++ } ++ } ++} ++ ++export { ++ determineGasFeeCalculations, ++ LEGACY_GAS_PRICES_API_URL, ++ GAS_ESTIMATE_TYPES, ++ GasFeeController, ++ GasFeeController_default ++}; ++//# sourceMappingURL=chunk-L45HVISM.mjs.map +\ No newline at end of file +diff --git a/dist/chunk-L45HVISM.mjs.map b/dist/chunk-L45HVISM.mjs.map +new file mode 100644 +index 0000000000000000000000000000000000000000..d45d573d02b1be6f8da2687a772e7dac7884d8ff +--- /dev/null ++++ b/dist/chunk-L45HVISM.mjs.map +@@ -0,0 +1 @@ ++{"version":3,"sources":["../src/GasFeeController.ts","../src/determineGasFeeCalculations.ts"],"sourcesContent":["import type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n RestrictedControllerMessenger,\n} from '@metamask/base-controller';\nimport {\n convertHexToDecimal,\n safelyExecute,\n toHex,\n} from '@metamask/controller-utils';\nimport EthQuery from '@metamask/eth-query';\nimport type {\n NetworkClientId,\n NetworkControllerGetEIP1559CompatibilityAction,\n NetworkControllerGetNetworkClientByIdAction,\n NetworkControllerGetStateAction,\n NetworkControllerNetworkDidChangeEvent,\n NetworkState,\n ProviderProxy,\n} from '@metamask/network-controller';\nimport { StaticIntervalPollingController } from '@metamask/polling-controller';\nimport type { Hex } from '@metamask/utils';\nimport { v1 as random } from 'uuid';\n\nimport determineGasFeeCalculations from './determineGasFeeCalculations';\nimport fetchGasEstimatesViaEthFeeHistory from './fetchGasEstimatesViaEthFeeHistory';\nimport {\n fetchGasEstimates,\n fetchLegacyGasPriceEstimates,\n fetchEthGasPriceEstimate,\n calculateTimeEstimate,\n} from './gas-util';\n\nexport const LEGACY_GAS_PRICES_API_URL = `https://api.metaswap.codefi.network/gasPrices`;\n\nexport type unknownString = 'unknown';\n\n// Fee Market describes the way gas is set after the london hardfork, and was\n// defined by EIP-1559.\nexport type FeeMarketEstimateType = 'fee-market';\n// Legacy describes gasPrice estimates from before london hardfork, when the\n// user is connected to mainnet and are presented with fast/average/slow\n// estimate levels to choose from.\nexport type LegacyEstimateType = 'legacy';\n// EthGasPrice describes a gasPrice estimate received from eth_gasPrice. Post\n// london this value should only be used for legacy type transactions when on\n// networks that support EIP-1559. This type of estimate is the most accurate\n// to display on custom networks that don't support EIP-1559.\nexport type EthGasPriceEstimateType = 'eth_gasPrice';\n// NoEstimate describes the state of the controller before receiving its first\n// estimate.\nexport type NoEstimateType = 'none';\n\n/**\n * Indicates which type of gasEstimate the controller is currently returning.\n * This is useful as a way of asserting that the shape of gasEstimates matches\n * expectations. NONE is a special case indicating that no previous gasEstimate\n * has been fetched.\n */\nexport const GAS_ESTIMATE_TYPES = {\n FEE_MARKET: 'fee-market' as FeeMarketEstimateType,\n LEGACY: 'legacy' as LegacyEstimateType,\n ETH_GASPRICE: 'eth_gasPrice' as EthGasPriceEstimateType,\n NONE: 'none' as NoEstimateType,\n};\n\nexport type GasEstimateType =\n | FeeMarketEstimateType\n | EthGasPriceEstimateType\n | LegacyEstimateType\n | NoEstimateType;\n\nexport type EstimatedGasFeeTimeBounds = {\n lowerTimeBound: number | null;\n upperTimeBound: number | unknownString;\n};\n\n/**\n * @type EthGasPriceEstimate\n *\n * A single gas price estimate for networks and accounts that don't support EIP-1559\n * This estimate comes from eth_gasPrice but is converted to dec gwei to match other\n * return values\n * @property gasPrice - A GWEI dec string\n */\n\nexport type EthGasPriceEstimate = {\n gasPrice: string;\n};\n\n/**\n * @type LegacyGasPriceEstimate\n *\n * A set of gas price estimates for networks and accounts that don't support EIP-1559\n * These estimates include low, medium and high all as strings representing gwei in\n * decimal format.\n * @property high - gasPrice, in decimal gwei string format, suggested for fast inclusion\n * @property medium - gasPrice, in decimal gwei string format, suggested for avg inclusion\n * @property low - gasPrice, in decimal gwei string format, suggested for slow inclusion\n */\nexport type LegacyGasPriceEstimate = {\n high: string;\n medium: string;\n low: string;\n};\n\n/**\n * @type Eip1559GasFee\n *\n * Data necessary to provide an estimate of a gas fee with a specific tip\n * @property minWaitTimeEstimate - The fastest the transaction will take, in milliseconds\n * @property maxWaitTimeEstimate - The slowest the transaction will take, in milliseconds\n * @property suggestedMaxPriorityFeePerGas - A suggested \"tip\", a GWEI hex number\n * @property suggestedMaxFeePerGas - A suggested max fee, the most a user will pay. a GWEI hex number\n */\nexport type Eip1559GasFee = {\n minWaitTimeEstimate: number; // a time duration in milliseconds\n maxWaitTimeEstimate: number; // a time duration in milliseconds\n suggestedMaxPriorityFeePerGas: string; // a GWEI decimal number\n suggestedMaxFeePerGas: string; // a GWEI decimal number\n};\n\n/**\n * @type GasFeeEstimates\n *\n * Data necessary to provide multiple GasFee estimates, and supporting information, to the user\n * @property low - A GasFee for a minimum necessary combination of tip and maxFee\n * @property medium - A GasFee for a recommended combination of tip and maxFee\n * @property high - A GasFee for a high combination of tip and maxFee\n * @property estimatedBaseFee - An estimate of what the base fee will be for the pending/next block. A GWEI dec number\n * @property networkCongestion - A normalized number that can be used to gauge the congestion\n * level of the network, with 0 meaning not congested and 1 meaning extremely congested\n */\nexport type GasFeeEstimates = SourcedGasFeeEstimates | FallbackGasFeeEstimates;\n\ntype SourcedGasFeeEstimates = {\n low: Eip1559GasFee;\n medium: Eip1559GasFee;\n high: Eip1559GasFee;\n estimatedBaseFee: string;\n historicalBaseFeeRange: [string, string];\n baseFeeTrend: 'up' | 'down' | 'level';\n latestPriorityFeeRange: [string, string];\n historicalPriorityFeeRange: [string, string];\n priorityFeeTrend: 'up' | 'down' | 'level';\n networkCongestion: number;\n};\n\ntype FallbackGasFeeEstimates = {\n low: Eip1559GasFee;\n medium: Eip1559GasFee;\n high: Eip1559GasFee;\n estimatedBaseFee: string;\n historicalBaseFeeRange: null;\n baseFeeTrend: null;\n latestPriorityFeeRange: null;\n historicalPriorityFeeRange: null;\n priorityFeeTrend: null;\n networkCongestion: null;\n};\n\nconst metadata = {\n gasFeeEstimatesByChainId: {\n persist: true,\n anonymous: false,\n },\n gasFeeEstimates: { persist: true, anonymous: false },\n estimatedGasFeeTimeBounds: { persist: true, anonymous: false },\n gasEstimateType: { persist: true, anonymous: false },\n};\n\nexport type GasFeeStateEthGasPrice = {\n gasFeeEstimates: EthGasPriceEstimate;\n estimatedGasFeeTimeBounds: Record;\n gasEstimateType: EthGasPriceEstimateType;\n};\n\nexport type GasFeeStateFeeMarket = {\n gasFeeEstimates: GasFeeEstimates;\n estimatedGasFeeTimeBounds: EstimatedGasFeeTimeBounds | Record;\n gasEstimateType: FeeMarketEstimateType;\n};\n\nexport type GasFeeStateLegacy = {\n gasFeeEstimates: LegacyGasPriceEstimate;\n estimatedGasFeeTimeBounds: Record;\n gasEstimateType: LegacyEstimateType;\n};\n\nexport type GasFeeStateNoEstimates = {\n gasFeeEstimates: Record;\n estimatedGasFeeTimeBounds: Record;\n gasEstimateType: NoEstimateType;\n};\n\nexport type FetchGasFeeEstimateOptions = {\n shouldUpdateState?: boolean;\n networkClientId?: NetworkClientId;\n};\n\n/**\n * @type GasFeeState\n *\n * Gas Fee controller state\n * @property gasFeeEstimates - Gas fee estimate data based on new EIP-1559 properties\n * @property estimatedGasFeeTimeBounds - Estimates representing the minimum and maximum\n */\nexport type SingleChainGasFeeState =\n | GasFeeStateEthGasPrice\n | GasFeeStateFeeMarket\n | GasFeeStateLegacy\n | GasFeeStateNoEstimates;\n\nexport type GasFeeEstimatesByChainId = {\n gasFeeEstimatesByChainId?: Record;\n};\n\nexport type GasFeeState = GasFeeEstimatesByChainId & SingleChainGasFeeState;\n\nconst name = 'GasFeeController';\n\nexport type GasFeeStateChange = ControllerStateChangeEvent<\n typeof name,\n GasFeeState\n>;\n\nexport type GetGasFeeState = ControllerGetStateAction;\n\nexport type GasFeeControllerActions = GetGasFeeState;\n\nexport type GasFeeControllerEvents = GasFeeStateChange;\n\ntype AllowedActions =\n | NetworkControllerGetStateAction\n | NetworkControllerGetNetworkClientByIdAction\n | NetworkControllerGetEIP1559CompatibilityAction;\n\ntype GasFeeMessenger = RestrictedControllerMessenger<\n typeof name,\n GasFeeControllerActions | AllowedActions,\n GasFeeControllerEvents | NetworkControllerNetworkDidChangeEvent,\n AllowedActions['type'],\n NetworkControllerNetworkDidChangeEvent['type']\n>;\n\nconst defaultState: GasFeeState = {\n gasFeeEstimatesByChainId: {},\n gasFeeEstimates: {},\n estimatedGasFeeTimeBounds: {},\n gasEstimateType: GAS_ESTIMATE_TYPES.NONE,\n};\n\n/**\n * Controller that retrieves gas fee estimate data and polls for updated data on a set interval\n */\nexport class GasFeeController extends StaticIntervalPollingController<\n typeof name,\n GasFeeState,\n GasFeeMessenger\n> {\n private intervalId?: ReturnType;\n\n private readonly intervalDelay;\n\n private readonly pollTokens: Set;\n\n private readonly legacyAPIEndpoint: string;\n\n private readonly EIP1559APIEndpoint: string;\n\n private readonly getCurrentNetworkEIP1559Compatibility;\n\n private readonly getCurrentNetworkLegacyGasAPICompatibility;\n\n private readonly getCurrentAccountEIP1559Compatibility;\n\n private currentChainId;\n\n private ethQuery?: EthQuery;\n\n private readonly clientId?: string;\n\n #getProvider: () => ProviderProxy;\n\n /**\n * Creates a GasFeeController instance.\n *\n * @param options - The controller options.\n * @param options.interval - The time in milliseconds to wait between polls.\n * @param options.messenger - The controller messenger.\n * @param options.state - The initial state.\n * @param options.getCurrentNetworkEIP1559Compatibility - Determines whether or not the current\n * network is EIP-1559 compatible.\n * @param options.getCurrentNetworkLegacyGasAPICompatibility - Determines whether or not the\n * current network is compatible with the legacy gas price API.\n * @param options.getCurrentAccountEIP1559Compatibility - Determines whether or not the current\n * account is EIP-1559 compatible.\n * @param options.getChainId - Returns the current chain ID.\n * @param options.getProvider - Returns a network provider for the current network.\n * @param options.onNetworkDidChange - A function for registering an event handler for the\n * network state change event.\n * @param options.legacyAPIEndpoint - The legacy gas price API URL. This option is primarily for\n * testing purposes.\n * @param options.EIP1559APIEndpoint - The EIP-1559 gas price API URL.\n * @param options.clientId - The client ID used to identify to the gas estimation API who is\n * asking for estimates.\n */\n constructor({\n interval = 15000,\n messenger,\n state,\n getCurrentNetworkEIP1559Compatibility,\n getCurrentAccountEIP1559Compatibility,\n getChainId,\n getCurrentNetworkLegacyGasAPICompatibility,\n getProvider,\n onNetworkDidChange,\n legacyAPIEndpoint = LEGACY_GAS_PRICES_API_URL,\n EIP1559APIEndpoint,\n clientId,\n }: {\n interval?: number;\n messenger: GasFeeMessenger;\n state?: GasFeeState;\n getCurrentNetworkEIP1559Compatibility: () => Promise;\n getCurrentNetworkLegacyGasAPICompatibility: () => boolean;\n getCurrentAccountEIP1559Compatibility?: () => boolean;\n getChainId?: () => Hex;\n getProvider: () => ProviderProxy;\n onNetworkDidChange?: (listener: (state: NetworkState) => void) => void;\n legacyAPIEndpoint?: string;\n EIP1559APIEndpoint: string;\n clientId?: string;\n }) {\n super({\n name,\n metadata,\n messenger,\n state: { ...defaultState, ...state },\n });\n this.intervalDelay = interval;\n this.setIntervalLength(interval);\n this.pollTokens = new Set();\n this.getCurrentNetworkEIP1559Compatibility =\n getCurrentNetworkEIP1559Compatibility;\n this.getCurrentNetworkLegacyGasAPICompatibility =\n getCurrentNetworkLegacyGasAPICompatibility;\n this.getCurrentAccountEIP1559Compatibility =\n getCurrentAccountEIP1559Compatibility;\n this.#getProvider = getProvider;\n this.EIP1559APIEndpoint = EIP1559APIEndpoint;\n this.legacyAPIEndpoint = legacyAPIEndpoint;\n this.clientId = clientId;\n\n this.ethQuery = new EthQuery(this.#getProvider());\n\n if (onNetworkDidChange && getChainId) {\n this.currentChainId = getChainId();\n onNetworkDidChange(async (networkControllerState) => {\n await this.#onNetworkControllerDidChange(networkControllerState);\n });\n } else {\n this.currentChainId = this.messagingSystem.call(\n 'NetworkController:getState',\n ).providerConfig.chainId;\n this.messagingSystem.subscribe(\n 'NetworkController:networkDidChange',\n async (networkControllerState) => {\n await this.#onNetworkControllerDidChange(networkControllerState);\n },\n );\n }\n }\n\n async resetPolling() {\n if (this.pollTokens.size !== 0) {\n const tokens = Array.from(this.pollTokens);\n this.stopPolling();\n await this.getGasFeeEstimatesAndStartPolling(tokens[0]);\n tokens.slice(1).forEach((token) => {\n this.pollTokens.add(token);\n });\n }\n }\n\n async fetchGasFeeEstimates(options?: FetchGasFeeEstimateOptions) {\n return await this._fetchGasFeeEstimateData(options);\n }\n\n async getGasFeeEstimatesAndStartPolling(\n pollToken: string | undefined,\n ): Promise {\n const _pollToken = pollToken || random();\n\n this.pollTokens.add(_pollToken);\n\n if (this.pollTokens.size === 1) {\n await this._fetchGasFeeEstimateData();\n this._poll();\n }\n\n return _pollToken;\n }\n\n /**\n * Gets and sets gasFeeEstimates in state.\n *\n * @param options - The gas fee estimate options.\n * @param options.shouldUpdateState - Determines whether the state should be updated with the\n * updated gas estimates.\n * @returns The gas fee estimates.\n */\n async _fetchGasFeeEstimateData(\n options: FetchGasFeeEstimateOptions = {},\n ): Promise {\n const { shouldUpdateState = true, networkClientId } = options;\n\n let ethQuery,\n isEIP1559Compatible,\n isLegacyGasAPICompatible,\n decimalChainId: number;\n\n if (networkClientId !== undefined) {\n const networkClient = this.messagingSystem.call(\n 'NetworkController:getNetworkClientById',\n networkClientId,\n );\n isLegacyGasAPICompatible = networkClient.configuration.chainId === '0x38';\n\n decimalChainId = convertHexToDecimal(networkClient.configuration.chainId);\n\n try {\n const result = await this.messagingSystem.call(\n 'NetworkController:getEIP1559Compatibility',\n networkClientId,\n );\n isEIP1559Compatible = result || false;\n } catch {\n isEIP1559Compatible = false;\n }\n ethQuery = new EthQuery(networkClient.provider);\n }\n\n ethQuery ??= this.ethQuery;\n\n isLegacyGasAPICompatible ??=\n this.getCurrentNetworkLegacyGasAPICompatibility();\n\n decimalChainId ??= convertHexToDecimal(this.currentChainId);\n\n try {\n isEIP1559Compatible ??= await this.getEIP1559Compatibility();\n } catch (e) {\n console.error(e);\n isEIP1559Compatible ??= false;\n }\n\n const gasFeeCalculations = await determineGasFeeCalculations({\n isEIP1559Compatible,\n isLegacyGasAPICompatible,\n fetchGasEstimates,\n fetchGasEstimatesUrl: this.EIP1559APIEndpoint.replace(\n '',\n `${decimalChainId}`,\n ),\n fetchGasEstimatesViaEthFeeHistory,\n fetchLegacyGasPriceEstimates,\n fetchLegacyGasPriceEstimatesUrl: this.legacyAPIEndpoint.replace(\n '',\n `${decimalChainId}`,\n ),\n fetchEthGasPriceEstimate,\n calculateTimeEstimate,\n clientId: this.clientId,\n ethQuery,\n });\n\n if (shouldUpdateState) {\n const chainId = toHex(decimalChainId);\n this.update((state) => {\n if (this.currentChainId === chainId) {\n state.gasFeeEstimates = gasFeeCalculations.gasFeeEstimates;\n state.estimatedGasFeeTimeBounds =\n gasFeeCalculations.estimatedGasFeeTimeBounds;\n state.gasEstimateType = gasFeeCalculations.gasEstimateType;\n }\n state.gasFeeEstimatesByChainId ??= {};\n state.gasFeeEstimatesByChainId[chainId] = {\n gasFeeEstimates: gasFeeCalculations.gasFeeEstimates,\n estimatedGasFeeTimeBounds:\n gasFeeCalculations.estimatedGasFeeTimeBounds,\n gasEstimateType: gasFeeCalculations.gasEstimateType,\n } as SingleChainGasFeeState;\n });\n }\n\n return gasFeeCalculations;\n }\n\n /**\n * Remove the poll token, and stop polling if the set of poll tokens is empty.\n *\n * @param pollToken - The poll token to disconnect.\n */\n disconnectPoller(pollToken: string) {\n this.pollTokens.delete(pollToken);\n if (this.pollTokens.size === 0) {\n this.stopPolling();\n }\n }\n\n stopPolling() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n this.pollTokens.clear();\n this.resetState();\n }\n\n /**\n * Prepare to discard this controller.\n *\n * This stops any active polling.\n */\n override destroy() {\n super.destroy();\n this.stopPolling();\n }\n\n private _poll() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n\n this.intervalId = setInterval(async () => {\n await safelyExecute(() => this._fetchGasFeeEstimateData());\n }, this.intervalDelay);\n }\n\n /**\n * Fetching token list from the Token Service API.\n *\n * @private\n * @param networkClientId - The ID of the network client triggering the fetch.\n * @returns A promise that resolves when this operation completes.\n */\n async _executePoll(networkClientId: string): Promise {\n await this._fetchGasFeeEstimateData({ networkClientId });\n }\n\n private resetState() {\n this.update(() => {\n return defaultState;\n });\n }\n\n private async getEIP1559Compatibility() {\n const currentNetworkIsEIP1559Compatible =\n await this.getCurrentNetworkEIP1559Compatibility();\n const currentAccountIsEIP1559Compatible =\n this.getCurrentAccountEIP1559Compatibility?.() ?? true;\n\n return (\n currentNetworkIsEIP1559Compatible && currentAccountIsEIP1559Compatible\n );\n }\n\n getTimeEstimate(\n maxPriorityFeePerGas: string,\n maxFeePerGas: string,\n ): EstimatedGasFeeTimeBounds | Record {\n if (\n !this.state.gasFeeEstimates ||\n this.state.gasEstimateType !== GAS_ESTIMATE_TYPES.FEE_MARKET\n ) {\n return {};\n }\n return calculateTimeEstimate(\n maxPriorityFeePerGas,\n maxFeePerGas,\n this.state.gasFeeEstimates,\n );\n }\n\n async #onNetworkControllerDidChange(networkControllerState: NetworkState) {\n const newChainId = networkControllerState.providerConfig.chainId;\n\n if (newChainId !== this.currentChainId) {\n this.ethQuery = new EthQuery(this.#getProvider());\n await this.resetPolling();\n\n this.currentChainId = newChainId;\n }\n }\n}\n\nexport default GasFeeController;\n","import type {\n EstimatedGasFeeTimeBounds,\n EthGasPriceEstimate,\n GasFeeEstimates,\n GasFeeState as GasFeeCalculations,\n LegacyGasPriceEstimate,\n} from './GasFeeController';\nimport { GAS_ESTIMATE_TYPES } from './GasFeeController';\n\n/**\n * Obtains a set of max base and priority fee estimates along with time estimates so that we\n * can present them to users when they are sending transactions or making swaps.\n *\n * @param args - The arguments.\n * @param args.isEIP1559Compatible - Governs whether or not we can use an EIP-1559-only method to\n * produce estimates.\n * @param args.isLegacyGasAPICompatible - Governs whether or not we can use a non-EIP-1559 method to\n * produce estimates (for instance, testnets do not support estimates altogether).\n * @param args.fetchGasEstimates - A function that fetches gas estimates using an EIP-1559-specific\n * API.\n * @param args.fetchGasEstimatesUrl - The URL for the API we can use to obtain EIP-1559-specific\n * estimates.\n * @param args.fetchGasEstimatesViaEthFeeHistory - A function that fetches gas estimates using\n * `eth_feeHistory` (an EIP-1559 feature).\n * @param args.fetchLegacyGasPriceEstimates - A function that fetches gas estimates using an\n * non-EIP-1559-specific API.\n * @param args.fetchLegacyGasPriceEstimatesUrl - The URL for the API we can use to obtain\n * non-EIP-1559-specific estimates.\n * @param args.fetchEthGasPriceEstimate - A function that fetches gas estimates using\n * `eth_gasPrice`.\n * @param args.calculateTimeEstimate - A function that determine time estimate bounds.\n * @param args.clientId - An identifier that an API can use to know who is asking for estimates.\n * @param args.ethQuery - An EthQuery instance we can use to talk to Ethereum directly.\n * @returns The gas fee calculations.\n */\nexport default async function determineGasFeeCalculations({\n isEIP1559Compatible,\n isLegacyGasAPICompatible,\n fetchGasEstimates,\n fetchGasEstimatesUrl,\n fetchGasEstimatesViaEthFeeHistory,\n fetchLegacyGasPriceEstimates,\n fetchLegacyGasPriceEstimatesUrl,\n fetchEthGasPriceEstimate,\n calculateTimeEstimate,\n clientId,\n ethQuery,\n}: {\n isEIP1559Compatible: boolean;\n isLegacyGasAPICompatible: boolean;\n fetchGasEstimates: (\n url: string,\n clientId?: string,\n ) => Promise;\n fetchGasEstimatesUrl: string;\n fetchGasEstimatesViaEthFeeHistory: (\n // TODO: Replace `any` with type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ethQuery: any,\n ) => Promise;\n fetchLegacyGasPriceEstimates: (\n url: string,\n clientId?: string,\n ) => Promise;\n fetchLegacyGasPriceEstimatesUrl: string;\n // TODO: Replace `any` with type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fetchEthGasPriceEstimate: (ethQuery: any) => Promise;\n calculateTimeEstimate: (\n maxPriorityFeePerGas: string,\n maxFeePerGas: string,\n gasFeeEstimates: GasFeeEstimates,\n ) => EstimatedGasFeeTimeBounds;\n clientId: string | undefined;\n // TODO: Replace `any` with type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ethQuery: any;\n}): Promise {\n try {\n if (isEIP1559Compatible) {\n let estimates: GasFeeEstimates;\n try {\n estimates = await fetchGasEstimates(fetchGasEstimatesUrl, clientId);\n } catch {\n estimates = await fetchGasEstimatesViaEthFeeHistory(ethQuery);\n }\n const { suggestedMaxPriorityFeePerGas, suggestedMaxFeePerGas } =\n estimates.medium;\n const estimatedGasFeeTimeBounds = calculateTimeEstimate(\n suggestedMaxPriorityFeePerGas,\n suggestedMaxFeePerGas,\n estimates,\n );\n return {\n gasFeeEstimates: estimates,\n estimatedGasFeeTimeBounds,\n gasEstimateType: GAS_ESTIMATE_TYPES.FEE_MARKET,\n };\n } else if (isLegacyGasAPICompatible) {\n const estimates = await fetchLegacyGasPriceEstimates(\n fetchLegacyGasPriceEstimatesUrl,\n clientId,\n );\n return {\n gasFeeEstimates: estimates,\n estimatedGasFeeTimeBounds: {},\n gasEstimateType: GAS_ESTIMATE_TYPES.LEGACY,\n };\n }\n throw new Error('Main gas fee/price estimation failed. Use fallback');\n } catch {\n try {\n const estimates = await fetchEthGasPriceEstimate(ethQuery);\n return {\n gasFeeEstimates: estimates,\n estimatedGasFeeTimeBounds: {},\n gasEstimateType: GAS_ESTIMATE_TYPES.ETH_GASPRICE,\n };\n } catch (error) {\n if (error instanceof Error) {\n throw new Error(\n `Gas fee/price estimation failed. Message: ${error.message}`,\n );\n }\n throw error;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAKA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,OAAO,cAAc;AAUrB,SAAS,uCAAuC;AAEhD,SAAS,MAAM,cAAc;AAWtB,IAAM,4BAA4B;AA0BlC,IAAM,qBAAqB;AAAA,EAChC,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,MAAM;AACR;AAiGA,IAAM,WAAW;AAAA,EACf,0BAA0B;AAAA,IACxB,SAAS;AAAA,IACT,WAAW;AAAA,EACb;AAAA,EACA,iBAAiB,EAAE,SAAS,MAAM,WAAW,MAAM;AAAA,EACnD,2BAA2B,EAAE,SAAS,MAAM,WAAW,MAAM;AAAA,EAC7D,iBAAiB,EAAE,SAAS,MAAM,WAAW,MAAM;AACrD;AAkDA,IAAM,OAAO;AA0Bb,IAAM,eAA4B;AAAA,EAChC,0BAA0B,CAAC;AAAA,EAC3B,iBAAiB,CAAC;AAAA,EAClB,2BAA2B,CAAC;AAAA,EAC5B,iBAAiB,mBAAmB;AACtC;AA1PA;AA+PO,IAAM,mBAAN,cAA+B,gCAIpC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgDA,YAAY;AAAA,IACV,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,oBAAoB;AAAA,IACpB;AAAA,IACA;AAAA,EAC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A,QACjB,2BAA2B,CAAC;AAAA,QAC5B,iBAAiB,mBAAmB;AAAA,MACtC;AAAA,IACF;AACA,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE,QAAQ;AACN,QAAI;AACF,YAAM,YAAY,MAAMC,0BAAyB,QAAQ;AACzD,aAAO;AAAA,QACL,iBAAiB;AAAA,QACjB,2BAA2B,CAAC;AAAA,QAC5B,iBAAiB,mBAAmB;AAAA,MACtC;AAAA,IACF,SAAS,OAAO;AACd,UAAI,iBAAiB,OAAO;AAC1B,cAAM,IAAI;AAAA,UACR,6CAA6C,MAAM,OAAO;AAAA,QAC5D;AAAA,MACF;AACA,YAAM;AAAA,IACR;AAAA,EACF;AACF;","names":["fetchGasEstimates","fetchGasEstimatesViaEthFeeHistory","fetchLegacyGasPriceEstimates","fetchEthGasPriceEstimate","calculateTimeEstimate"]} +\ No newline at end of file +diff --git a/dist/chunk-N5BANBTW.js b/dist/chunk-N5BANBTW.js +deleted file mode 100644 +index 1af6409114a301a745ababc04fc13602ab97fa5e..0000000000000000000000000000000000000000 +--- a/dist/chunk-N5BANBTW.js ++++ /dev/null +@@ -1,367 +0,0 @@ +-"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +- +-var _chunkEZVGDV5Hjs = require('./chunk-EZVGDV5H.js'); +- +- +- +- +- +-var _chunkF46NZXRQjs = require('./chunk-F46NZXRQ.js'); +- +- +- +- +- +-var _chunkZ4BLTVTBjs = require('./chunk-Z4BLTVTB.js'); +- +-// src/GasFeeController.ts +- +- +- +- +-var _controllerutils = require('@metamask/controller-utils'); +-var _ethquery = require('@metamask/eth-query'); var _ethquery2 = _interopRequireDefault(_ethquery); +-var _pollingcontroller = require('@metamask/polling-controller'); +-var _uuid = require('uuid'); +-var LEGACY_GAS_PRICES_API_URL = `https://api.metaswap.codefi.network/gasPrices`; +-var GAS_ESTIMATE_TYPES = { +- FEE_MARKET: "fee-market", +- LEGACY: "legacy", +- ETH_GASPRICE: "eth_gasPrice", +- NONE: "none" +-}; +-var metadata = { +- gasFeeEstimatesByChainId: { +- persist: true, +- anonymous: false +- }, +- gasFeeEstimates: { persist: true, anonymous: false }, +- estimatedGasFeeTimeBounds: { persist: true, anonymous: false }, +- gasEstimateType: { persist: true, anonymous: false } +-}; +-var name = "GasFeeController"; +-var defaultState = { +- gasFeeEstimatesByChainId: {}, +- gasFeeEstimates: {}, +- estimatedGasFeeTimeBounds: {}, +- gasEstimateType: GAS_ESTIMATE_TYPES.NONE +-}; +-var _getProvider, _onNetworkControllerDidChange, onNetworkControllerDidChange_fn; +-var GasFeeController = class extends _pollingcontroller.StaticIntervalPollingController { +- /** +- * Creates a GasFeeController instance. +- * +- * @param options - The controller options. +- * @param options.interval - The time in milliseconds to wait between polls. +- * @param options.messenger - The controller messenger. +- * @param options.state - The initial state. +- * @param options.getCurrentNetworkEIP1559Compatibility - Determines whether or not the current +- * network is EIP-1559 compatible. +- * @param options.getCurrentNetworkLegacyGasAPICompatibility - Determines whether or not the +- * current network is compatible with the legacy gas price API. +- * @param options.getCurrentAccountEIP1559Compatibility - Determines whether or not the current +- * account is EIP-1559 compatible. +- * @param options.getChainId - Returns the current chain ID. +- * @param options.getProvider - Returns a network provider for the current network. +- * @param options.onNetworkDidChange - A function for registering an event handler for the +- * network state change event. +- * @param options.legacyAPIEndpoint - The legacy gas price API URL. This option is primarily for +- * testing purposes. +- * @param options.EIP1559APIEndpoint - The EIP-1559 gas price API URL. +- * @param options.clientId - The client ID used to identify to the gas estimation API who is +- * asking for estimates. +- */ +- constructor({ +- interval = 15e3, +- messenger, +- state, +- getCurrentNetworkEIP1559Compatibility, +- getCurrentAccountEIP1559Compatibility, +- getChainId, +- getCurrentNetworkLegacyGasAPICompatibility, +- getProvider, +- onNetworkDidChange, +- legacyAPIEndpoint = LEGACY_GAS_PRICES_API_URL, +- EIP1559APIEndpoint, +- clientId +- }) { +- super({ +- name, +- metadata, +- messenger, +- state: { ...defaultState, ...state } +- }); +- _chunkZ4BLTVTBjs.__privateAdd.call(void 0, this, _onNetworkControllerDidChange); +- _chunkZ4BLTVTBjs.__privateAdd.call(void 0, this, _getProvider, void 0); +- this.intervalDelay = interval; +- this.setIntervalLength(interval); +- this.pollTokens = /* @__PURE__ */ new Set(); +- this.getCurrentNetworkEIP1559Compatibility = getCurrentNetworkEIP1559Compatibility; +- this.getCurrentNetworkLegacyGasAPICompatibility = getCurrentNetworkLegacyGasAPICompatibility; +- this.getCurrentAccountEIP1559Compatibility = getCurrentAccountEIP1559Compatibility; +- _chunkZ4BLTVTBjs.__privateSet.call(void 0, this, _getProvider, getProvider); +- this.EIP1559APIEndpoint = EIP1559APIEndpoint; +- this.legacyAPIEndpoint = legacyAPIEndpoint; +- this.clientId = clientId; +- this.ethQuery = new (0, _ethquery2.default)(_chunkZ4BLTVTBjs.__privateGet.call(void 0, this, _getProvider).call(this)); +- if (onNetworkDidChange && getChainId) { +- this.currentChainId = getChainId(); +- onNetworkDidChange(async (networkControllerState) => { +- await _chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _onNetworkControllerDidChange, onNetworkControllerDidChange_fn).call(this, networkControllerState); +- }); +- } else { +- this.currentChainId = this.messagingSystem.call( +- "NetworkController:getState" +- ).providerConfig.chainId; +- this.messagingSystem.subscribe( +- "NetworkController:networkDidChange", +- async (networkControllerState) => { +- await _chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _onNetworkControllerDidChange, onNetworkControllerDidChange_fn).call(this, networkControllerState); +- } +- ); +- } +- } +- async resetPolling() { +- if (this.pollTokens.size !== 0) { +- const tokens = Array.from(this.pollTokens); +- this.stopPolling(); +- await this.getGasFeeEstimatesAndStartPolling(tokens[0]); +- tokens.slice(1).forEach((token) => { +- this.pollTokens.add(token); +- }); +- } +- } +- async fetchGasFeeEstimates(options) { +- return await this._fetchGasFeeEstimateData(options); +- } +- async getGasFeeEstimatesAndStartPolling(pollToken) { +- const _pollToken = pollToken || _uuid.v1.call(void 0, ); +- this.pollTokens.add(_pollToken); +- if (this.pollTokens.size === 1) { +- await this._fetchGasFeeEstimateData(); +- this._poll(); +- } +- return _pollToken; +- } +- /** +- * Gets and sets gasFeeEstimates in state. +- * +- * @param options - The gas fee estimate options. +- * @param options.shouldUpdateState - Determines whether the state should be updated with the +- * updated gas estimates. +- * @returns The gas fee estimates. +- */ +- async _fetchGasFeeEstimateData(options = {}) { +- const { shouldUpdateState = true, networkClientId } = options; +- let ethQuery, isEIP1559Compatible, isLegacyGasAPICompatible, decimalChainId; +- if (networkClientId !== void 0) { +- const networkClient = this.messagingSystem.call( +- "NetworkController:getNetworkClientById", +- networkClientId +- ); +- isLegacyGasAPICompatible = networkClient.configuration.chainId === "0x38"; +- decimalChainId = _controllerutils.convertHexToDecimal.call(void 0, networkClient.configuration.chainId); +- try { +- const result = await this.messagingSystem.call( +- "NetworkController:getEIP1559Compatibility", +- networkClientId +- ); +- isEIP1559Compatible = result || false; +- } catch { +- isEIP1559Compatible = false; +- } +- ethQuery = new (0, _ethquery2.default)(networkClient.provider); +- } +- ethQuery ?? (ethQuery = this.ethQuery); +- isLegacyGasAPICompatible ?? (isLegacyGasAPICompatible = this.getCurrentNetworkLegacyGasAPICompatibility()); +- decimalChainId ?? (decimalChainId = _controllerutils.convertHexToDecimal.call(void 0, this.currentChainId)); +- try { +- isEIP1559Compatible ?? (isEIP1559Compatible = await this.getEIP1559Compatibility()); +- } catch (e) { +- console.error(e); +- isEIP1559Compatible ?? (isEIP1559Compatible = false); +- } +- const gasFeeCalculations = await determineGasFeeCalculations({ +- isEIP1559Compatible, +- isLegacyGasAPICompatible, +- fetchGasEstimates: _chunkF46NZXRQjs.fetchGasEstimates, +- fetchGasEstimatesUrl: this.EIP1559APIEndpoint.replace( +- "", +- `${decimalChainId}` +- ), +- fetchGasEstimatesViaEthFeeHistory: _chunkEZVGDV5Hjs.fetchGasEstimatesViaEthFeeHistory, +- fetchLegacyGasPriceEstimates: _chunkF46NZXRQjs.fetchLegacyGasPriceEstimates, +- fetchLegacyGasPriceEstimatesUrl: this.legacyAPIEndpoint.replace( +- "", +- `${decimalChainId}` +- ), +- fetchEthGasPriceEstimate: _chunkF46NZXRQjs.fetchEthGasPriceEstimate, +- calculateTimeEstimate: _chunkF46NZXRQjs.calculateTimeEstimate, +- clientId: this.clientId, +- ethQuery +- }); +- if (shouldUpdateState) { +- this.update((state) => { +- state.gasFeeEstimates = gasFeeCalculations.gasFeeEstimates; +- state.estimatedGasFeeTimeBounds = gasFeeCalculations.estimatedGasFeeTimeBounds; +- state.gasEstimateType = gasFeeCalculations.gasEstimateType; +- state.gasFeeEstimatesByChainId ?? (state.gasFeeEstimatesByChainId = {}); +- state.gasFeeEstimatesByChainId[_controllerutils.toHex.call(void 0, decimalChainId)] = { +- gasFeeEstimates: gasFeeCalculations.gasFeeEstimates, +- estimatedGasFeeTimeBounds: gasFeeCalculations.estimatedGasFeeTimeBounds, +- gasEstimateType: gasFeeCalculations.gasEstimateType +- }; +- }); +- } +- return gasFeeCalculations; +- } +- /** +- * Remove the poll token, and stop polling if the set of poll tokens is empty. +- * +- * @param pollToken - The poll token to disconnect. +- */ +- disconnectPoller(pollToken) { +- this.pollTokens.delete(pollToken); +- if (this.pollTokens.size === 0) { +- this.stopPolling(); +- } +- } +- stopPolling() { +- if (this.intervalId) { +- clearInterval(this.intervalId); +- } +- this.pollTokens.clear(); +- this.resetState(); +- } +- /** +- * Prepare to discard this controller. +- * +- * This stops any active polling. +- */ +- destroy() { +- super.destroy(); +- this.stopPolling(); +- } +- _poll() { +- if (this.intervalId) { +- clearInterval(this.intervalId); +- } +- this.intervalId = setInterval(async () => { +- await _controllerutils.safelyExecute.call(void 0, () => this._fetchGasFeeEstimateData()); +- }, this.intervalDelay); +- } +- /** +- * Fetching token list from the Token Service API. +- * +- * @private +- * @param networkClientId - The ID of the network client triggering the fetch. +- * @returns A promise that resolves when this operation completes. +- */ +- async _executePoll(networkClientId) { +- await this._fetchGasFeeEstimateData({ networkClientId }); +- } +- resetState() { +- this.update(() => { +- return defaultState; +- }); +- } +- async getEIP1559Compatibility() { +- const currentNetworkIsEIP1559Compatible = await this.getCurrentNetworkEIP1559Compatibility(); +- const currentAccountIsEIP1559Compatible = this.getCurrentAccountEIP1559Compatibility?.() ?? true; +- return currentNetworkIsEIP1559Compatible && currentAccountIsEIP1559Compatible; +- } +- getTimeEstimate(maxPriorityFeePerGas, maxFeePerGas) { +- if (!this.state.gasFeeEstimates || this.state.gasEstimateType !== GAS_ESTIMATE_TYPES.FEE_MARKET) { +- return {}; +- } +- return _chunkF46NZXRQjs.calculateTimeEstimate.call(void 0, +- maxPriorityFeePerGas, +- maxFeePerGas, +- this.state.gasFeeEstimates +- ); +- } +-}; +-_getProvider = new WeakMap(); +-_onNetworkControllerDidChange = new WeakSet(); +-onNetworkControllerDidChange_fn = async function(networkControllerState) { +- const newChainId = networkControllerState.providerConfig.chainId; +- if (newChainId !== this.currentChainId) { +- this.ethQuery = new (0, _ethquery2.default)(_chunkZ4BLTVTBjs.__privateGet.call(void 0, this, _getProvider).call(this)); +- await this.resetPolling(); +- this.currentChainId = newChainId; +- } +-}; +-var GasFeeController_default = GasFeeController; +- +-// src/determineGasFeeCalculations.ts +-async function determineGasFeeCalculations({ +- isEIP1559Compatible, +- isLegacyGasAPICompatible, +- fetchGasEstimates: fetchGasEstimates2, +- fetchGasEstimatesUrl, +- fetchGasEstimatesViaEthFeeHistory: fetchGasEstimatesViaEthFeeHistory2, +- fetchLegacyGasPriceEstimates: fetchLegacyGasPriceEstimates2, +- fetchLegacyGasPriceEstimatesUrl, +- fetchEthGasPriceEstimate: fetchEthGasPriceEstimate2, +- calculateTimeEstimate: calculateTimeEstimate2, +- clientId, +- ethQuery +-}) { +- try { +- if (isEIP1559Compatible) { +- let estimates; +- try { +- estimates = await fetchGasEstimates2(fetchGasEstimatesUrl, clientId); +- } catch { +- estimates = await fetchGasEstimatesViaEthFeeHistory2(ethQuery); +- } +- const { suggestedMaxPriorityFeePerGas, suggestedMaxFeePerGas } = estimates.medium; +- const estimatedGasFeeTimeBounds = calculateTimeEstimate2( +- suggestedMaxPriorityFeePerGas, +- suggestedMaxFeePerGas, +- estimates +- ); +- return { +- gasFeeEstimates: estimates, +- estimatedGasFeeTimeBounds, +- gasEstimateType: GAS_ESTIMATE_TYPES.FEE_MARKET +- }; +- } else if (isLegacyGasAPICompatible) { +- const estimates = await fetchLegacyGasPriceEstimates2( +- fetchLegacyGasPriceEstimatesUrl, +- clientId +- ); +- return { +- gasFeeEstimates: estimates, +- estimatedGasFeeTimeBounds: {}, +- gasEstimateType: GAS_ESTIMATE_TYPES.LEGACY +- }; +- } +- throw new Error("Main gas fee/price estimation failed. Use fallback"); +- } catch { +- try { +- const estimates = await fetchEthGasPriceEstimate2(ethQuery); +- return { +- gasFeeEstimates: estimates, +- estimatedGasFeeTimeBounds: {}, +- gasEstimateType: GAS_ESTIMATE_TYPES.ETH_GASPRICE +- }; +- } catch (error) { +- if (error instanceof Error) { +- throw new Error( +- `Gas fee/price estimation failed. Message: ${error.message}` +- ); +- } +- throw error; +- } +- } +-} +- +- +- +- +- +- +- +-exports.determineGasFeeCalculations = determineGasFeeCalculations; exports.LEGACY_GAS_PRICES_API_URL = LEGACY_GAS_PRICES_API_URL; exports.GAS_ESTIMATE_TYPES = GAS_ESTIMATE_TYPES; exports.GasFeeController = GasFeeController; exports.GasFeeController_default = GasFeeController_default; +-//# sourceMappingURL=chunk-N5BANBTW.js.map +\ No newline at end of file +diff --git a/dist/chunk-N5BANBTW.js.map b/dist/chunk-N5BANBTW.js.map +deleted file mode 100644 +index 344544fa436adddd331b2152926ecaf81ae94bc2..0000000000000000000000000000000000000000 +--- a/dist/chunk-N5BANBTW.js.map ++++ /dev/null +@@ -1 +0,0 @@ +-{"version":3,"sources":["../src/GasFeeController.ts","../src/determineGasFeeCalculations.ts"],"names":["fetchGasEstimates","fetchGasEstimatesViaEthFeeHistory","fetchLegacyGasPriceEstimates","fetchEthGasPriceEstimate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A,MACtC;AAAA,IACF,SAAS,OAAO;AACd,UAAI,iBAAiB,OAAO;AAC1B,cAAM,IAAI;AAAA,UACR,6CAA6C,MAAM,OAAO;AAAA,QAC5D;AAAA,MACF;AACA,YAAM;AAAA,IACR;AAAA,EACF;AACF","sourcesContent":["import type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n RestrictedControllerMessenger,\n} from '@metamask/base-controller';\nimport {\n convertHexToDecimal,\n safelyExecute,\n toHex,\n} from '@metamask/controller-utils';\nimport EthQuery from '@metamask/eth-query';\nimport type {\n NetworkClientId,\n NetworkControllerGetEIP1559CompatibilityAction,\n NetworkControllerGetNetworkClientByIdAction,\n NetworkControllerGetStateAction,\n NetworkControllerNetworkDidChangeEvent,\n NetworkState,\n ProviderProxy,\n} from '@metamask/network-controller';\nimport { StaticIntervalPollingController } from '@metamask/polling-controller';\nimport type { Hex } from '@metamask/utils';\nimport { v1 as random } from 'uuid';\n\nimport determineGasFeeCalculations from './determineGasFeeCalculations';\nimport fetchGasEstimatesViaEthFeeHistory from './fetchGasEstimatesViaEthFeeHistory';\nimport {\n fetchGasEstimates,\n fetchLegacyGasPriceEstimates,\n fetchEthGasPriceEstimate,\n calculateTimeEstimate,\n} from './gas-util';\n\nexport const LEGACY_GAS_PRICES_API_URL = `https://api.metaswap.codefi.network/gasPrices`;\n\nexport type unknownString = 'unknown';\n\n// Fee Market describes the way gas is set after the london hardfork, and was\n// defined by EIP-1559.\nexport type FeeMarketEstimateType = 'fee-market';\n// Legacy describes gasPrice estimates from before london hardfork, when the\n// user is connected to mainnet and are presented with fast/average/slow\n// estimate levels to choose from.\nexport type LegacyEstimateType = 'legacy';\n// EthGasPrice describes a gasPrice estimate received from eth_gasPrice. Post\n// london this value should only be used for legacy type transactions when on\n// networks that support EIP-1559. This type of estimate is the most accurate\n// to display on custom networks that don't support EIP-1559.\nexport type EthGasPriceEstimateType = 'eth_gasPrice';\n// NoEstimate describes the state of the controller before receiving its first\n// estimate.\nexport type NoEstimateType = 'none';\n\n/**\n * Indicates which type of gasEstimate the controller is currently returning.\n * This is useful as a way of asserting that the shape of gasEstimates matches\n * expectations. NONE is a special case indicating that no previous gasEstimate\n * has been fetched.\n */\nexport const GAS_ESTIMATE_TYPES = {\n FEE_MARKET: 'fee-market' as FeeMarketEstimateType,\n LEGACY: 'legacy' as LegacyEstimateType,\n ETH_GASPRICE: 'eth_gasPrice' as EthGasPriceEstimateType,\n NONE: 'none' as NoEstimateType,\n};\n\nexport type GasEstimateType =\n | FeeMarketEstimateType\n | EthGasPriceEstimateType\n | LegacyEstimateType\n | NoEstimateType;\n\nexport type EstimatedGasFeeTimeBounds = {\n lowerTimeBound: number | null;\n upperTimeBound: number | unknownString;\n};\n\n/**\n * @type EthGasPriceEstimate\n *\n * A single gas price estimate for networks and accounts that don't support EIP-1559\n * This estimate comes from eth_gasPrice but is converted to dec gwei to match other\n * return values\n * @property gasPrice - A GWEI dec string\n */\n\nexport type EthGasPriceEstimate = {\n gasPrice: string;\n};\n\n/**\n * @type LegacyGasPriceEstimate\n *\n * A set of gas price estimates for networks and accounts that don't support EIP-1559\n * These estimates include low, medium and high all as strings representing gwei in\n * decimal format.\n * @property high - gasPrice, in decimal gwei string format, suggested for fast inclusion\n * @property medium - gasPrice, in decimal gwei string format, suggested for avg inclusion\n * @property low - gasPrice, in decimal gwei string format, suggested for slow inclusion\n */\nexport type LegacyGasPriceEstimate = {\n high: string;\n medium: string;\n low: string;\n};\n\n/**\n * @type Eip1559GasFee\n *\n * Data necessary to provide an estimate of a gas fee with a specific tip\n * @property minWaitTimeEstimate - The fastest the transaction will take, in milliseconds\n * @property maxWaitTimeEstimate - The slowest the transaction will take, in milliseconds\n * @property suggestedMaxPriorityFeePerGas - A suggested \"tip\", a GWEI hex number\n * @property suggestedMaxFeePerGas - A suggested max fee, the most a user will pay. a GWEI hex number\n */\nexport type Eip1559GasFee = {\n minWaitTimeEstimate: number; // a time duration in milliseconds\n maxWaitTimeEstimate: number; // a time duration in milliseconds\n suggestedMaxPriorityFeePerGas: string; // a GWEI decimal number\n suggestedMaxFeePerGas: string; // a GWEI decimal number\n};\n\n/**\n * @type GasFeeEstimates\n *\n * Data necessary to provide multiple GasFee estimates, and supporting information, to the user\n * @property low - A GasFee for a minimum necessary combination of tip and maxFee\n * @property medium - A GasFee for a recommended combination of tip and maxFee\n * @property high - A GasFee for a high combination of tip and maxFee\n * @property estimatedBaseFee - An estimate of what the base fee will be for the pending/next block. A GWEI dec number\n * @property networkCongestion - A normalized number that can be used to gauge the congestion\n * level of the network, with 0 meaning not congested and 1 meaning extremely congested\n */\nexport type GasFeeEstimates = SourcedGasFeeEstimates | FallbackGasFeeEstimates;\n\ntype SourcedGasFeeEstimates = {\n low: Eip1559GasFee;\n medium: Eip1559GasFee;\n high: Eip1559GasFee;\n estimatedBaseFee: string;\n historicalBaseFeeRange: [string, string];\n baseFeeTrend: 'up' | 'down' | 'level';\n latestPriorityFeeRange: [string, string];\n historicalPriorityFeeRange: [string, string];\n priorityFeeTrend: 'up' | 'down' | 'level';\n networkCongestion: number;\n};\n\ntype FallbackGasFeeEstimates = {\n low: Eip1559GasFee;\n medium: Eip1559GasFee;\n high: Eip1559GasFee;\n estimatedBaseFee: string;\n historicalBaseFeeRange: null;\n baseFeeTrend: null;\n latestPriorityFeeRange: null;\n historicalPriorityFeeRange: null;\n priorityFeeTrend: null;\n networkCongestion: null;\n};\n\nconst metadata = {\n gasFeeEstimatesByChainId: {\n persist: true,\n anonymous: false,\n },\n gasFeeEstimates: { persist: true, anonymous: false },\n estimatedGasFeeTimeBounds: { persist: true, anonymous: false },\n gasEstimateType: { persist: true, anonymous: false },\n};\n\nexport type GasFeeStateEthGasPrice = {\n gasFeeEstimates: EthGasPriceEstimate;\n estimatedGasFeeTimeBounds: Record;\n gasEstimateType: EthGasPriceEstimateType;\n};\n\nexport type GasFeeStateFeeMarket = {\n gasFeeEstimates: GasFeeEstimates;\n estimatedGasFeeTimeBounds: EstimatedGasFeeTimeBounds | Record;\n gasEstimateType: FeeMarketEstimateType;\n};\n\nexport type GasFeeStateLegacy = {\n gasFeeEstimates: LegacyGasPriceEstimate;\n estimatedGasFeeTimeBounds: Record;\n gasEstimateType: LegacyEstimateType;\n};\n\nexport type GasFeeStateNoEstimates = {\n gasFeeEstimates: Record;\n estimatedGasFeeTimeBounds: Record;\n gasEstimateType: NoEstimateType;\n};\n\nexport type FetchGasFeeEstimateOptions = {\n shouldUpdateState?: boolean;\n networkClientId?: NetworkClientId;\n};\n\n/**\n * @type GasFeeState\n *\n * Gas Fee controller state\n * @property gasFeeEstimates - Gas fee estimate data based on new EIP-1559 properties\n * @property estimatedGasFeeTimeBounds - Estimates representing the minimum and maximum\n */\nexport type SingleChainGasFeeState =\n | GasFeeStateEthGasPrice\n | GasFeeStateFeeMarket\n | GasFeeStateLegacy\n | GasFeeStateNoEstimates;\n\nexport type GasFeeEstimatesByChainId = {\n gasFeeEstimatesByChainId?: Record;\n};\n\nexport type GasFeeState = GasFeeEstimatesByChainId & SingleChainGasFeeState;\n\nconst name = 'GasFeeController';\n\nexport type GasFeeStateChange = ControllerStateChangeEvent<\n typeof name,\n GasFeeState\n>;\n\nexport type GetGasFeeState = ControllerGetStateAction;\n\nexport type GasFeeControllerActions = GetGasFeeState;\n\nexport type GasFeeControllerEvents = GasFeeStateChange;\n\ntype AllowedActions =\n | NetworkControllerGetStateAction\n | NetworkControllerGetNetworkClientByIdAction\n | NetworkControllerGetEIP1559CompatibilityAction;\n\ntype GasFeeMessenger = RestrictedControllerMessenger<\n typeof name,\n GasFeeControllerActions | AllowedActions,\n GasFeeControllerEvents | NetworkControllerNetworkDidChangeEvent,\n AllowedActions['type'],\n NetworkControllerNetworkDidChangeEvent['type']\n>;\n\nconst defaultState: GasFeeState = {\n gasFeeEstimatesByChainId: {},\n gasFeeEstimates: {},\n estimatedGasFeeTimeBounds: {},\n gasEstimateType: GAS_ESTIMATE_TYPES.NONE,\n};\n\n/**\n * Controller that retrieves gas fee estimate data and polls for updated data on a set interval\n */\nexport class GasFeeController extends StaticIntervalPollingController<\n typeof name,\n GasFeeState,\n GasFeeMessenger\n> {\n private intervalId?: ReturnType;\n\n private readonly intervalDelay;\n\n private readonly pollTokens: Set;\n\n private readonly legacyAPIEndpoint: string;\n\n private readonly EIP1559APIEndpoint: string;\n\n private readonly getCurrentNetworkEIP1559Compatibility;\n\n private readonly getCurrentNetworkLegacyGasAPICompatibility;\n\n private readonly getCurrentAccountEIP1559Compatibility;\n\n private currentChainId;\n\n private ethQuery?: EthQuery;\n\n private readonly clientId?: string;\n\n #getProvider: () => ProviderProxy;\n\n /**\n * Creates a GasFeeController instance.\n *\n * @param options - The controller options.\n * @param options.interval - The time in milliseconds to wait between polls.\n * @param options.messenger - The controller messenger.\n * @param options.state - The initial state.\n * @param options.getCurrentNetworkEIP1559Compatibility - Determines whether or not the current\n * network is EIP-1559 compatible.\n * @param options.getCurrentNetworkLegacyGasAPICompatibility - Determines whether or not the\n * current network is compatible with the legacy gas price API.\n * @param options.getCurrentAccountEIP1559Compatibility - Determines whether or not the current\n * account is EIP-1559 compatible.\n * @param options.getChainId - Returns the current chain ID.\n * @param options.getProvider - Returns a network provider for the current network.\n * @param options.onNetworkDidChange - A function for registering an event handler for the\n * network state change event.\n * @param options.legacyAPIEndpoint - The legacy gas price API URL. This option is primarily for\n * testing purposes.\n * @param options.EIP1559APIEndpoint - The EIP-1559 gas price API URL.\n * @param options.clientId - The client ID used to identify to the gas estimation API who is\n * asking for estimates.\n */\n constructor({\n interval = 15000,\n messenger,\n state,\n getCurrentNetworkEIP1559Compatibility,\n getCurrentAccountEIP1559Compatibility,\n getChainId,\n getCurrentNetworkLegacyGasAPICompatibility,\n getProvider,\n onNetworkDidChange,\n legacyAPIEndpoint = LEGACY_GAS_PRICES_API_URL,\n EIP1559APIEndpoint,\n clientId,\n }: {\n interval?: number;\n messenger: GasFeeMessenger;\n state?: GasFeeState;\n getCurrentNetworkEIP1559Compatibility: () => Promise;\n getCurrentNetworkLegacyGasAPICompatibility: () => boolean;\n getCurrentAccountEIP1559Compatibility?: () => boolean;\n getChainId?: () => Hex;\n getProvider: () => ProviderProxy;\n onNetworkDidChange?: (listener: (state: NetworkState) => void) => void;\n legacyAPIEndpoint?: string;\n EIP1559APIEndpoint: string;\n clientId?: string;\n }) {\n super({\n name,\n metadata,\n messenger,\n state: { ...defaultState, ...state },\n });\n this.intervalDelay = interval;\n this.setIntervalLength(interval);\n this.pollTokens = new Set();\n this.getCurrentNetworkEIP1559Compatibility =\n getCurrentNetworkEIP1559Compatibility;\n this.getCurrentNetworkLegacyGasAPICompatibility =\n getCurrentNetworkLegacyGasAPICompatibility;\n this.getCurrentAccountEIP1559Compatibility =\n getCurrentAccountEIP1559Compatibility;\n this.#getProvider = getProvider;\n this.EIP1559APIEndpoint = EIP1559APIEndpoint;\n this.legacyAPIEndpoint = legacyAPIEndpoint;\n this.clientId = clientId;\n\n this.ethQuery = new EthQuery(this.#getProvider());\n\n if (onNetworkDidChange && getChainId) {\n this.currentChainId = getChainId();\n onNetworkDidChange(async (networkControllerState) => {\n await this.#onNetworkControllerDidChange(networkControllerState);\n });\n } else {\n this.currentChainId = this.messagingSystem.call(\n 'NetworkController:getState',\n ).providerConfig.chainId;\n this.messagingSystem.subscribe(\n 'NetworkController:networkDidChange',\n async (networkControllerState) => {\n await this.#onNetworkControllerDidChange(networkControllerState);\n },\n );\n }\n }\n\n async resetPolling() {\n if (this.pollTokens.size !== 0) {\n const tokens = Array.from(this.pollTokens);\n this.stopPolling();\n await this.getGasFeeEstimatesAndStartPolling(tokens[0]);\n tokens.slice(1).forEach((token) => {\n this.pollTokens.add(token);\n });\n }\n }\n\n async fetchGasFeeEstimates(options?: FetchGasFeeEstimateOptions) {\n return await this._fetchGasFeeEstimateData(options);\n }\n\n async getGasFeeEstimatesAndStartPolling(\n pollToken: string | undefined,\n ): Promise {\n const _pollToken = pollToken || random();\n\n this.pollTokens.add(_pollToken);\n\n if (this.pollTokens.size === 1) {\n await this._fetchGasFeeEstimateData();\n this._poll();\n }\n\n return _pollToken;\n }\n\n /**\n * Gets and sets gasFeeEstimates in state.\n *\n * @param options - The gas fee estimate options.\n * @param options.shouldUpdateState - Determines whether the state should be updated with the\n * updated gas estimates.\n * @returns The gas fee estimates.\n */\n async _fetchGasFeeEstimateData(\n options: FetchGasFeeEstimateOptions = {},\n ): Promise {\n const { shouldUpdateState = true, networkClientId } = options;\n\n let ethQuery,\n isEIP1559Compatible,\n isLegacyGasAPICompatible,\n decimalChainId: number;\n\n if (networkClientId !== undefined) {\n const networkClient = this.messagingSystem.call(\n 'NetworkController:getNetworkClientById',\n networkClientId,\n );\n isLegacyGasAPICompatible = networkClient.configuration.chainId === '0x38';\n\n decimalChainId = convertHexToDecimal(networkClient.configuration.chainId);\n\n try {\n const result = await this.messagingSystem.call(\n 'NetworkController:getEIP1559Compatibility',\n networkClientId,\n );\n isEIP1559Compatible = result || false;\n } catch {\n isEIP1559Compatible = false;\n }\n ethQuery = new EthQuery(networkClient.provider);\n }\n\n ethQuery ??= this.ethQuery;\n\n isLegacyGasAPICompatible ??=\n this.getCurrentNetworkLegacyGasAPICompatibility();\n\n decimalChainId ??= convertHexToDecimal(this.currentChainId);\n\n try {\n isEIP1559Compatible ??= await this.getEIP1559Compatibility();\n } catch (e) {\n console.error(e);\n isEIP1559Compatible ??= false;\n }\n\n const gasFeeCalculations = await determineGasFeeCalculations({\n isEIP1559Compatible,\n isLegacyGasAPICompatible,\n fetchGasEstimates,\n fetchGasEstimatesUrl: this.EIP1559APIEndpoint.replace(\n '',\n `${decimalChainId}`,\n ),\n fetchGasEstimatesViaEthFeeHistory,\n fetchLegacyGasPriceEstimates,\n fetchLegacyGasPriceEstimatesUrl: this.legacyAPIEndpoint.replace(\n '',\n `${decimalChainId}`,\n ),\n fetchEthGasPriceEstimate,\n calculateTimeEstimate,\n clientId: this.clientId,\n ethQuery,\n });\n\n if (shouldUpdateState) {\n this.update((state) => {\n state.gasFeeEstimates = gasFeeCalculations.gasFeeEstimates;\n state.estimatedGasFeeTimeBounds =\n gasFeeCalculations.estimatedGasFeeTimeBounds;\n state.gasEstimateType = gasFeeCalculations.gasEstimateType;\n state.gasFeeEstimatesByChainId ??= {};\n state.gasFeeEstimatesByChainId[toHex(decimalChainId)] = {\n gasFeeEstimates: gasFeeCalculations.gasFeeEstimates,\n estimatedGasFeeTimeBounds:\n gasFeeCalculations.estimatedGasFeeTimeBounds,\n gasEstimateType: gasFeeCalculations.gasEstimateType,\n } as SingleChainGasFeeState;\n });\n }\n\n return gasFeeCalculations;\n }\n\n /**\n * Remove the poll token, and stop polling if the set of poll tokens is empty.\n *\n * @param pollToken - The poll token to disconnect.\n */\n disconnectPoller(pollToken: string) {\n this.pollTokens.delete(pollToken);\n if (this.pollTokens.size === 0) {\n this.stopPolling();\n }\n }\n\n stopPolling() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n this.pollTokens.clear();\n this.resetState();\n }\n\n /**\n * Prepare to discard this controller.\n *\n * This stops any active polling.\n */\n override destroy() {\n super.destroy();\n this.stopPolling();\n }\n\n private _poll() {\n if (this.intervalId) {\n clearInterval(this.intervalId);\n }\n\n this.intervalId = setInterval(async () => {\n await safelyExecute(() => this._fetchGasFeeEstimateData());\n }, this.intervalDelay);\n }\n\n /**\n * Fetching token list from the Token Service API.\n *\n * @private\n * @param networkClientId - The ID of the network client triggering the fetch.\n * @returns A promise that resolves when this operation completes.\n */\n async _executePoll(networkClientId: string): Promise {\n await this._fetchGasFeeEstimateData({ networkClientId });\n }\n\n private resetState() {\n this.update(() => {\n return defaultState;\n });\n }\n\n private async getEIP1559Compatibility() {\n const currentNetworkIsEIP1559Compatible =\n await this.getCurrentNetworkEIP1559Compatibility();\n const currentAccountIsEIP1559Compatible =\n this.getCurrentAccountEIP1559Compatibility?.() ?? true;\n\n return (\n currentNetworkIsEIP1559Compatible && currentAccountIsEIP1559Compatible\n );\n }\n\n getTimeEstimate(\n maxPriorityFeePerGas: string,\n maxFeePerGas: string,\n ): EstimatedGasFeeTimeBounds | Record {\n if (\n !this.state.gasFeeEstimates ||\n this.state.gasEstimateType !== GAS_ESTIMATE_TYPES.FEE_MARKET\n ) {\n return {};\n }\n return calculateTimeEstimate(\n maxPriorityFeePerGas,\n maxFeePerGas,\n this.state.gasFeeEstimates,\n );\n }\n\n async #onNetworkControllerDidChange(networkControllerState: NetworkState) {\n const newChainId = networkControllerState.providerConfig.chainId;\n\n if (newChainId !== this.currentChainId) {\n this.ethQuery = new EthQuery(this.#getProvider());\n await this.resetPolling();\n\n this.currentChainId = newChainId;\n }\n }\n}\n\nexport default GasFeeController;\n","import type {\n EstimatedGasFeeTimeBounds,\n EthGasPriceEstimate,\n GasFeeEstimates,\n GasFeeState as GasFeeCalculations,\n LegacyGasPriceEstimate,\n} from './GasFeeController';\nimport { GAS_ESTIMATE_TYPES } from './GasFeeController';\n\n/**\n * Obtains a set of max base and priority fee estimates along with time estimates so that we\n * can present them to users when they are sending transactions or making swaps.\n *\n * @param args - The arguments.\n * @param args.isEIP1559Compatible - Governs whether or not we can use an EIP-1559-only method to\n * produce estimates.\n * @param args.isLegacyGasAPICompatible - Governs whether or not we can use a non-EIP-1559 method to\n * produce estimates (for instance, testnets do not support estimates altogether).\n * @param args.fetchGasEstimates - A function that fetches gas estimates using an EIP-1559-specific\n * API.\n * @param args.fetchGasEstimatesUrl - The URL for the API we can use to obtain EIP-1559-specific\n * estimates.\n * @param args.fetchGasEstimatesViaEthFeeHistory - A function that fetches gas estimates using\n * `eth_feeHistory` (an EIP-1559 feature).\n * @param args.fetchLegacyGasPriceEstimates - A function that fetches gas estimates using an\n * non-EIP-1559-specific API.\n * @param args.fetchLegacyGasPriceEstimatesUrl - The URL for the API we can use to obtain\n * non-EIP-1559-specific estimates.\n * @param args.fetchEthGasPriceEstimate - A function that fetches gas estimates using\n * `eth_gasPrice`.\n * @param args.calculateTimeEstimate - A function that determine time estimate bounds.\n * @param args.clientId - An identifier that an API can use to know who is asking for estimates.\n * @param args.ethQuery - An EthQuery instance we can use to talk to Ethereum directly.\n * @returns The gas fee calculations.\n */\nexport default async function determineGasFeeCalculations({\n isEIP1559Compatible,\n isLegacyGasAPICompatible,\n fetchGasEstimates,\n fetchGasEstimatesUrl,\n fetchGasEstimatesViaEthFeeHistory,\n fetchLegacyGasPriceEstimates,\n fetchLegacyGasPriceEstimatesUrl,\n fetchEthGasPriceEstimate,\n calculateTimeEstimate,\n clientId,\n ethQuery,\n}: {\n isEIP1559Compatible: boolean;\n isLegacyGasAPICompatible: boolean;\n fetchGasEstimates: (\n url: string,\n clientId?: string,\n ) => Promise;\n fetchGasEstimatesUrl: string;\n fetchGasEstimatesViaEthFeeHistory: (\n // TODO: Replace `any` with type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ethQuery: any,\n ) => Promise;\n fetchLegacyGasPriceEstimates: (\n url: string,\n clientId?: string,\n ) => Promise;\n fetchLegacyGasPriceEstimatesUrl: string;\n // TODO: Replace `any` with type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fetchEthGasPriceEstimate: (ethQuery: any) => Promise;\n calculateTimeEstimate: (\n maxPriorityFeePerGas: string,\n maxFeePerGas: string,\n gasFeeEstimates: GasFeeEstimates,\n ) => EstimatedGasFeeTimeBounds;\n clientId: string | undefined;\n // TODO: Replace `any` with type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ethQuery: any;\n}): Promise {\n try {\n if (isEIP1559Compatible) {\n let estimates: GasFeeEstimates;\n try {\n estimates = await fetchGasEstimates(fetchGasEstimatesUrl, clientId);\n } catch {\n estimates = await fetchGasEstimatesViaEthFeeHistory(ethQuery);\n }\n const { suggestedMaxPriorityFeePerGas, suggestedMaxFeePerGas } =\n estimates.medium;\n const estimatedGasFeeTimeBounds = calculateTimeEstimate(\n suggestedMaxPriorityFeePerGas,\n suggestedMaxFeePerGas,\n estimates,\n );\n return {\n gasFeeEstimates: estimates,\n estimatedGasFeeTimeBounds,\n gasEstimateType: GAS_ESTIMATE_TYPES.FEE_MARKET,\n };\n } else if (isLegacyGasAPICompatible) {\n const estimates = await fetchLegacyGasPriceEstimates(\n fetchLegacyGasPriceEstimatesUrl,\n clientId,\n );\n return {\n gasFeeEstimates: estimates,\n estimatedGasFeeTimeBounds: {},\n gasEstimateType: GAS_ESTIMATE_TYPES.LEGACY,\n };\n }\n throw new Error('Main gas fee/price estimation failed. Use fallback');\n } catch {\n try {\n const estimates = await fetchEthGasPriceEstimate(ethQuery);\n return {\n gasFeeEstimates: estimates,\n estimatedGasFeeTimeBounds: {},\n gasEstimateType: GAS_ESTIMATE_TYPES.ETH_GASPRICE,\n };\n } catch (error) {\n if (error instanceof Error) {\n throw new Error(\n `Gas fee/price estimation failed. Message: ${error.message}`,\n );\n }\n throw error;\n }\n }\n}\n"]} +\ No newline at end of file +diff --git a/dist/determineGasFeeCalculations.js b/dist/determineGasFeeCalculations.js +index 4c2cccb6b615673a89aa2335a34106eed46ca92e..efd3b433637e166ebdca72a76fb07fd049b57f9a 100644 +--- a/dist/determineGasFeeCalculations.js ++++ b/dist/determineGasFeeCalculations.js +@@ -1,6 +1,6 @@ + "use strict";Object.defineProperty(exports, "__esModule", {value: true}); + +-var _chunkN5BANBTWjs = require('./chunk-N5BANBTW.js'); ++var _chunkIBADKXI6js = require('./chunk-IBADKXI6.js'); + require('./chunk-EZVGDV5H.js'); + require('./chunk-5INBFZXY.js'); + require('./chunk-F46NZXRQ.js'); +@@ -10,5 +10,5 @@ require('./chunk-LO7OP5FM.js'); + require('./chunk-Z4BLTVTB.js'); + + +-exports.default = _chunkN5BANBTWjs.determineGasFeeCalculations; ++exports.default = _chunkIBADKXI6js.determineGasFeeCalculations; + //# sourceMappingURL=determineGasFeeCalculations.js.map +\ No newline at end of file +diff --git a/dist/determineGasFeeCalculations.mjs b/dist/determineGasFeeCalculations.mjs +index 62648b3e32104072a90f4a94c2b8390ebc5a0738..7b1b6485a9ae37b0011c1b2ea7ea2d0260002319 100644 +--- a/dist/determineGasFeeCalculations.mjs ++++ b/dist/determineGasFeeCalculations.mjs +@@ -1,6 +1,6 @@ + import { + determineGasFeeCalculations +-} from "./chunk-4T54ULFA.mjs"; ++} from "./chunk-L45HVISM.mjs"; + import "./chunk-EXCWMMNV.mjs"; + import "./chunk-AQN4AQEF.mjs"; + import "./chunk-CCRUODGE.mjs"; +diff --git a/dist/index.js b/dist/index.js +index 75ffb368cb40043c84c5534a8834d7a8d4ded148..6b6ba4cc47889d4191f2bc816835488f132d0ac0 100644 +--- a/dist/index.js ++++ b/dist/index.js +@@ -2,7 +2,7 @@ + + + +-var _chunkN5BANBTWjs = require('./chunk-N5BANBTW.js'); ++var _chunkIBADKXI6js = require('./chunk-IBADKXI6.js'); + require('./chunk-EZVGDV5H.js'); + require('./chunk-5INBFZXY.js'); + require('./chunk-F46NZXRQ.js'); +@@ -14,5 +14,5 @@ require('./chunk-Z4BLTVTB.js'); + + + +-exports.GAS_ESTIMATE_TYPES = _chunkN5BANBTWjs.GAS_ESTIMATE_TYPES; exports.GasFeeController = _chunkN5BANBTWjs.GasFeeController; exports.LEGACY_GAS_PRICES_API_URL = _chunkN5BANBTWjs.LEGACY_GAS_PRICES_API_URL; ++exports.GAS_ESTIMATE_TYPES = _chunkIBADKXI6js.GAS_ESTIMATE_TYPES; exports.GasFeeController = _chunkIBADKXI6js.GasFeeController; exports.LEGACY_GAS_PRICES_API_URL = _chunkIBADKXI6js.LEGACY_GAS_PRICES_API_URL; + //# sourceMappingURL=index.js.map +\ No newline at end of file +diff --git a/dist/index.mjs b/dist/index.mjs +index af8c3102b9230eb4e4eb7c1fdd3a19627eadeaf8..1bcc754361c9be01145c6f96438da3fc89d973ab 100644 +--- a/dist/index.mjs ++++ b/dist/index.mjs +@@ -2,7 +2,7 @@ import { + GAS_ESTIMATE_TYPES, + GasFeeController, + LEGACY_GAS_PRICES_API_URL +-} from "./chunk-4T54ULFA.mjs"; ++} from "./chunk-L45HVISM.mjs"; + import "./chunk-EXCWMMNV.mjs"; + import "./chunk-AQN4AQEF.mjs"; + import "./chunk-CCRUODGE.mjs"; +diff --git a/dist/tsconfig.build.tsbuildinfo b/dist/tsconfig.build.tsbuildinfo +index 3a0c1e4bc5a06afea527dcd7882f1baf27162e8f..d03af3cd1923f60769878b6942fe2947810551f1 100644 +--- a/dist/tsconfig.build.tsbuildinfo ++++ b/dist/tsconfig.build.tsbuildinfo +@@ -1 +1 @@ +-{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../types/eth-ens-namehash.d.ts","../../../types/ethereum-ens-network-map.d.ts","../../../types/global.d.ts","../../../types/single-call-balance-checker-abi.d.ts","../../../types/@metamask/contract-metadata.d.ts","../../../types/@metamask/eth-hd-keyring.d.ts","../../../types/@metamask/eth-simple-keyring.d.ts","../../../types/@metamask/ethjs-provider-http.d.ts","../../../types/@metamask/ethjs-unit.d.ts","../../../types/@metamask/metamask-eth-abis.d.ts","../../../types/eth-json-rpc-infura/src/createProvider.d.ts","../../../types/eth-phishing-detect/src/config.json.d.ts","../../../types/eth-phishing-detect/src/detector.d.ts","../../base-controller/dist/types/BaseControllerV1.d.ts","../../../node_modules/superstruct/dist/error.d.ts","../../../node_modules/superstruct/dist/utils.d.ts","../../../node_modules/superstruct/dist/struct.d.ts","../../../node_modules/superstruct/dist/structs/coercions.d.ts","../../../node_modules/superstruct/dist/structs/refinements.d.ts","../../../node_modules/superstruct/dist/structs/types.d.ts","../../../node_modules/superstruct/dist/structs/utilities.d.ts","../../../node_modules/superstruct/dist/index.d.ts","../../../node_modules/@metamask/utils/dist/types/assert.d.ts","../../../node_modules/@metamask/utils/dist/types/base64.d.ts","../../../node_modules/@metamask/utils/dist/types/hex.d.ts","../../../node_modules/@metamask/utils/dist/types/bytes.d.ts","../../../node_modules/@metamask/utils/dist/types/caip-types.d.ts","../../../node_modules/@metamask/utils/dist/types/checksum.d.ts","../../../node_modules/@metamask/utils/dist/types/coercers.d.ts","../../../node_modules/@metamask/utils/dist/types/collections.d.ts","../../../node_modules/@metamask/utils/dist/types/encryption-types.d.ts","../../../node_modules/@metamask/utils/dist/types/errors.d.ts","../../../node_modules/@metamask/utils/dist/types/json.d.ts","../../../node_modules/@types/node/ts4.8/assert.d.ts","../../../node_modules/@types/node/ts4.8/assert/strict.d.ts","../../../node_modules/@types/node/ts4.8/globals.d.ts","../../../node_modules/@types/node/ts4.8/async_hooks.d.ts","../../../node_modules/@types/node/ts4.8/buffer.d.ts","../../../node_modules/@types/node/ts4.8/child_process.d.ts","../../../node_modules/@types/node/ts4.8/cluster.d.ts","../../../node_modules/@types/node/ts4.8/console.d.ts","../../../node_modules/@types/node/ts4.8/constants.d.ts","../../../node_modules/@types/node/ts4.8/crypto.d.ts","../../../node_modules/@types/node/ts4.8/dgram.d.ts","../../../node_modules/@types/node/ts4.8/diagnostics_channel.d.ts","../../../node_modules/@types/node/ts4.8/dns.d.ts","../../../node_modules/@types/node/ts4.8/dns/promises.d.ts","../../../node_modules/@types/node/ts4.8/domain.d.ts","../../../node_modules/@types/node/ts4.8/events.d.ts","../../../node_modules/@types/node/ts4.8/fs.d.ts","../../../node_modules/@types/node/ts4.8/fs/promises.d.ts","../../../node_modules/@types/node/ts4.8/http.d.ts","../../../node_modules/@types/node/ts4.8/http2.d.ts","../../../node_modules/@types/node/ts4.8/https.d.ts","../../../node_modules/@types/node/ts4.8/inspector.d.ts","../../../node_modules/@types/node/ts4.8/module.d.ts","../../../node_modules/@types/node/ts4.8/net.d.ts","../../../node_modules/@types/node/ts4.8/os.d.ts","../../../node_modules/@types/node/ts4.8/path.d.ts","../../../node_modules/@types/node/ts4.8/perf_hooks.d.ts","../../../node_modules/@types/node/ts4.8/process.d.ts","../../../node_modules/@types/node/ts4.8/punycode.d.ts","../../../node_modules/@types/node/ts4.8/querystring.d.ts","../../../node_modules/@types/node/ts4.8/readline.d.ts","../../../node_modules/@types/node/ts4.8/repl.d.ts","../../../node_modules/@types/node/ts4.8/stream.d.ts","../../../node_modules/@types/node/ts4.8/stream/promises.d.ts","../../../node_modules/@types/node/ts4.8/stream/consumers.d.ts","../../../node_modules/@types/node/ts4.8/stream/web.d.ts","../../../node_modules/@types/node/ts4.8/string_decoder.d.ts","../../../node_modules/@types/node/ts4.8/test.d.ts","../../../node_modules/@types/node/ts4.8/timers.d.ts","../../../node_modules/@types/node/ts4.8/timers/promises.d.ts","../../../node_modules/@types/node/ts4.8/tls.d.ts","../../../node_modules/@types/node/ts4.8/trace_events.d.ts","../../../node_modules/@types/node/ts4.8/tty.d.ts","../../../node_modules/@types/node/ts4.8/url.d.ts","../../../node_modules/@types/node/ts4.8/util.d.ts","../../../node_modules/@types/node/ts4.8/v8.d.ts","../../../node_modules/@types/node/ts4.8/vm.d.ts","../../../node_modules/@types/node/ts4.8/wasi.d.ts","../../../node_modules/@types/node/ts4.8/worker_threads.d.ts","../../../node_modules/@types/node/ts4.8/zlib.d.ts","../../../node_modules/@types/node/ts4.8/globals.global.d.ts","../../../node_modules/@types/node/ts4.8/index.d.ts","../../../node_modules/@ethereumjs/common/dist/enums.d.ts","../../../node_modules/@ethereumjs/common/dist/types.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/@ethereumjs/util/dist/constants.d.ts","../../../node_modules/@ethereumjs/util/dist/units.d.ts","../../../node_modules/@ethereumjs/util/dist/address.d.ts","../../../node_modules/@ethereumjs/util/dist/bytes.d.ts","../../../node_modules/@ethereumjs/util/dist/types.d.ts","../../../node_modules/@ethereumjs/util/dist/account.d.ts","../../../node_modules/@ethereumjs/util/dist/withdrawal.d.ts","../../../node_modules/@ethereumjs/util/dist/signature.d.ts","../../../node_modules/@ethereumjs/util/dist/encoding.d.ts","../../../node_modules/@ethereumjs/util/dist/asyncEventEmitter.d.ts","../../../node_modules/@ethereumjs/util/dist/internal.d.ts","../../../node_modules/@ethereumjs/util/dist/lock.d.ts","../../../node_modules/@ethereumjs/util/dist/provider.d.ts","../../../node_modules/@ethereumjs/util/dist/index.d.ts","../../../node_modules/@ethereumjs/common/dist/common.d.ts","../../../node_modules/@ethereumjs/common/dist/utils.d.ts","../../../node_modules/@ethereumjs/common/dist/index.d.ts","../../../node_modules/@ethereumjs/tx/dist/eip2930Transaction.d.ts","../../../node_modules/@ethereumjs/tx/dist/legacyTransaction.d.ts","../../../node_modules/@ethereumjs/tx/dist/types.d.ts","../../../node_modules/@ethereumjs/tx/dist/baseTransaction.d.ts","../../../node_modules/@ethereumjs/tx/dist/eip1559Transaction.d.ts","../../../node_modules/@ethereumjs/tx/dist/transactionFactory.d.ts","../../../node_modules/@ethereumjs/tx/dist/index.d.ts","../../../node_modules/@metamask/utils/dist/types/keyring.d.ts","../../../node_modules/@types/ms/index.d.ts","../../../node_modules/@types/debug/index.d.ts","../../../node_modules/@metamask/utils/dist/types/logging.d.ts","../../../node_modules/@metamask/utils/dist/types/misc.d.ts","../../../node_modules/@metamask/utils/dist/types/number.d.ts","../../../node_modules/@metamask/utils/dist/types/opaque.d.ts","../../../node_modules/@metamask/utils/dist/types/promise.d.ts","../../../node_modules/@metamask/utils/dist/types/time.d.ts","../../../node_modules/@metamask/utils/dist/types/transaction-types.d.ts","../../../node_modules/@metamask/utils/dist/types/versions.d.ts","../../../node_modules/@metamask/utils/dist/types/index.d.ts","../../../node_modules/immer/dist/utils/env.d.ts","../../../node_modules/immer/dist/utils/errors.d.ts","../../../node_modules/immer/dist/types/types-external.d.ts","../../../node_modules/immer/dist/types/types-internal.d.ts","../../../node_modules/immer/dist/utils/common.d.ts","../../../node_modules/immer/dist/utils/plugins.d.ts","../../../node_modules/immer/dist/core/scope.d.ts","../../../node_modules/immer/dist/core/finalize.d.ts","../../../node_modules/immer/dist/core/proxy.d.ts","../../../node_modules/immer/dist/core/immerClass.d.ts","../../../node_modules/immer/dist/core/current.d.ts","../../../node_modules/immer/dist/internal.d.ts","../../../node_modules/immer/dist/plugins/es5.d.ts","../../../node_modules/immer/dist/plugins/patches.d.ts","../../../node_modules/immer/dist/plugins/mapset.d.ts","../../../node_modules/immer/dist/plugins/all.d.ts","../../../node_modules/immer/dist/immer.d.ts","../../base-controller/dist/types/RestrictedControllerMessenger.d.ts","../../base-controller/dist/types/ControllerMessenger.d.ts","../../base-controller/dist/types/BaseControllerV2.d.ts","../../base-controller/dist/types/index.d.ts","../../controller-utils/dist/types/types.d.ts","../../controller-utils/dist/types/constants.d.ts","../../../node_modules/@metamask/eth-query/index.d.ts","../../../node_modules/@types/bn.js/index.d.ts","../../controller-utils/dist/types/util.d.ts","../../../node_modules/@spruceid/siwe-parser/dist/abnf.d.ts","../../../node_modules/@spruceid/siwe-parser/dist/regex.d.ts","../../../node_modules/@spruceid/siwe-parser/dist/parsers.d.ts","../../controller-utils/dist/types/siwe.d.ts","../../controller-utils/dist/types/index.d.ts","../../../node_modules/@metamask/swappable-obj-proxy/dist/types.d.ts","../../../node_modules/@metamask/swappable-obj-proxy/dist/createEventEmitterProxy.d.ts","../../../node_modules/@metamask/swappable-obj-proxy/dist/createSwappableProxy.d.ts","../../../node_modules/@metamask/swappable-obj-proxy/dist/index.d.ts","../../network-controller/dist/types/constants.d.ts","../../../node_modules/@metamask/safe-event-emitter/index.d.ts","../../json-rpc-engine/dist/types/JsonRpcEngine.d.ts","../../json-rpc-engine/dist/types/createAsyncMiddleware.d.ts","../../json-rpc-engine/dist/types/createScaffoldMiddleware.d.ts","../../json-rpc-engine/dist/types/getUniqueId.d.ts","../../json-rpc-engine/dist/types/idRemapMiddleware.d.ts","../../json-rpc-engine/dist/types/mergeMiddleware.d.ts","../../json-rpc-engine/dist/types/index.d.ts","../../eth-json-rpc-provider/dist/types/safe-event-emitter-provider.d.ts","../../eth-json-rpc-provider/dist/types/provider-from-engine.d.ts","../../eth-json-rpc-provider/dist/types/provider-from-middleware.d.ts","../../eth-json-rpc-provider/dist/types/index.d.ts","../../../node_modules/eth-block-tracker/dist/BlockTracker.d.ts","../../../node_modules/eth-block-tracker/dist/PollingBlockTracker.d.ts","../../../node_modules/eth-block-tracker/dist/SubscribeBlockTracker.d.ts","../../../node_modules/eth-block-tracker/dist/index.d.ts","../../network-controller/dist/types/types.d.ts","../../network-controller/dist/types/create-auto-managed-network-client.d.ts","../../network-controller/dist/types/NetworkController.d.ts","../../network-controller/dist/types/create-network-client.d.ts","../../network-controller/dist/types/index.d.ts","../../polling-controller/dist/types/AbstractPollingController.d.ts","../../polling-controller/dist/types/BlockTrackerPollingController.d.ts","../../polling-controller/dist/types/StaticIntervalPollingController.d.ts","../../polling-controller/dist/types/index.d.ts","../../../node_modules/@types/uuid/index.d.ts","../src/determineGasFeeCalculations.ts","../src/fetchBlockFeeHistory.ts","../src/fetchGasEstimatesViaEthFeeHistory/medianOf.ts","../src/fetchGasEstimatesViaEthFeeHistory/calculateGasFeeEstimatesForPriorityLevels.ts","../src/fetchGasEstimatesViaEthFeeHistory/types.ts","../src/fetchGasEstimatesViaEthFeeHistory/fetchLatestBlock.ts","../src/fetchGasEstimatesViaEthFeeHistory.ts","../src/gas-util.ts","../src/GasFeeController.ts","../src/index.ts","../../../node_modules/@babel/types/lib/index.d.ts","../../../node_modules/@types/babel__generator/index.d.ts","../../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../../node_modules/@types/babel__template/index.d.ts","../../../node_modules/@types/babel__traverse/index.d.ts","../../../node_modules/@types/babel__core/index.d.ts","../../../node_modules/@types/deep-freeze-strict/index.d.ts","../../../node_modules/@types/eslint/helpers.d.ts","../../../node_modules/@types/estree/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/eslint/index.d.ts","../../../node_modules/@types/graceful-fs/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/chalk/index.d.ts","../../../node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../node_modules/pretty-format/build/types.d.ts","../../../node_modules/pretty-format/build/index.d.ts","../../../node_modules/jest-diff/build/types.d.ts","../../../node_modules/jest-diff/build/diffLines.d.ts","../../../node_modules/jest-diff/build/printDiffs.d.ts","../../../node_modules/jest-diff/build/index.d.ts","../../../node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/@types/jest/index.d.ts","../../../node_modules/@types/jest-when/index.d.ts","../../../node_modules/@types/json5/index.d.ts","../../../node_modules/@types/lodash/common/common.d.ts","../../../node_modules/@types/lodash/common/array.d.ts","../../../node_modules/@types/lodash/common/collection.d.ts","../../../node_modules/@types/lodash/common/date.d.ts","../../../node_modules/@types/lodash/common/function.d.ts","../../../node_modules/@types/lodash/common/lang.d.ts","../../../node_modules/@types/lodash/common/math.d.ts","../../../node_modules/@types/lodash/common/number.d.ts","../../../node_modules/@types/lodash/common/object.d.ts","../../../node_modules/@types/lodash/common/seq.d.ts","../../../node_modules/@types/lodash/common/string.d.ts","../../../node_modules/@types/lodash/common/util.d.ts","../../../node_modules/@types/lodash/index.d.ts","../../../node_modules/@types/minimatch/index.d.ts","../../../node_modules/@types/parse-json/index.d.ts","../../../node_modules/@types/pbkdf2/index.d.ts","../../../node_modules/@types/prettier/index.d.ts","../../../node_modules/@types/punycode/index.d.ts","../../../node_modules/@types/readable-stream/node_modules/safe-buffer/index.d.ts","../../../node_modules/@types/readable-stream/index.d.ts","../../../node_modules/@types/secp256k1/index.d.ts","../../../node_modules/@types/semver/classes/semver.d.ts","../../../node_modules/@types/semver/functions/parse.d.ts","../../../node_modules/@types/semver/functions/valid.d.ts","../../../node_modules/@types/semver/functions/clean.d.ts","../../../node_modules/@types/semver/functions/inc.d.ts","../../../node_modules/@types/semver/functions/diff.d.ts","../../../node_modules/@types/semver/functions/major.d.ts","../../../node_modules/@types/semver/functions/minor.d.ts","../../../node_modules/@types/semver/functions/patch.d.ts","../../../node_modules/@types/semver/functions/prerelease.d.ts","../../../node_modules/@types/semver/functions/compare.d.ts","../../../node_modules/@types/semver/functions/rcompare.d.ts","../../../node_modules/@types/semver/functions/compare-loose.d.ts","../../../node_modules/@types/semver/functions/compare-build.d.ts","../../../node_modules/@types/semver/functions/sort.d.ts","../../../node_modules/@types/semver/functions/rsort.d.ts","../../../node_modules/@types/semver/functions/gt.d.ts","../../../node_modules/@types/semver/functions/lt.d.ts","../../../node_modules/@types/semver/functions/eq.d.ts","../../../node_modules/@types/semver/functions/neq.d.ts","../../../node_modules/@types/semver/functions/gte.d.ts","../../../node_modules/@types/semver/functions/lte.d.ts","../../../node_modules/@types/semver/functions/cmp.d.ts","../../../node_modules/@types/semver/functions/coerce.d.ts","../../../node_modules/@types/semver/classes/comparator.d.ts","../../../node_modules/@types/semver/classes/range.d.ts","../../../node_modules/@types/semver/functions/satisfies.d.ts","../../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../../node_modules/@types/semver/ranges/min-version.d.ts","../../../node_modules/@types/semver/ranges/valid.d.ts","../../../node_modules/@types/semver/ranges/outside.d.ts","../../../node_modules/@types/semver/ranges/gtr.d.ts","../../../node_modules/@types/semver/ranges/ltr.d.ts","../../../node_modules/@types/semver/ranges/intersects.d.ts","../../../node_modules/@types/semver/ranges/simplify.d.ts","../../../node_modules/@types/semver/ranges/subset.d.ts","../../../node_modules/@types/semver/internals/identifiers.d.ts","../../../node_modules/@types/semver/index.d.ts","../../../node_modules/@types/sinonjs__fake-timers/index.d.ts","../../../node_modules/@types/sinon/index.d.ts","../../../node_modules/@types/stack-utils/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts"],"fileInfos":[{"version":"f20c05dbfe50a208301d2a1da37b9931bce0466eb5a1f4fe240971b4ecc82b67","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"9b087de7268e4efc5f215347a62656663933d63c0b1d7b624913240367b999ea","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"55f400eec64d17e888e278f4def2f254b41b89515d3b88ad75d5e05f019daddd","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"775d9c9fd150d5de79e0450f35bc8b8f94ae64e3eb5da12725ff2a649dccc777","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"70bbfaec021ac4a0c805374225b55d70887f987df8b8dd7711d79464bb7b4385","869089d60b67219f63e6aca810284c89bae1b384b5cbc7ce64e53d82ad223ed5",{"version":"18338b6a4b920ec7d49b4ffafcbf0fa8a86b4bfd432966efd722dab611157cf4","affectsGlobalScope":true},"62a0875a0397b35a2364f1d401c0ce17975dfa4d47bf6844de858ae04da349f9","ee7491d0318d1fafcba97d5b72b450eb52671570f7a4ecd9e8898d40eaae9472","e3e7d217d89b380c1f34395eadc9289542851b0f0a64007dfe1fb7cf7423d24e","fd79909e93b4d50fd0ed9f3d39ddf8ba0653290bac25c295aac49f6befbd081b","345a9cc2945406f53051cd0e9b51f82e1e53929848eab046fdda91ee8aa7da31","9debe2de883da37a914e5e784a7be54c201b8f1d783822ad6f443ff409a5ea21","dee5d5c5440cda1f3668f11809a5503c30db0476ad117dd450f7ba5a45300e8f","f5e396c1424c391078c866d6f84afe0b4d2f7f85a160b9c756cd63b5b1775d93","5caa6f4fff16066d377d4e254f6c34c16540da3809cd66cd626a303bc33c419f","730d055528bdf12c8524870bb33d237991be9084c57634e56e5d8075f6605e02","869b0f507115c42896d917642f821752e8a84827bfe9ed74c23d76fb0c64c681","e475453e7140e95542332943d3052fe4c7430ad1efce42b3e9157f1fee8cbc5f","ebfdf904255ce746c9d30117c2edef355fb19bf7650478d2405f39f0e4f302e6","f3f63b48addb8e2ea9d20bb671c3c306413b3daa39996d0ae52f63d8e32158e1","a50599c08934a62f11657bdbe0dc929ab66da1b1f09974408fd9a33ec1bb8060","5a20e7d6c630b91be15e9b837853173829d00273197481dc8d3e94df61105a71","8d478048d71cc16f806d4b71b252ecb67c7444ccf4f4b09b29a312712184f859","b4000a0a525fa921e896cbdb32ae802c9684f0fd371b5fc69e7310f7918cc2c3","9df4662ca3dbc2522bc115833ee04faa1afbb4e249a85ef4a0a09c621346bd08","b25d9065cf1c1f537a140bbc508e953ed2262f77134574c432d206ff36f4bdbf","1b103313097041aa9cd705a682c652f08613cb5cf8663321061c0902f845e81c","68ccec8662818911d8a12b8ed028bc5729fb4f1d34793c4701265ba60bc73cf4","5f85b8b79dc4d36af672c035b2beb71545de63a5d60bccbeee64c260941672ab","affb9dc7079c3a3522e046c5dc1325950a843b1ebd7dc0f0386aeb2397b9f0db","40fe4b689225816b31fe5794c0fbf3534568819709e40295ead998a2bc1ab237","f65b5e33b9ad545a1eebbd6afe857314725ad42aaf069913e33f928ab3e4990a","fb6f2a87beb7fb1f4c2b762d0c76a9459fc91f557231569b0ee21399e22aa13d","31c858dc85996fac4b7fa944e1016d5c72f514930a72357ab5001097bf6511c7","3de30a871b3340be8b679c52aa12f90dd1c8c60874517be58968fdbcc4d79445","6fd985bd31eaf77542625306fb0404d32bff978990f0a06428e5f0b9a3b58109","34693fb4a5e771e11668219221344dd1bd7d8b77ed005a1c1d965fb559be8406","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419",{"version":"8c61d5fc50490af59daf69c4e601cc76de260ee5b2ff057d608a78d6acb0b61a","affectsGlobalScope":true},"f51b4042a3ac86f1f707500a9768f88d0b0c1fc3f3e45a73333283dea720cdc6",{"version":"a7289d79eb84a59d2475b4d0136b4404be3cfdd17c3ea46b9194add1d645df01","affectsGlobalScope":true},"0bb26fa2a90ee890eed57ee812c71fa84d3d07850163ec4a204de86412cc57c1","132ca47da601c60141dd6f10bd08c70d0620177e5638439df2464ec3945b6d98",{"version":"55d2bbae076fed7269c3e16faeb32f988f558427b7a1c3bf04aa7551ab86ae90","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","543c6e3a2353e9ad08b4090e1fb88a95cefb756d0d173b6ec045d7dc70a79964","3a41ebe7f089d50f447466b35b6cabb8b584c0994fc9809d0cd0a4ebc41e1239","f5350b93f10178838c23b3a81f3791d839bc44d1a2a89edb60069250fab90899","aa07f7230bcc5733919c941753d067cb8816dcad6651edb815cb302ae8ddd931","649ba4638a25c54a18dffe37367c6b7848a0bca53fa42fbbd7300b0c61aa861c","5f20d20b7607174caf1a6da9141aeb9f2142159ae2410ca30c7a0fccd1d19c99",{"version":"a34d65f61ec5aac5b53502c8b0bd4e00d217bccb95bf94d449e2571baa11fb8c","affectsGlobalScope":true},"8d42e5af5fb0a96a77e135ce84cc60636c9bad39d9dba043a4efe9d1bdeb3cc3","56fcc451e9065eb121c9cc4c1b9994a816306f3b0b3b1fce7ad59f0ac97a9999","d4a13a5a2e6df8ef02a84ac6fd5bad4a1ec54fdef47f33250da386ea6d5c1864","c3759b5bc5cc40f5988d86a497741a80fa91258629ae50a2b3735e774cd377cc","bf268a0aea37ad4ae3b7a9b58559190b6fc01ea16a31e35cd05817a0a60f895a","45dd82fb5aea9b12b2a90b427b28f3a014e8b2ee9b74087a5ab882841cb5fbc5",{"version":"d7dad6db394a3d9f7b49755e4b610fbf8ed6eb0c9810ae5f1a119f6b5d76de45","affectsGlobalScope":true},"48b2f9302651eb31acd5be69bb4e6b35797a7fcd6b77391d10a4ccadf7dc3609","605bed8af3052e790865a35e3d538a5447764a4ff01989c0f6b084a96f40e1cb","dd67d2b5e4e8a182a38de8e69fb736945eaa4588e0909c14e01a14bd3cc1fd1e",{"version":"2db274de1088f268805043df72e21258eae845e6418dada65331d2898998f330","affectsGlobalScope":true},{"version":"2923dee3c897f03e91b54a210cdbefea7290562f0ac4b948667d4c9ee844b79e","affectsGlobalScope":true},"79169698d09a2be54b14f3bcad2575b414bf3525063fde0a1e4fcd5d6efd380e","051d939bcf77caa3cef3282708ab3a6fdfb741a7366e1d74a9e7603b67417ec3","0be79b3ff0f16b6c2f9bc8c4cc7097ea417d8d67f8267f7e1eec8e32b548c2ff","1c61ffa3a71b77363b30d19832c269ef62fba787f5610cac7254728d3b69ab2e","f6877afc4b9d0b72e15378b187492a6547e48783980e9ff1301163b7b1c15b2e","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","09ed02a725db002693236b6dfc49b2c6eb5557be1421d7fbe4f07cfe38211d92","09d801ff4a303d4976d4b9cb94af3a9097c4a70345e662d176975872d2998e51","c8558b01389b5f7610ac293aa612ccea2ae64d83af43b49f8142f190be1f414c","c40fdf7b2e18df49ce0568e37f0292c12807a0748be79e272745e7216bed2606",{"version":"b10b426c56e220b5093bf8a2446ee47af47263b7b1a03f4b18e42326b231b111","affectsGlobalScope":true},"4e228e78c1e9b0a75c70588d59288f63a6258e8b1fe4a67b0c53fe03461421d9","b4635ef36bee17e1304337d591c3b6b461ecdbc1876d0effbe6a581e62201fe5","205d50c24359ead003dc537b9b65d2a64208dfdffe368f403cf9e0357831db9e","1265fddcd0c68be9d2a3b29805d0280484c961264dd95e0b675f7bd91f777e78",{"version":"e4507242542bd499238f693d88b2d32e22177cc508854625f87bcc9bc3fa1256","affectsGlobalScope":true},{"version":"d942354e4966a98d3a92d1b1af0b4ac06f33af3f88116743e2c304c027ca26ef","affectsGlobalScope":true},"39f0808e5be3cb38674726c21fe2eb453c55e48a901679b4ce30fef85549b892","6afd66a7432ef100027ea110449e874196381e019e30eda7e7d8ca390366b7a8","befb8a9a78ac99d8fbc3ed392810489a7b90760c7a58934e8f1c8538f581cff3","e670bdf01540d35c170fae68edfd2f288eff909936780c379d6a9103b787b22c","867f95abf1df444aab146b19847391fc2f922a55f6a970a27ed8226766cee29f",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"e3685a8957b4e2af64c3f04a58289ee0858a649dbcd963a2b897fe85858ae18a","175323e2a79a6076e0bada8a390d535a3ea817158bf1b1f46e31efca9028a0a2","7a10053aadc19335532a4d02756db4865974fd69bea5439ddcc5bfdf062d9476","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","aed9e712a9b168345362e8f3a949f16c99ca1e05d21328f05735dfdbb24414ef","b04fe6922ed3db93afdbd49cdda8576aa75f744592fceea96fb0d5f32158c4f5","ed8d6c8de90fc2a4faaebc28e91f2469928738efd5208fb75ade0fa607e892b7","d7c52b198d680fe65b1a8d1b001f0173ffa2536ca2e7082431d726ce1f6714cd","c07f251e1c4e415a838e5498380b55cfea94f3513229de292d2aa85ae52fc3e9","0ed401424892d6bf294a5374efe512d6951b54a71e5dd0290c55b6d0d915f6f7","b945be6da6a3616ef3a250bfe223362b1c7c6872e775b0c4d82a1bf7a28ff902","beea49237dd7c7110fabf3c7509919c9cb9da841d847c53cac162dc3479e2f87","0f45f8a529c450d8f394106cc622bff79e44a1716e1ac9c3cc68b43f7ecf65ee","c624ce90b04c27ce4f318ba6330d39bde3d4e306f0f497ce78d4bda5ab8e22ca","9b8253aa5cb2c82d505f72afdbf96e83b15cc6b9a6f4fadbbbab46210d5f1977","86a8f52e4b1ac49155e889376bcfa8528a634c90c27fec65aa0e949f77b740c5","aab5dd41c1e2316cc0b42a7dd15684f8582d5a1d16c0516276a2a8a7d0fecd9c","59948226626ee210045296ba1fc6cb0fe748d1ff613204e08e7157ab6862dee7","ec3e54d8b713c170fdc8110a7e4a6a97513a7ab6b05ac9e1100cb064d2bb7349","43beb30ecb39a603fde4376554887310b0699f25f7f39c5c91e3147b51bb3a26","666b77d7f06f49da114b090a399abbfa66d5b6c01a3fd9dc4f063a52ace28507","31997714a93fbc570f52d47d6a8ebfb021a34a68ea9ba58bbb69cdec9565657e","6032e4262822160128e644de3fc4410bcd7517c2f137525fd2623d2bb23cb0d3","8bd5c9b1016629c144fd228983395b9dbf0676a576716bc3d316cab612c33cd5","2ed90bd3925b23aed8f859ffd0e885250be0424ca2b57e9866dabef152e1d6b7","93f6bd17d92dab9db7897e1430a5aeaa03bcf51623156213d8397710367a76ce","3f62b770a42e8c47c7008726f95aa383e69d97e85e680d237b99fcb0ee601dd8","5b84cfe78028c35c3bb89c042f18bf08d09da11e82d275c378ae4d07d8477e6c","980d21b0081cbf81774083b1e3a46f4bbdcd2b68858df0f66d7fad9c82bc34bc","6a9c5127096b35264eb7cd21b2417bfc1d42cceca9ba4ce2bb0c3410b7816042","93b7325b49dfbf613d940ed0e471216657b2d77459dac34f1b5b1678f08f884c","b17f3bb7d8333479c7e45e5f3d876761b9bca58f97594eca3f6a944fd825e632","3c1f1236cce6d6e0c4e2c1b4371e6f72d7c14842ecd76a98ed0748ee5730c8f3","6d7f58d5ea72d7834946fd7104a734dc7d40661be8b2e1eaced1ddce3268ebaf","4c26222991e6c97d5a8f541d4f2c67585eda9e8b33cf9f52931b098045236e88","3140d587067e55ce4028275cf71b40a3fd431863ad148efc3106af84a0794cf9","47383b45796d525a4039cd22d2840ac55a1ff03a43d027f7f867ba7314a9cf53","6548773b3abbc18de29176c2141f766d4e437e40596ee480447abf83575445ad","6ddd27af0436ce59dd4c1896e2bfdb2bdb2529847d078b83ce67a144dff05491","816264799aef3fd5a09a3b6c25217d5ec26a9dfc7465eac7d6073bcdc7d88f3f","4df0891b133884cd9ed752d31c7d0ec0a09234e9ed5394abffd3c660761598db","b603b62d3dcd31ef757dc7339b4fa8acdbca318b0fb9ac485f9a1351955615f9","e642bd47b75ad6b53cbf0dfd7ddfa0f120bd10193f0c58ec37d87b59bf604aca","be90b24d2ee6f875ce3aaa482e7c41a54278856b03d04212681c4032df62baf9","78f5ff400b3cb37e7b90eef1ff311253ed31c8cb66505e9828fad099bffde021","372c47090e1131305d163469a895ff2938f33fa73aad988df31cd31743f9efb6","71c67dc6987bdbd5599353f90009ff825dd7db0450ef9a0aee5bb0c574d18512","6f12403b5eca6ae7ca8e3efe3eeb9c683b06ce3e3844ccfd04098d83cd7e4957","282c535df88175d64d9df4550d2fd1176fd940c1c6822f1e7584003237f179d3","c3a4752cf103e4c6034d5bd449c8f9d5e7b352d22a5f8f9a41a8efb11646f9c2","11a9e38611ac3c77c74240c58b6bd64a0032128b29354e999650f1de1e034b1c","4ed103ca6fff9cb244f7c4b86d1eb28ce8069c32db720784329946731badb5bb","d738f282842970e058672663311c6875482ee36607c88b98ffb6604fba99cb2a","ec859cd8226aa623e41bbb47c249a55ee16dc1b8647359585244d57d3a5ed0c7","8891c6e959d253a66434ff5dc9ae46058fb3493e84b4ca39f710ef2d350656b1","c4463cf02535444dcbc3e67ecd29f1972490f74e49957d6fd4282a1013796ba6","0cb0a957ff02de0b25fd0f3f37130ca7f22d1e0dea256569c714c1f73c6791f8","2f5075dc512d51786b1ba3b1696565641dfaae3ac854f5f13d61fa12ef81a47e","55fcfa6909a227963d5ad3d59ea9f99480106ebd9c69d87fce8a66f8f66e23c3","7f03c7ae3f6cedb6d9261d31d0fb518d940fb2f1b8d2b02b306c6d4b7e1bc8aa","45351e0d51780b6f4088277a4457b9879506ee2720a887de232df0f1efcb33d8","b59e5a5f93b7bbf729cacd0bc86106498e58f07114868350265a3de3598312c7","7c1b05262a4623e5d2a5832433582e0d6b453a3db8aa799b98f38d105812296f","6ee58aa536dabb19b09bc036f1abe83feb51e13d63b23d30b2d0631a2de99b8f","8aceb205dcc6f814ad99635baf1e40b6e01d06d3fe27b72fd766c6d0b8c0c600","530fb1c53338ac6618f8b8c4aa30acf89a9fe13b2bf92184ad966c824350d827","c1e87ae9c6982a1628be91d9f3a52ec5a73ed1a6d42e4e8119bf96c453b14cc0","161a4d1342b99b095a9531e65ba773ab33df0d906d7ae9f4f39180320fe23237","722cf9592e0d42cb903e40aa725f3e8e7cde91271f6be8c318bfbd7e337ff886","6a6aaf58d8ccff1409f921c37d0eb6cec3113df483c485385af3d90414e8eb07","ac9b69620b356f5bcfbc17d6a2a0591354eade1c5febb05cb1079b30ea0094c6","8e7adb22c0adecf7464861fc58ae3fc617b41ffbd70c97aa8493dc0966a82273","755f3cd1d9c1b564cff090e3b0e29200ae55690a91b87cb9e7a64c2dbeb314d3","d6bb7e0a6877b7856c183bff13d09dd9ae599ea43c6f6b33d3d5f72a830ed460","f1b51ae93c762d7c43f559933cd4842dd870367e8d92e90704ffa685dd5b29a3","3f450762fd7c34ed545e738abccb0af6a703572a10521643cf8fc88e3724c99c","fcc8beef29f39f09b1d9c9f99c42f9fed605ab1c28d2a630185f732b9ba53763","8b497c8cdd875848164f60712378fb15fbc2d625b67d29285845a51fcca57aff","0be91c7eb27de7e2b84c2caa3f89ac2c314de7e00d142c01b3baa0c88163bba4","0a0658c71cfa72984205a2f33b1e28e5e5fdbce0e4fb88186aed4e5a658065dc","cb047832dc68f5a2c41c62c5e95ddcacbae3a8b034d40cd15319a8cb7f25104a","980336ccdfc3c08f3c3b201aa6662e6016e20f15847f8465b68f3e8e67b4665c","5a3493939995f46ff3d9073cd534fb8961c3bf4e08c71db27066ff03d906dea8","bb5a2ac327605ebebf831c469b05bd34a33a6a46ee8c1edd9f3310aad32cf6a1","bf5d041f2440b4a9391e2b5eb3b8d94cbf1e3b8ff4703b6539d4e65e758c8f37","8516469eb90e723b0eb03df1be098f7e6a4709f6f48fd4532868d20a0a934f6e","d60e9ab369a72d234aac49adbe2900d8ef1408a6ea4db552cf2a48c9d8d6a1bc","0ebb4698803f01e2e7df6acce572fff068f4a20c47221721dafd70a27e372831","a12eaa942232703a8a8477a2f240ad5a2c26c595012ea8f128224e77984099c4","4070c2f1c3434fcf84886e04d30d82cd650ee443e53b82b404b144175cf8741e","2cea9689efa8591732096235abe7f084fc29c92badd5b0897a5e876b77e71887","4ed4e504126014fee13aaef5e3fc140f2ff7031ff3a8b5386717905820ea2d09","b0a1e66ed5a0e5dbcd308bccc2e8ba2aac2e17306a3e6888f74bc450c9806a9e","e09f372cbf6582b5b271ef8de9a896d7785aa353dd5f9c574714dcd41636462a","8e13478e90645f18e32db1e7d82729f9b8adf2cfe9e8bb445e6d0c3f8249aebd","d95e9b84527c1091bbccde1a213d987e3eb3c1ba0de7bfb5ee710f45107b5734","12c89d0e32758c120a569045f21cf5b77244f86792611ced8de7f86b37e77781","ccccd5387e496a2899d50ed492c6120c83b7fdfe5d4fe79c4275a79b3ff7b936","751eff4da87d06979e2a4d1d99a9bc98abf04ed569c5871c97e568a83cfff25e","b121f7725eb885a38942124e6d87ef86d650b5221368f49d0b332695d53d0c34","1ff59fddc2d63283af44fd820daff74947a3282bf11bdfb014098aed1a3a51ac","fab58e600970e66547644a44bc9918e3223aa2cbd9e8763cec004b2cfb48827e",{"version":"e9aa2410e8871df21f0d81fa3afaa114c3092b3bacb25765e3e955697df8cfb8","signature":"7359fe30980ad122c41f840074f7881b195cb703d609a117c8dff7f673c4cf00"},{"version":"a8087c3721ee3a254e604071e4cb70469c142850ea3f3583868a8c05681ce026","signature":"75d8a7ffa7462afb0f4920188068b6b59a1ae85f59b7dad26e8942a7b77ccdda"},{"version":"52df1d99c73edcf21259dca5ba24f1d7643cf3a4014711b47df18e6a02c8cf19","signature":"5d15fe3a984cdba90e92274faeae015371a0ba64d7d443b178e77f701111afe9"},{"version":"9c4834280d7503d03fa8014183f30846170636baab6d264341d2b87d417e418c","signature":"63650a6d250c5f2f5e0e45e99113789dd65481a6605956643f765b0114cc2ce0"},{"version":"4270f9cfd62abd8ff10374a5acec0c2649e1d4f31300fd768c4933a58643dbb5","signature":"798d424b753359c997dcffdfc70e5636749621a687fc1125d444f86a5d22a93e"},{"version":"fd76e840ad3b3f7e9bd6d25b9485dc75a68b210c80f0ee034d4e27775114ba5f","signature":"d18efa93b91f45a1f26b97a23ae82670d8a80a91401f929826c4b5836973801e"},{"version":"b7ece87fafd76aebf93a0b670486851917d4d9ae981486286c231d6e6dc05428","signature":"67590c11008841bf8544396a16000a10b5687394d7caf5d2b5f60f8de9fac20b"},{"version":"15433a2e97dcee760d97f8e56afe908fe932611ef00711aed9b246ba058ce0be","signature":"c5fc52cba80e6ba6fde33b0f9370b8ba6866831070cbc84b20a7c6e9e1163160"},{"version":"8fab09703e473038c5b990ae1785dc9556b6dddb70694de55cc39f661c6ca7bd","signature":"c0e1493caaab115c737b9ef6f4d37b7d2962a1bf16a18b602f882c9a0a4b01ef"},"d021f18758b28bda32bdaf0a987e0804cec074a9a4cfab8232ed81d96e75dfae","a5aaeca001d2f69093d04aac4db321e4c338fd9b20cbc4f0b0af3dc6ae0f235b","cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","8041cfce439ff29d339742389de04c136e3029d6b1817f07b2d7fcbfb7534990","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","29a46d003ca3c721e6405f00dee7e3de91b14e09701eba5d887bf76fb2d47d38","069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","9990f9e566bc3c2c6e38df81294fb756e7f5b7b0e5bb17ab75384e190548b4b6",{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"ee7d8894904b465b072be0d2e4b45cf6b887cdba16a467645c4e200982ece7ea","f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","df95e00612c1faa5e0e7ef0dba589b18665bbeb3221db2b6cee1fe4d0e61921f","afe73051ff6a03a9565cbd8ebb0e956ee3df5e913ad5c1ded64218aabfa3dcb5","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","462bccdf75fcafc1ae8c30400c9425e1a4681db5d605d1a0edb4f990a54d8094","5923d8facbac6ecf7c84739a5c701a57af94a6f6648d6229a6c768cf28f0f8cb","7adecb2c3238794c378d336a8182d4c3dd2c4fa6fa1785e2797a3db550edea62","dc12dc0e5aa06f4e1a7692149b78f89116af823b9e1f1e4eae140cd3e0e674e6","1bfc6565b90c8771615cd8cfcf9b36efc0275e5e83ac7d9181307e96eb495161","8a8a96898906f065f296665e411f51010b51372fa260d5373bf9f64356703190","7f82ef88bdb67d9a850dd1c7cd2d690f33e0f0acd208e3c9eba086f3670d4f73",{"version":"ccfd8774cd9b929f63ff7dcf657977eb0652e3547f1fcac1b3a1dc5db22d4d58","affectsGlobalScope":true},"d92dc90fecd2552db74d8dc3c6fb4db9145b2aa0efe2c127236ba035969068d4","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","458111fc89d11d2151277c822dfdc1a28fa5b6b2493cf942e37d4cd0a6ee5f22","19c816167e076e7c24f074389c6cf3ed87bdbb917d1ea439ca281f9d26db2439","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","febf0b2de54781102b00f61653b21377390a048fbf5262718c91860d11ff34a6","98f9d826db9cd99d27a01a59ee5f22863df00ccf1aaf43e1d7db80ebf716f7c3","0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","dcd91d3b697cb650b95db5471189b99815af5db2a1cd28760f91e0b12ede8ed5","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3cf0d343c2276842a5b617f22ba82af6322c7cfe8bb52238ffc0c491a3c21019","df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9",{"version":"f2eff8704452659641164876c1ef0df4174659ce7311b0665798ea3f556fa9ad","affectsGlobalScope":true},"8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","a73a445c1e0a6d0f8b48e8eb22dc9d647896783a7f8991cbbc31c0d94bf1f5a2","d88a5e779faf033be3d52142a04fbe1cb96009868e3bbdd296b2bc6c59e06c0e","cd1d2f103b79002cd94b85a640a103f094227a2c4c53bc8af1fdbf4e13d9729e","5e379df3d61561c2ed7789b5995b9ba2143bbba21a905e2381e16efe7d1fa424","f07a137bbe2de7a122c37bfea00e761975fb264c49f18003d398d71b3fb35a5f","3dce33e7eb25594863b8e615f14a45ab98190d85953436750644212d8a18c066","2b93035328f7778d200252681c1d86285d501ed424825a18f81e4c3028aa51d9","2ac9c8332c5f8510b8bdd571f8271e0f39b0577714d5e95c1e79a12b2616f069","42c21aa963e7b86fa00801d96e88b36803188018d5ad91db2a9101bccd40b3ff","d31eb848cdebb4c55b4893b335a7c0cca95ad66dee13cbb7d0893810c0a9c301","b9f96255e1048ed2ea33ec553122716f0e57fc1c3ad778e9aa15f5b46547bd23","7a9e0a564fee396cacf706523b5aeed96e04c6b871a8bebefad78499fbffc5bc","906c751ef5822ec0dadcea2f0e9db64a33fb4ee926cc9f7efa38afe5d5371b2a","5387c049e9702f2d2d7ece1a74836a14b47fbebe9bbeb19f94c580a37c855351","c68391fb9efad5d99ff332c65b1606248c4e4a9f1dd9a087204242b56c7126d6","e9cf02252d3a0ced987d24845dcb1f11c1be5541f17e5daa44c6de2d18138d0c","e8b02b879754d85f48489294f99147aeccc352c760d95a6fe2b6e49cd400b2fe","9f6908ab3d8a86c68b86e38578afc7095114e66b2fc36a2a96e9252aac3998e0","0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","71405cc70f183d029cc5018375f6c35117ffdaf11846c35ebf85ee3956b1b2a6","c68baff4d8ba346130e9753cefe2e487a16731bf17e05fdacc81e8c9a26aae9d","2cd15528d8bb5d0453aa339b4b52e0696e8b07e790c153831c642c3dea5ac8af","479d622e66283ffa9883fbc33e441f7fc928b2277ff30aacbec7b7761b4e9579","ade307876dc5ca267ca308d09e737b611505e015c535863f22420a11fffc1c54","f8cdefa3e0dee639eccbe9794b46f90291e5fd3989fcba60d2f08fde56179fb9","86c5a62f99aac7053976e317dbe9acb2eaf903aaf3d2e5bb1cafe5c2df7b37a8","2b300954ce01a8343866f737656e13243e86e5baef51bd0631b21dcef1f6e954","a2d409a9ffd872d6b9d78ead00baa116bbc73cfa959fce9a2f29d3227876b2a1","b288936f560cd71f4a6002953290de9ff8dfbfbf37f5a9391be5c83322324898","61178a781ef82e0ff54f9430397e71e8f365fc1e3725e0e5346f2de7b0d50dfa","6a6ccb37feb3aad32d9be026a3337db195979cd5727a616fc0f557e974101a54","c649ea79205c029a02272ef55b7ab14ada0903db26144d2205021f24727ac7a3","38e2b02897c6357bbcff729ef84c736727b45cc152abe95a7567caccdfad2a1d","d6610ea7e0b1a7686dba062a1e5544dd7d34140f4545305b7c6afaebfb348341","3dee35db743bdba2c8d19aece7ac049bde6fa587e195d86547c882784e6ba34c","b15e55c5fa977c2f25ca0b1db52cfa2d1fd4bf0baf90a8b90d4a7678ca462ff1","f41d30972724714763a2698ae949fbc463afb203b5fa7c4ad7e4de0871129a17","843dd7b6a7c6269fd43827303f5cbe65c1fecabc30b4670a50d5a15d57daeeb9","f06d8b8567ee9fd799bf7f806efe93b67683ef24f4dea5b23ef12edff4434d9d","6017384f697ff38bc3ef6a546df5b230c3c31329db84cbfe686c83bec011e2b2","e1a5b30d9248549ca0c0bb1d653bafae20c64c4aa5928cc4cd3017b55c2177b0","a593632d5878f17295bd53e1c77f27bf4c15212822f764a2bfc1702f4b413fa0","a868a534ba1c2ca9060b8a13b0ffbbbf78b4be7b0ff80d8c75b02773f7192c29","da7545aba8f54a50fde23e2ede00158dc8112560d934cee58098dfb03aae9b9d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","a1a261624efb3a00ff346b13580f70f3463b8cdcc58b60f5793ff11785d52cab","f83b320cceccfc48457a818d18fc9a006ab18d0bdd727aa2c2e73dc1b4a45e98","9d92b037978bb9525bc4b673ebddd443277542e010c0aef019c03a170ccdaa73","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e","ed44ba6b95f08b758748be7902e0cc54178b1337c56d0e2469c77b03f63ac73b"],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"inlineSources":true,"module":1,"outDir":"./types","rootDir":"../src","sourceMap":true,"strict":true,"target":7},"fileIdsList":[[119,238],[119],[90,119,126,127,128,143],[119,127,128,144,145],[119,126,127],[119,126,143,146,149],[119,126,146,149,150],[119,147,148,149,151,152],[119,126,149],[119,126,143,146,147,148,151],[119,126,134],[119,126],[90,119,126],[79,119,126],[119,130,131,132,133,134,135,136,137,138,139,140,141,142],[119,126,132,133],[119,126,132,134],[119,197],[119,197,198,199],[63,119],[66,119],[63,66,119],[64,65,66,67,68,69,70,71,72,73,74,119,154,157,158,159,160,161,162,163,164],[57,63,64,119],[66,72,74,119,153],[119,156],[66,67,119],[63,119,160],[119,192,193],[119,238,239,240,241,242],[119,238,240],[119,155],[119,245,246,247],[91,119,126],[119,250],[119,251],[119,262],[119,256,261],[119,265,267,268,269,270,271,272,273,274,275,276,277],[119,265,266,268,269,270,271,272,273,274,275,276,277],[119,266,267,268,269,270,271,272,273,274,275,276,277],[119,265,266,267,269,270,271,272,273,274,275,276,277],[119,265,266,267,268,270,271,272,273,274,275,276,277],[119,265,266,267,268,269,271,272,273,274,275,276,277],[119,265,266,267,268,269,270,272,273,274,275,276,277],[119,265,266,267,268,269,270,271,273,274,275,276,277],[119,265,266,267,268,269,270,271,272,274,275,276,277],[119,265,266,267,268,269,270,271,272,273,275,276,277],[119,265,266,267,268,269,270,271,272,273,274,276,277],[119,265,266,267,268,269,270,271,272,273,274,275,277],[119,265,266,267,268,269,270,271,272,273,274,275,276],[75,119],[78,119],[79,84,110,119],[80,90,91,98,107,118,119],[80,81,90,98,119],[82,119],[83,84,91,99,119],[84,107,115,119],[85,87,90,98,119],[86,119],[87,88,119],[89,90,119],[90,119],[90,91,92,107,118,119],[90,91,92,107,119],[93,98,107,118,119],[90,91,93,94,98,107,115,118,119],[93,95,107,115,118,119],[75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125],[90,96,119],[97,118,119,123],[87,90,98,107,119],[99,119],[100,119],[78,101,119],[102,117,119,123],[103,119],[104,119],[90,105,119],[105,106,119,121],[79,90,107,108,109,119],[79,107,109,119],[107,108,119],[110,119],[111,119],[90,113,114,119],[113,114,119],[84,98,115,119],[116,119],[98,117,119],[79,93,104,118,119],[84,119],[107,119,120],[119,121],[119,122],[79,84,90,92,101,107,118,119,121,123],[107,119,124],[119,126,283],[119,286,325],[119,286,310,325],[119,325],[119,286],[119,286,311,325],[119,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324],[119,311,325],[119,326],[119,329],[119,202],[119,202,213,214],[119,214,215,216],[119,177],[119,177,178,179,180,181],[119,166,167,168,169,170,171,172,173,174,175,176],[119,254,257],[119,254,257,258,259],[119,256],[119,253,260],[119,255],[56,58,59,60,61,62,119],[56,57,119],[58,119],[57,58,119],[56,58,119],[119,165,182,183,184],[119,183],[119,184],[55,119,183,184,185],[119,187],[119,187,188,191,195],[119,194],[119,165,189,190],[119,210,211,212],[119,209,210],[119,165,209,210],[119,165,202,209],[119,165,186,189,196,222,226,227,228,234,235],[119,236],[119,190,196],[50,119,189,196,229,231,233,236],[50,119,190,196,229,230,236],[119,189,196,232],[119,190],[119,189,190,196,236],[119,165,202],[119,165,203],[119,203,204,205,206,207,208],[119,165,186,189,196,200,201,218,219],[119,218],[119,201,218,220,221],[119,165,196,213,217],[119,165,222],[119,165,186,222,223],[119,126,165,186,222,223],[119,223,224,225],[165,186,222,226],[236],[190],[189,236],[229,236],[189,232]],"referencedMap":[[240,1],[238,2],[144,3],[127,2],[146,4],[128,5],[145,2],[150,6],[151,7],[147,7],[153,8],[148,7],[152,9],[149,10],[135,11],[132,12],[139,13],[133,11],[130,14],[138,2],[143,15],[140,2],[141,2],[142,2],[137,12],[134,16],[131,2],[136,17],[189,2],[202,13],[198,18],[199,18],[200,19],[197,2],[64,20],[65,20],[67,21],[68,20],[69,20],[70,22],[71,2],[72,2],[73,2],[66,20],[165,23],[74,24],[154,25],[157,26],[158,2],[159,2],[160,2],[161,2],[162,2],[163,27],[164,28],[192,2],[194,29],[193,2],[243,30],[239,1],[241,31],[242,1],[190,12],[156,32],[244,2],[245,2],[248,33],[246,2],[249,34],[250,2],[251,35],[252,36],[263,37],[262,38],[247,2],[264,2],[266,39],[267,40],[265,41],[268,42],[269,43],[270,44],[271,45],[272,46],[273,47],[274,48],[275,49],[276,50],[277,51],[278,2],[155,2],[75,52],[76,52],[78,53],[79,54],[80,55],[81,56],[82,57],[83,58],[84,59],[85,60],[86,61],[87,62],[88,62],[89,63],[90,64],[91,65],[92,66],[77,2],[125,2],[93,67],[94,68],[95,69],[126,70],[96,71],[97,72],[98,73],[99,74],[100,75],[101,76],[102,77],[103,78],[104,79],[105,80],[106,81],[107,82],[109,83],[108,84],[110,85],[111,86],[112,2],[113,87],[114,88],[115,89],[116,90],[117,91],[118,92],[119,93],[120,94],[121,95],[122,96],[123,97],[124,98],[279,2],[280,12],[281,2],[282,2],[284,99],[283,2],[285,12],[310,100],[311,101],[286,102],[289,102],[308,100],[309,100],[299,100],[298,103],[296,100],[291,100],[304,100],[302,100],[306,100],[290,100],[303,100],[307,100],[292,100],[293,100],[305,100],[287,100],[294,100],[295,100],[297,100],[301,100],[312,104],[300,100],[288,100],[325,105],[324,2],[319,104],[321,106],[320,104],[313,104],[314,104],[316,104],[318,104],[322,106],[323,106],[315,106],[317,106],[327,107],[326,2],[328,2],[227,2],[329,2],[330,108],[129,2],[253,2],[214,109],[215,110],[216,110],[217,111],[176,2],[173,112],[175,112],[174,112],[172,112],[182,113],[177,114],[181,2],[178,2],[180,2],[179,2],[168,112],[169,112],[170,112],[166,2],[167,2],[171,112],[254,2],[258,115],[260,116],[259,115],[257,117],[261,118],[256,119],[255,2],[56,2],[63,120],[58,121],[59,122],[60,122],[61,123],[62,123],[57,124],[8,2],[10,2],[9,2],[2,2],[11,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[3,2],[4,2],[22,2],[19,2],[20,2],[21,2],[23,2],[24,2],[25,2],[5,2],[26,2],[27,2],[28,2],[29,2],[6,2],[30,2],[31,2],[32,2],[33,2],[7,2],[34,2],[39,2],[40,2],[35,2],[36,2],[37,2],[38,2],[1,2],[41,2],[55,2],[185,125],[184,126],[183,127],[186,128],[188,129],[196,130],[195,131],[187,2],[191,132],[213,133],[211,134],[212,135],[210,136],[236,137],[228,138],[229,139],[234,140],[231,141],[233,142],[230,143],[232,143],[235,144],[237,138],[203,145],[204,146],[205,146],[206,2],[207,146],[209,147],[208,146],[220,148],[201,2],[219,149],[221,149],[222,150],[218,151],[223,152],[224,153],[225,154],[226,155],[46,2],[47,2],[48,2],[49,2],[50,2],[51,2],[42,2],[52,2],[53,2],[54,2],[43,2],[44,2],[45,2]],"exportedModulesMap":[[240,1],[238,2],[144,3],[127,2],[146,4],[128,5],[145,2],[150,6],[151,7],[147,7],[153,8],[148,7],[152,9],[149,10],[135,11],[132,12],[139,13],[133,11],[130,14],[138,2],[143,15],[140,2],[141,2],[142,2],[137,12],[134,16],[131,2],[136,17],[189,2],[202,13],[198,18],[199,18],[200,19],[197,2],[64,20],[65,20],[67,21],[68,20],[69,20],[70,22],[71,2],[72,2],[73,2],[66,20],[165,23],[74,24],[154,25],[157,26],[158,2],[159,2],[160,2],[161,2],[162,2],[163,27],[164,28],[192,2],[194,29],[193,2],[243,30],[239,1],[241,31],[242,1],[190,12],[156,32],[244,2],[245,2],[248,33],[246,2],[249,34],[250,2],[251,35],[252,36],[263,37],[262,38],[247,2],[264,2],[266,39],[267,40],[265,41],[268,42],[269,43],[270,44],[271,45],[272,46],[273,47],[274,48],[275,49],[276,50],[277,51],[278,2],[155,2],[75,52],[76,52],[78,53],[79,54],[80,55],[81,56],[82,57],[83,58],[84,59],[85,60],[86,61],[87,62],[88,62],[89,63],[90,64],[91,65],[92,66],[77,2],[125,2],[93,67],[94,68],[95,69],[126,70],[96,71],[97,72],[98,73],[99,74],[100,75],[101,76],[102,77],[103,78],[104,79],[105,80],[106,81],[107,82],[109,83],[108,84],[110,85],[111,86],[112,2],[113,87],[114,88],[115,89],[116,90],[117,91],[118,92],[119,93],[120,94],[121,95],[122,96],[123,97],[124,98],[279,2],[280,12],[281,2],[282,2],[284,99],[283,2],[285,12],[310,100],[311,101],[286,102],[289,102],[308,100],[309,100],[299,100],[298,103],[296,100],[291,100],[304,100],[302,100],[306,100],[290,100],[303,100],[307,100],[292,100],[293,100],[305,100],[287,100],[294,100],[295,100],[297,100],[301,100],[312,104],[300,100],[288,100],[325,105],[324,2],[319,104],[321,106],[320,104],[313,104],[314,104],[316,104],[318,104],[322,106],[323,106],[315,106],[317,106],[327,107],[326,2],[328,2],[227,2],[329,2],[330,108],[129,2],[253,2],[214,109],[215,110],[216,110],[217,111],[176,2],[173,112],[175,112],[174,112],[172,112],[182,113],[177,114],[181,2],[178,2],[180,2],[179,2],[168,112],[169,112],[170,112],[166,2],[167,2],[171,112],[254,2],[258,115],[260,116],[259,115],[257,117],[261,118],[256,119],[255,2],[56,2],[63,120],[58,121],[59,122],[60,122],[61,123],[62,123],[57,124],[8,2],[10,2],[9,2],[2,2],[11,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[3,2],[4,2],[22,2],[19,2],[20,2],[21,2],[23,2],[24,2],[25,2],[5,2],[26,2],[27,2],[28,2],[29,2],[6,2],[30,2],[31,2],[32,2],[33,2],[7,2],[34,2],[39,2],[40,2],[35,2],[36,2],[37,2],[38,2],[1,2],[41,2],[55,2],[185,125],[184,126],[183,127],[186,128],[188,129],[196,130],[195,131],[187,2],[191,132],[213,133],[211,134],[212,135],[210,136],[236,156],[228,157],[229,158],[234,159],[231,160],[233,161],[230,158],[232,158],[235,159],[237,138],[203,145],[204,146],[205,146],[206,2],[207,146],[209,147],[208,146],[220,148],[201,2],[219,149],[221,149],[222,150],[218,151],[223,152],[224,153],[225,154],[226,155],[46,2],[47,2],[48,2],[49,2],[50,2],[51,2],[42,2],[52,2],[53,2],[54,2],[43,2],[44,2],[45,2]],"semanticDiagnosticsPerFile":[240,238,144,127,146,128,145,150,151,147,153,148,152,149,135,132,139,133,130,138,143,140,141,142,137,134,131,136,189,202,198,199,200,197,64,65,67,68,69,70,71,72,73,66,165,74,154,157,158,159,160,161,162,163,164,192,194,193,243,239,241,242,190,156,244,245,248,246,249,250,251,252,263,262,247,264,266,267,265,268,269,270,271,272,273,274,275,276,277,278,155,75,76,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,77,125,93,94,95,126,96,97,98,99,100,101,102,103,104,105,106,107,109,108,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,279,280,281,282,284,283,285,310,311,286,289,308,309,299,298,296,291,304,302,306,290,303,307,292,293,305,287,294,295,297,301,312,300,288,325,324,319,321,320,313,314,316,318,322,323,315,317,327,326,328,227,329,330,129,253,214,215,216,217,176,173,175,174,172,182,177,181,178,180,179,168,169,170,166,167,171,254,258,260,259,257,261,256,255,56,63,58,59,60,61,62,57,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,34,39,40,35,36,37,38,1,41,55,185,184,183,186,188,196,195,187,191,213,211,212,210,236,228,229,234,231,233,230,232,235,237,203,204,205,206,207,209,208,220,201,219,221,222,218,223,224,225,226,46,47,48,49,50,51,42,52,53,54,43,44,45],"latestChangedDtsFile":"./types/index.d.ts"},"version":"4.8.4"} +\ No newline at end of file ++{"program":{"fileNames":["../../../node_modules/typescript/lib/lib.es5.d.ts","../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../node_modules/typescript/lib/lib.dom.d.ts","../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../types/eth-ens-namehash.d.ts","../../../types/ethereum-ens-network-map.d.ts","../../../types/global.d.ts","../../../types/single-call-balance-checker-abi.d.ts","../../../types/@metamask/contract-metadata.d.ts","../../../types/@metamask/eth-hd-keyring.d.ts","../../../types/@metamask/eth-simple-keyring.d.ts","../../../types/@metamask/ethjs-provider-http.d.ts","../../../types/@metamask/ethjs-unit.d.ts","../../../types/@metamask/metamask-eth-abis.d.ts","../../../types/eth-json-rpc-infura/src/createprovider.d.ts","../../../types/eth-phishing-detect/src/config.json.d.ts","../../../types/eth-phishing-detect/src/detector.d.ts","../../base-controller/dist/types/basecontrollerv1.d.ts","../../../node_modules/superstruct/dist/error.d.ts","../../../node_modules/superstruct/dist/utils.d.ts","../../../node_modules/superstruct/dist/struct.d.ts","../../../node_modules/superstruct/dist/structs/coercions.d.ts","../../../node_modules/superstruct/dist/structs/refinements.d.ts","../../../node_modules/superstruct/dist/structs/types.d.ts","../../../node_modules/superstruct/dist/structs/utilities.d.ts","../../../node_modules/superstruct/dist/index.d.ts","../../../node_modules/@metamask/utils/dist/types/assert.d.ts","../../../node_modules/@metamask/utils/dist/types/base64.d.ts","../../../node_modules/@metamask/utils/dist/types/hex.d.ts","../../../node_modules/@metamask/utils/dist/types/bytes.d.ts","../../../node_modules/@metamask/utils/dist/types/caip-types.d.ts","../../../node_modules/@metamask/utils/dist/types/checksum.d.ts","../../../node_modules/@metamask/utils/dist/types/coercers.d.ts","../../../node_modules/@metamask/utils/dist/types/collections.d.ts","../../../node_modules/@metamask/utils/dist/types/encryption-types.d.ts","../../../node_modules/@metamask/utils/dist/types/errors.d.ts","../../../node_modules/@metamask/utils/dist/types/json.d.ts","../../../node_modules/@types/node/ts4.8/assert.d.ts","../../../node_modules/@types/node/ts4.8/assert/strict.d.ts","../../../node_modules/@types/node/ts4.8/globals.d.ts","../../../node_modules/@types/node/ts4.8/async_hooks.d.ts","../../../node_modules/@types/node/ts4.8/buffer.d.ts","../../../node_modules/@types/node/ts4.8/child_process.d.ts","../../../node_modules/@types/node/ts4.8/cluster.d.ts","../../../node_modules/@types/node/ts4.8/console.d.ts","../../../node_modules/@types/node/ts4.8/constants.d.ts","../../../node_modules/@types/node/ts4.8/crypto.d.ts","../../../node_modules/@types/node/ts4.8/dgram.d.ts","../../../node_modules/@types/node/ts4.8/diagnostics_channel.d.ts","../../../node_modules/@types/node/ts4.8/dns.d.ts","../../../node_modules/@types/node/ts4.8/dns/promises.d.ts","../../../node_modules/@types/node/ts4.8/domain.d.ts","../../../node_modules/@types/node/ts4.8/events.d.ts","../../../node_modules/@types/node/ts4.8/fs.d.ts","../../../node_modules/@types/node/ts4.8/fs/promises.d.ts","../../../node_modules/@types/node/ts4.8/http.d.ts","../../../node_modules/@types/node/ts4.8/http2.d.ts","../../../node_modules/@types/node/ts4.8/https.d.ts","../../../node_modules/@types/node/ts4.8/inspector.d.ts","../../../node_modules/@types/node/ts4.8/module.d.ts","../../../node_modules/@types/node/ts4.8/net.d.ts","../../../node_modules/@types/node/ts4.8/os.d.ts","../../../node_modules/@types/node/ts4.8/path.d.ts","../../../node_modules/@types/node/ts4.8/perf_hooks.d.ts","../../../node_modules/@types/node/ts4.8/process.d.ts","../../../node_modules/@types/node/ts4.8/punycode.d.ts","../../../node_modules/@types/node/ts4.8/querystring.d.ts","../../../node_modules/@types/node/ts4.8/readline.d.ts","../../../node_modules/@types/node/ts4.8/repl.d.ts","../../../node_modules/@types/node/ts4.8/stream.d.ts","../../../node_modules/@types/node/ts4.8/stream/promises.d.ts","../../../node_modules/@types/node/ts4.8/stream/consumers.d.ts","../../../node_modules/@types/node/ts4.8/stream/web.d.ts","../../../node_modules/@types/node/ts4.8/string_decoder.d.ts","../../../node_modules/@types/node/ts4.8/test.d.ts","../../../node_modules/@types/node/ts4.8/timers.d.ts","../../../node_modules/@types/node/ts4.8/timers/promises.d.ts","../../../node_modules/@types/node/ts4.8/tls.d.ts","../../../node_modules/@types/node/ts4.8/trace_events.d.ts","../../../node_modules/@types/node/ts4.8/tty.d.ts","../../../node_modules/@types/node/ts4.8/url.d.ts","../../../node_modules/@types/node/ts4.8/util.d.ts","../../../node_modules/@types/node/ts4.8/v8.d.ts","../../../node_modules/@types/node/ts4.8/vm.d.ts","../../../node_modules/@types/node/ts4.8/wasi.d.ts","../../../node_modules/@types/node/ts4.8/worker_threads.d.ts","../../../node_modules/@types/node/ts4.8/zlib.d.ts","../../../node_modules/@types/node/ts4.8/globals.global.d.ts","../../../node_modules/@types/node/ts4.8/index.d.ts","../../../node_modules/@ethereumjs/common/dist/enums.d.ts","../../../node_modules/@ethereumjs/common/dist/types.d.ts","../../../node_modules/buffer/index.d.ts","../../../node_modules/@ethereumjs/util/dist/constants.d.ts","../../../node_modules/@ethereumjs/util/dist/units.d.ts","../../../node_modules/@ethereumjs/util/dist/address.d.ts","../../../node_modules/@ethereumjs/util/dist/bytes.d.ts","../../../node_modules/@ethereumjs/util/dist/types.d.ts","../../../node_modules/@ethereumjs/util/dist/account.d.ts","../../../node_modules/@ethereumjs/util/dist/withdrawal.d.ts","../../../node_modules/@ethereumjs/util/dist/signature.d.ts","../../../node_modules/@ethereumjs/util/dist/encoding.d.ts","../../../node_modules/@ethereumjs/util/dist/asynceventemitter.d.ts","../../../node_modules/@ethereumjs/util/dist/internal.d.ts","../../../node_modules/@ethereumjs/util/dist/lock.d.ts","../../../node_modules/@ethereumjs/util/dist/provider.d.ts","../../../node_modules/@ethereumjs/util/dist/index.d.ts","../../../node_modules/@ethereumjs/common/dist/common.d.ts","../../../node_modules/@ethereumjs/common/dist/utils.d.ts","../../../node_modules/@ethereumjs/common/dist/index.d.ts","../../../node_modules/@ethereumjs/tx/dist/eip2930transaction.d.ts","../../../node_modules/@ethereumjs/tx/dist/legacytransaction.d.ts","../../../node_modules/@ethereumjs/tx/dist/types.d.ts","../../../node_modules/@ethereumjs/tx/dist/basetransaction.d.ts","../../../node_modules/@ethereumjs/tx/dist/eip1559transaction.d.ts","../../../node_modules/@ethereumjs/tx/dist/transactionfactory.d.ts","../../../node_modules/@ethereumjs/tx/dist/index.d.ts","../../../node_modules/@metamask/utils/dist/types/keyring.d.ts","../../../node_modules/@types/ms/index.d.ts","../../../node_modules/@types/debug/index.d.ts","../../../node_modules/@metamask/utils/dist/types/logging.d.ts","../../../node_modules/@metamask/utils/dist/types/misc.d.ts","../../../node_modules/@metamask/utils/dist/types/number.d.ts","../../../node_modules/@metamask/utils/dist/types/opaque.d.ts","../../../node_modules/@metamask/utils/dist/types/promise.d.ts","../../../node_modules/@metamask/utils/dist/types/time.d.ts","../../../node_modules/@metamask/utils/dist/types/transaction-types.d.ts","../../../node_modules/@metamask/utils/dist/types/versions.d.ts","../../../node_modules/@metamask/utils/dist/types/index.d.ts","../../../node_modules/immer/dist/utils/env.d.ts","../../../node_modules/immer/dist/utils/errors.d.ts","../../../node_modules/immer/dist/types/types-external.d.ts","../../../node_modules/immer/dist/types/types-internal.d.ts","../../../node_modules/immer/dist/utils/common.d.ts","../../../node_modules/immer/dist/utils/plugins.d.ts","../../../node_modules/immer/dist/core/scope.d.ts","../../../node_modules/immer/dist/core/finalize.d.ts","../../../node_modules/immer/dist/core/proxy.d.ts","../../../node_modules/immer/dist/core/immerclass.d.ts","../../../node_modules/immer/dist/core/current.d.ts","../../../node_modules/immer/dist/internal.d.ts","../../../node_modules/immer/dist/plugins/es5.d.ts","../../../node_modules/immer/dist/plugins/patches.d.ts","../../../node_modules/immer/dist/plugins/mapset.d.ts","../../../node_modules/immer/dist/plugins/all.d.ts","../../../node_modules/immer/dist/immer.d.ts","../../base-controller/dist/types/restrictedcontrollermessenger.d.ts","../../base-controller/dist/types/controllermessenger.d.ts","../../base-controller/dist/types/basecontrollerv2.d.ts","../../base-controller/dist/types/index.d.ts","../../controller-utils/dist/types/types.d.ts","../../controller-utils/dist/types/constants.d.ts","../../../node_modules/@metamask/eth-query/index.d.ts","../../../node_modules/@types/bn.js/index.d.ts","../../controller-utils/dist/types/util.d.ts","../../../node_modules/@spruceid/siwe-parser/dist/abnf.d.ts","../../../node_modules/@spruceid/siwe-parser/dist/regex.d.ts","../../../node_modules/@spruceid/siwe-parser/dist/parsers.d.ts","../../controller-utils/dist/types/siwe.d.ts","../../controller-utils/dist/types/index.d.ts","../../../node_modules/@metamask/swappable-obj-proxy/dist/types.d.ts","../../../node_modules/@metamask/swappable-obj-proxy/dist/createeventemitterproxy.d.ts","../../../node_modules/@metamask/swappable-obj-proxy/dist/createswappableproxy.d.ts","../../../node_modules/@metamask/swappable-obj-proxy/dist/index.d.ts","../../network-controller/dist/types/constants.d.ts","../../../node_modules/@metamask/safe-event-emitter/index.d.ts","../../json-rpc-engine/dist/types/jsonrpcengine.d.ts","../../json-rpc-engine/dist/types/createasyncmiddleware.d.ts","../../json-rpc-engine/dist/types/createscaffoldmiddleware.d.ts","../../json-rpc-engine/dist/types/getuniqueid.d.ts","../../json-rpc-engine/dist/types/idremapmiddleware.d.ts","../../json-rpc-engine/dist/types/mergemiddleware.d.ts","../../json-rpc-engine/dist/types/index.d.ts","../../eth-json-rpc-provider/dist/types/safe-event-emitter-provider.d.ts","../../eth-json-rpc-provider/dist/types/provider-from-engine.d.ts","../../eth-json-rpc-provider/dist/types/provider-from-middleware.d.ts","../../eth-json-rpc-provider/dist/types/index.d.ts","../../../node_modules/eth-block-tracker/dist/blocktracker.d.ts","../../../node_modules/eth-block-tracker/dist/pollingblocktracker.d.ts","../../../node_modules/eth-block-tracker/dist/subscribeblocktracker.d.ts","../../../node_modules/eth-block-tracker/dist/index.d.ts","../../network-controller/dist/types/types.d.ts","../../network-controller/dist/types/create-auto-managed-network-client.d.ts","../../network-controller/dist/types/networkcontroller.d.ts","../../network-controller/dist/types/create-network-client.d.ts","../../network-controller/dist/types/index.d.ts","../../polling-controller/dist/types/abstractpollingcontroller.d.ts","../../polling-controller/dist/types/blocktrackerpollingcontroller.d.ts","../../polling-controller/dist/types/staticintervalpollingcontroller.d.ts","../../polling-controller/dist/types/index.d.ts","../../../node_modules/@types/uuid/index.d.ts","../src/determinegasfeecalculations.ts","../src/fetchblockfeehistory.ts","../src/fetchgasestimatesviaethfeehistory/medianof.ts","../src/fetchgasestimatesviaethfeehistory/calculategasfeeestimatesforprioritylevels.ts","../src/fetchgasestimatesviaethfeehistory/types.ts","../src/fetchgasestimatesviaethfeehistory/fetchlatestblock.ts","../src/fetchgasestimatesviaethfeehistory.ts","../src/gas-util.ts","../src/gasfeecontroller.ts","../src/index.ts","../../../node_modules/@babel/types/lib/index.d.ts","../../../node_modules/@types/babel__generator/index.d.ts","../../../node_modules/@babel/parser/typings/babel-parser.d.ts","../../../node_modules/@types/babel__template/index.d.ts","../../../node_modules/@types/babel__traverse/index.d.ts","../../../node_modules/@types/babel__core/index.d.ts","../../../node_modules/@types/deep-freeze-strict/index.d.ts","../../../node_modules/@types/eslint/helpers.d.ts","../../../node_modules/@types/estree/index.d.ts","../../../node_modules/@types/json-schema/index.d.ts","../../../node_modules/@types/eslint/index.d.ts","../../../node_modules/@types/graceful-fs/index.d.ts","../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../node_modules/@types/istanbul-reports/index.d.ts","../../../node_modules/chalk/index.d.ts","../../../node_modules/jest-diff/build/cleanupsemantic.d.ts","../../../node_modules/pretty-format/build/types.d.ts","../../../node_modules/pretty-format/build/index.d.ts","../../../node_modules/jest-diff/build/types.d.ts","../../../node_modules/jest-diff/build/difflines.d.ts","../../../node_modules/jest-diff/build/printdiffs.d.ts","../../../node_modules/jest-diff/build/index.d.ts","../../../node_modules/jest-matcher-utils/build/index.d.ts","../../../node_modules/@types/jest/index.d.ts","../../../node_modules/@types/jest-when/index.d.ts","../../../node_modules/@types/json5/index.d.ts","../../../node_modules/@types/lodash/common/common.d.ts","../../../node_modules/@types/lodash/common/array.d.ts","../../../node_modules/@types/lodash/common/collection.d.ts","../../../node_modules/@types/lodash/common/date.d.ts","../../../node_modules/@types/lodash/common/function.d.ts","../../../node_modules/@types/lodash/common/lang.d.ts","../../../node_modules/@types/lodash/common/math.d.ts","../../../node_modules/@types/lodash/common/number.d.ts","../../../node_modules/@types/lodash/common/object.d.ts","../../../node_modules/@types/lodash/common/seq.d.ts","../../../node_modules/@types/lodash/common/string.d.ts","../../../node_modules/@types/lodash/common/util.d.ts","../../../node_modules/@types/lodash/index.d.ts","../../../node_modules/@types/minimatch/index.d.ts","../../../node_modules/@types/parse-json/index.d.ts","../../../node_modules/@types/pbkdf2/index.d.ts","../../../node_modules/@types/prettier/index.d.ts","../../../node_modules/@types/punycode/index.d.ts","../../../node_modules/@types/readable-stream/node_modules/safe-buffer/index.d.ts","../../../node_modules/@types/readable-stream/index.d.ts","../../../node_modules/@types/secp256k1/index.d.ts","../../../node_modules/@types/semver/classes/semver.d.ts","../../../node_modules/@types/semver/functions/parse.d.ts","../../../node_modules/@types/semver/functions/valid.d.ts","../../../node_modules/@types/semver/functions/clean.d.ts","../../../node_modules/@types/semver/functions/inc.d.ts","../../../node_modules/@types/semver/functions/diff.d.ts","../../../node_modules/@types/semver/functions/major.d.ts","../../../node_modules/@types/semver/functions/minor.d.ts","../../../node_modules/@types/semver/functions/patch.d.ts","../../../node_modules/@types/semver/functions/prerelease.d.ts","../../../node_modules/@types/semver/functions/compare.d.ts","../../../node_modules/@types/semver/functions/rcompare.d.ts","../../../node_modules/@types/semver/functions/compare-loose.d.ts","../../../node_modules/@types/semver/functions/compare-build.d.ts","../../../node_modules/@types/semver/functions/sort.d.ts","../../../node_modules/@types/semver/functions/rsort.d.ts","../../../node_modules/@types/semver/functions/gt.d.ts","../../../node_modules/@types/semver/functions/lt.d.ts","../../../node_modules/@types/semver/functions/eq.d.ts","../../../node_modules/@types/semver/functions/neq.d.ts","../../../node_modules/@types/semver/functions/gte.d.ts","../../../node_modules/@types/semver/functions/lte.d.ts","../../../node_modules/@types/semver/functions/cmp.d.ts","../../../node_modules/@types/semver/functions/coerce.d.ts","../../../node_modules/@types/semver/classes/comparator.d.ts","../../../node_modules/@types/semver/classes/range.d.ts","../../../node_modules/@types/semver/functions/satisfies.d.ts","../../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../../node_modules/@types/semver/ranges/min-version.d.ts","../../../node_modules/@types/semver/ranges/valid.d.ts","../../../node_modules/@types/semver/ranges/outside.d.ts","../../../node_modules/@types/semver/ranges/gtr.d.ts","../../../node_modules/@types/semver/ranges/ltr.d.ts","../../../node_modules/@types/semver/ranges/intersects.d.ts","../../../node_modules/@types/semver/ranges/simplify.d.ts","../../../node_modules/@types/semver/ranges/subset.d.ts","../../../node_modules/@types/semver/internals/identifiers.d.ts","../../../node_modules/@types/semver/index.d.ts","../../../node_modules/@types/sinonjs__fake-timers/index.d.ts","../../../node_modules/@types/sinon/index.d.ts","../../../node_modules/@types/stack-utils/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts"],"fileInfos":[{"version":"f20c05dbfe50a208301d2a1da37b9931bce0466eb5a1f4fe240971b4ecc82b67","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"9b087de7268e4efc5f215347a62656663933d63c0b1d7b624913240367b999ea","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"0d5f52b3174bee6edb81260ebcd792692c32c81fd55499d69531496f3f2b25e7","affectsGlobalScope":true},{"version":"55f400eec64d17e888e278f4def2f254b41b89515d3b88ad75d5e05f019daddd","affectsGlobalScope":true},{"version":"181f1784c6c10b751631b24ce60c7f78b20665db4550b335be179217bacc0d5f","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"75ec0bdd727d887f1b79ed6619412ea72ba3c81d92d0787ccb64bab18d261f14","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"775d9c9fd150d5de79e0450f35bc8b8f94ae64e3eb5da12725ff2a649dccc777","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"70bbfaec021ac4a0c805374225b55d70887f987df8b8dd7711d79464bb7b4385","869089d60b67219f63e6aca810284c89bae1b384b5cbc7ce64e53d82ad223ed5",{"version":"18338b6a4b920ec7d49b4ffafcbf0fa8a86b4bfd432966efd722dab611157cf4","affectsGlobalScope":true},"62a0875a0397b35a2364f1d401c0ce17975dfa4d47bf6844de858ae04da349f9","ee7491d0318d1fafcba97d5b72b450eb52671570f7a4ecd9e8898d40eaae9472","e3e7d217d89b380c1f34395eadc9289542851b0f0a64007dfe1fb7cf7423d24e","fd79909e93b4d50fd0ed9f3d39ddf8ba0653290bac25c295aac49f6befbd081b","345a9cc2945406f53051cd0e9b51f82e1e53929848eab046fdda91ee8aa7da31","9debe2de883da37a914e5e784a7be54c201b8f1d783822ad6f443ff409a5ea21","dee5d5c5440cda1f3668f11809a5503c30db0476ad117dd450f7ba5a45300e8f","f5e396c1424c391078c866d6f84afe0b4d2f7f85a160b9c756cd63b5b1775d93","5caa6f4fff16066d377d4e254f6c34c16540da3809cd66cd626a303bc33c419f","730d055528bdf12c8524870bb33d237991be9084c57634e56e5d8075f6605e02","869b0f507115c42896d917642f821752e8a84827bfe9ed74c23d76fb0c64c681","e475453e7140e95542332943d3052fe4c7430ad1efce42b3e9157f1fee8cbc5f","ebfdf904255ce746c9d30117c2edef355fb19bf7650478d2405f39f0e4f302e6","f3f63b48addb8e2ea9d20bb671c3c306413b3daa39996d0ae52f63d8e32158e1","a50599c08934a62f11657bdbe0dc929ab66da1b1f09974408fd9a33ec1bb8060","5a20e7d6c630b91be15e9b837853173829d00273197481dc8d3e94df61105a71","8d478048d71cc16f806d4b71b252ecb67c7444ccf4f4b09b29a312712184f859","b4000a0a525fa921e896cbdb32ae802c9684f0fd371b5fc69e7310f7918cc2c3","9df4662ca3dbc2522bc115833ee04faa1afbb4e249a85ef4a0a09c621346bd08","b25d9065cf1c1f537a140bbc508e953ed2262f77134574c432d206ff36f4bdbf","1b103313097041aa9cd705a682c652f08613cb5cf8663321061c0902f845e81c","68ccec8662818911d8a12b8ed028bc5729fb4f1d34793c4701265ba60bc73cf4","5f85b8b79dc4d36af672c035b2beb71545de63a5d60bccbeee64c260941672ab","affb9dc7079c3a3522e046c5dc1325950a843b1ebd7dc0f0386aeb2397b9f0db","40fe4b689225816b31fe5794c0fbf3534568819709e40295ead998a2bc1ab237","f65b5e33b9ad545a1eebbd6afe857314725ad42aaf069913e33f928ab3e4990a","fb6f2a87beb7fb1f4c2b762d0c76a9459fc91f557231569b0ee21399e22aa13d","31c858dc85996fac4b7fa944e1016d5c72f514930a72357ab5001097bf6511c7","3de30a871b3340be8b679c52aa12f90dd1c8c60874517be58968fdbcc4d79445","6fd985bd31eaf77542625306fb0404d32bff978990f0a06428e5f0b9a3b58109","34693fb4a5e771e11668219221344dd1bd7d8b77ed005a1c1d965fb559be8406","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419",{"version":"8c61d5fc50490af59daf69c4e601cc76de260ee5b2ff057d608a78d6acb0b61a","affectsGlobalScope":true},"f51b4042a3ac86f1f707500a9768f88d0b0c1fc3f3e45a73333283dea720cdc6",{"version":"a7289d79eb84a59d2475b4d0136b4404be3cfdd17c3ea46b9194add1d645df01","affectsGlobalScope":true},"0bb26fa2a90ee890eed57ee812c71fa84d3d07850163ec4a204de86412cc57c1","132ca47da601c60141dd6f10bd08c70d0620177e5638439df2464ec3945b6d98",{"version":"55d2bbae076fed7269c3e16faeb32f988f558427b7a1c3bf04aa7551ab86ae90","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","543c6e3a2353e9ad08b4090e1fb88a95cefb756d0d173b6ec045d7dc70a79964","3a41ebe7f089d50f447466b35b6cabb8b584c0994fc9809d0cd0a4ebc41e1239","f5350b93f10178838c23b3a81f3791d839bc44d1a2a89edb60069250fab90899","aa07f7230bcc5733919c941753d067cb8816dcad6651edb815cb302ae8ddd931","649ba4638a25c54a18dffe37367c6b7848a0bca53fa42fbbd7300b0c61aa861c","5f20d20b7607174caf1a6da9141aeb9f2142159ae2410ca30c7a0fccd1d19c99",{"version":"a34d65f61ec5aac5b53502c8b0bd4e00d217bccb95bf94d449e2571baa11fb8c","affectsGlobalScope":true},"8d42e5af5fb0a96a77e135ce84cc60636c9bad39d9dba043a4efe9d1bdeb3cc3","56fcc451e9065eb121c9cc4c1b9994a816306f3b0b3b1fce7ad59f0ac97a9999","d4a13a5a2e6df8ef02a84ac6fd5bad4a1ec54fdef47f33250da386ea6d5c1864","c3759b5bc5cc40f5988d86a497741a80fa91258629ae50a2b3735e774cd377cc","bf268a0aea37ad4ae3b7a9b58559190b6fc01ea16a31e35cd05817a0a60f895a","45dd82fb5aea9b12b2a90b427b28f3a014e8b2ee9b74087a5ab882841cb5fbc5",{"version":"d7dad6db394a3d9f7b49755e4b610fbf8ed6eb0c9810ae5f1a119f6b5d76de45","affectsGlobalScope":true},"48b2f9302651eb31acd5be69bb4e6b35797a7fcd6b77391d10a4ccadf7dc3609","605bed8af3052e790865a35e3d538a5447764a4ff01989c0f6b084a96f40e1cb","dd67d2b5e4e8a182a38de8e69fb736945eaa4588e0909c14e01a14bd3cc1fd1e",{"version":"2db274de1088f268805043df72e21258eae845e6418dada65331d2898998f330","affectsGlobalScope":true},{"version":"2923dee3c897f03e91b54a210cdbefea7290562f0ac4b948667d4c9ee844b79e","affectsGlobalScope":true},"79169698d09a2be54b14f3bcad2575b414bf3525063fde0a1e4fcd5d6efd380e","051d939bcf77caa3cef3282708ab3a6fdfb741a7366e1d74a9e7603b67417ec3","0be79b3ff0f16b6c2f9bc8c4cc7097ea417d8d67f8267f7e1eec8e32b548c2ff","1c61ffa3a71b77363b30d19832c269ef62fba787f5610cac7254728d3b69ab2e","f6877afc4b9d0b72e15378b187492a6547e48783980e9ff1301163b7b1c15b2e","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","09ed02a725db002693236b6dfc49b2c6eb5557be1421d7fbe4f07cfe38211d92","09d801ff4a303d4976d4b9cb94af3a9097c4a70345e662d176975872d2998e51","c8558b01389b5f7610ac293aa612ccea2ae64d83af43b49f8142f190be1f414c","c40fdf7b2e18df49ce0568e37f0292c12807a0748be79e272745e7216bed2606",{"version":"b10b426c56e220b5093bf8a2446ee47af47263b7b1a03f4b18e42326b231b111","affectsGlobalScope":true},"4e228e78c1e9b0a75c70588d59288f63a6258e8b1fe4a67b0c53fe03461421d9","b4635ef36bee17e1304337d591c3b6b461ecdbc1876d0effbe6a581e62201fe5","205d50c24359ead003dc537b9b65d2a64208dfdffe368f403cf9e0357831db9e","1265fddcd0c68be9d2a3b29805d0280484c961264dd95e0b675f7bd91f777e78",{"version":"e4507242542bd499238f693d88b2d32e22177cc508854625f87bcc9bc3fa1256","affectsGlobalScope":true},{"version":"d942354e4966a98d3a92d1b1af0b4ac06f33af3f88116743e2c304c027ca26ef","affectsGlobalScope":true},"39f0808e5be3cb38674726c21fe2eb453c55e48a901679b4ce30fef85549b892","6afd66a7432ef100027ea110449e874196381e019e30eda7e7d8ca390366b7a8","befb8a9a78ac99d8fbc3ed392810489a7b90760c7a58934e8f1c8538f581cff3","e670bdf01540d35c170fae68edfd2f288eff909936780c379d6a9103b787b22c","867f95abf1df444aab146b19847391fc2f922a55f6a970a27ed8226766cee29f",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"e3685a8957b4e2af64c3f04a58289ee0858a649dbcd963a2b897fe85858ae18a","175323e2a79a6076e0bada8a390d535a3ea817158bf1b1f46e31efca9028a0a2","7a10053aadc19335532a4d02756db4865974fd69bea5439ddcc5bfdf062d9476","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","aed9e712a9b168345362e8f3a949f16c99ca1e05d21328f05735dfdbb24414ef","b04fe6922ed3db93afdbd49cdda8576aa75f744592fceea96fb0d5f32158c4f5","ed8d6c8de90fc2a4faaebc28e91f2469928738efd5208fb75ade0fa607e892b7","d7c52b198d680fe65b1a8d1b001f0173ffa2536ca2e7082431d726ce1f6714cd","c07f251e1c4e415a838e5498380b55cfea94f3513229de292d2aa85ae52fc3e9","0ed401424892d6bf294a5374efe512d6951b54a71e5dd0290c55b6d0d915f6f7","b945be6da6a3616ef3a250bfe223362b1c7c6872e775b0c4d82a1bf7a28ff902","beea49237dd7c7110fabf3c7509919c9cb9da841d847c53cac162dc3479e2f87","0f45f8a529c450d8f394106cc622bff79e44a1716e1ac9c3cc68b43f7ecf65ee","c624ce90b04c27ce4f318ba6330d39bde3d4e306f0f497ce78d4bda5ab8e22ca","9b8253aa5cb2c82d505f72afdbf96e83b15cc6b9a6f4fadbbbab46210d5f1977","86a8f52e4b1ac49155e889376bcfa8528a634c90c27fec65aa0e949f77b740c5","aab5dd41c1e2316cc0b42a7dd15684f8582d5a1d16c0516276a2a8a7d0fecd9c","59948226626ee210045296ba1fc6cb0fe748d1ff613204e08e7157ab6862dee7","ec3e54d8b713c170fdc8110a7e4a6a97513a7ab6b05ac9e1100cb064d2bb7349","43beb30ecb39a603fde4376554887310b0699f25f7f39c5c91e3147b51bb3a26","666b77d7f06f49da114b090a399abbfa66d5b6c01a3fd9dc4f063a52ace28507","31997714a93fbc570f52d47d6a8ebfb021a34a68ea9ba58bbb69cdec9565657e","6032e4262822160128e644de3fc4410bcd7517c2f137525fd2623d2bb23cb0d3","8bd5c9b1016629c144fd228983395b9dbf0676a576716bc3d316cab612c33cd5","2ed90bd3925b23aed8f859ffd0e885250be0424ca2b57e9866dabef152e1d6b7","93f6bd17d92dab9db7897e1430a5aeaa03bcf51623156213d8397710367a76ce","3f62b770a42e8c47c7008726f95aa383e69d97e85e680d237b99fcb0ee601dd8","5b84cfe78028c35c3bb89c042f18bf08d09da11e82d275c378ae4d07d8477e6c","980d21b0081cbf81774083b1e3a46f4bbdcd2b68858df0f66d7fad9c82bc34bc","6a9c5127096b35264eb7cd21b2417bfc1d42cceca9ba4ce2bb0c3410b7816042","93b7325b49dfbf613d940ed0e471216657b2d77459dac34f1b5b1678f08f884c","b17f3bb7d8333479c7e45e5f3d876761b9bca58f97594eca3f6a944fd825e632","3c1f1236cce6d6e0c4e2c1b4371e6f72d7c14842ecd76a98ed0748ee5730c8f3","6d7f58d5ea72d7834946fd7104a734dc7d40661be8b2e1eaced1ddce3268ebaf","4c26222991e6c97d5a8f541d4f2c67585eda9e8b33cf9f52931b098045236e88","3140d587067e55ce4028275cf71b40a3fd431863ad148efc3106af84a0794cf9","47383b45796d525a4039cd22d2840ac55a1ff03a43d027f7f867ba7314a9cf53","6548773b3abbc18de29176c2141f766d4e437e40596ee480447abf83575445ad","6ddd27af0436ce59dd4c1896e2bfdb2bdb2529847d078b83ce67a144dff05491","816264799aef3fd5a09a3b6c25217d5ec26a9dfc7465eac7d6073bcdc7d88f3f","4df0891b133884cd9ed752d31c7d0ec0a09234e9ed5394abffd3c660761598db","b603b62d3dcd31ef757dc7339b4fa8acdbca318b0fb9ac485f9a1351955615f9","e642bd47b75ad6b53cbf0dfd7ddfa0f120bd10193f0c58ec37d87b59bf604aca","be90b24d2ee6f875ce3aaa482e7c41a54278856b03d04212681c4032df62baf9","78f5ff400b3cb37e7b90eef1ff311253ed31c8cb66505e9828fad099bffde021","372c47090e1131305d163469a895ff2938f33fa73aad988df31cd31743f9efb6","71c67dc6987bdbd5599353f90009ff825dd7db0450ef9a0aee5bb0c574d18512","6f12403b5eca6ae7ca8e3efe3eeb9c683b06ce3e3844ccfd04098d83cd7e4957","282c535df88175d64d9df4550d2fd1176fd940c1c6822f1e7584003237f179d3","c3a4752cf103e4c6034d5bd449c8f9d5e7b352d22a5f8f9a41a8efb11646f9c2","11a9e38611ac3c77c74240c58b6bd64a0032128b29354e999650f1de1e034b1c","4ed103ca6fff9cb244f7c4b86d1eb28ce8069c32db720784329946731badb5bb","d738f282842970e058672663311c6875482ee36607c88b98ffb6604fba99cb2a","ec859cd8226aa623e41bbb47c249a55ee16dc1b8647359585244d57d3a5ed0c7","8891c6e959d253a66434ff5dc9ae46058fb3493e84b4ca39f710ef2d350656b1","c4463cf02535444dcbc3e67ecd29f1972490f74e49957d6fd4282a1013796ba6","0cb0a957ff02de0b25fd0f3f37130ca7f22d1e0dea256569c714c1f73c6791f8","2f5075dc512d51786b1ba3b1696565641dfaae3ac854f5f13d61fa12ef81a47e","55fcfa6909a227963d5ad3d59ea9f99480106ebd9c69d87fce8a66f8f66e23c3","7f03c7ae3f6cedb6d9261d31d0fb518d940fb2f1b8d2b02b306c6d4b7e1bc8aa","45351e0d51780b6f4088277a4457b9879506ee2720a887de232df0f1efcb33d8","b59e5a5f93b7bbf729cacd0bc86106498e58f07114868350265a3de3598312c7","7c1b05262a4623e5d2a5832433582e0d6b453a3db8aa799b98f38d105812296f","6ee58aa536dabb19b09bc036f1abe83feb51e13d63b23d30b2d0631a2de99b8f","8aceb205dcc6f814ad99635baf1e40b6e01d06d3fe27b72fd766c6d0b8c0c600","530fb1c53338ac6618f8b8c4aa30acf89a9fe13b2bf92184ad966c824350d827","c1e87ae9c6982a1628be91d9f3a52ec5a73ed1a6d42e4e8119bf96c453b14cc0","161a4d1342b99b095a9531e65ba773ab33df0d906d7ae9f4f39180320fe23237","722cf9592e0d42cb903e40aa725f3e8e7cde91271f6be8c318bfbd7e337ff886","6a6aaf58d8ccff1409f921c37d0eb6cec3113df483c485385af3d90414e8eb07","ac9b69620b356f5bcfbc17d6a2a0591354eade1c5febb05cb1079b30ea0094c6","8e7adb22c0adecf7464861fc58ae3fc617b41ffbd70c97aa8493dc0966a82273","755f3cd1d9c1b564cff090e3b0e29200ae55690a91b87cb9e7a64c2dbeb314d3","d6bb7e0a6877b7856c183bff13d09dd9ae599ea43c6f6b33d3d5f72a830ed460","f1b51ae93c762d7c43f559933cd4842dd870367e8d92e90704ffa685dd5b29a3","3f450762fd7c34ed545e738abccb0af6a703572a10521643cf8fc88e3724c99c","fcc8beef29f39f09b1d9c9f99c42f9fed605ab1c28d2a630185f732b9ba53763","8b497c8cdd875848164f60712378fb15fbc2d625b67d29285845a51fcca57aff","0be91c7eb27de7e2b84c2caa3f89ac2c314de7e00d142c01b3baa0c88163bba4","0a0658c71cfa72984205a2f33b1e28e5e5fdbce0e4fb88186aed4e5a658065dc","cb047832dc68f5a2c41c62c5e95ddcacbae3a8b034d40cd15319a8cb7f25104a","980336ccdfc3c08f3c3b201aa6662e6016e20f15847f8465b68f3e8e67b4665c","5a3493939995f46ff3d9073cd534fb8961c3bf4e08c71db27066ff03d906dea8","bb5a2ac327605ebebf831c469b05bd34a33a6a46ee8c1edd9f3310aad32cf6a1","bf5d041f2440b4a9391e2b5eb3b8d94cbf1e3b8ff4703b6539d4e65e758c8f37","8516469eb90e723b0eb03df1be098f7e6a4709f6f48fd4532868d20a0a934f6e","d60e9ab369a72d234aac49adbe2900d8ef1408a6ea4db552cf2a48c9d8d6a1bc","0ebb4698803f01e2e7df6acce572fff068f4a20c47221721dafd70a27e372831","a12eaa942232703a8a8477a2f240ad5a2c26c595012ea8f128224e77984099c4","4070c2f1c3434fcf84886e04d30d82cd650ee443e53b82b404b144175cf8741e","2cea9689efa8591732096235abe7f084fc29c92badd5b0897a5e876b77e71887","4ed4e504126014fee13aaef5e3fc140f2ff7031ff3a8b5386717905820ea2d09","b0a1e66ed5a0e5dbcd308bccc2e8ba2aac2e17306a3e6888f74bc450c9806a9e","e09f372cbf6582b5b271ef8de9a896d7785aa353dd5f9c574714dcd41636462a","8e13478e90645f18e32db1e7d82729f9b8adf2cfe9e8bb445e6d0c3f8249aebd","d95e9b84527c1091bbccde1a213d987e3eb3c1ba0de7bfb5ee710f45107b5734","12c89d0e32758c120a569045f21cf5b77244f86792611ced8de7f86b37e77781","ccccd5387e496a2899d50ed492c6120c83b7fdfe5d4fe79c4275a79b3ff7b936","751eff4da87d06979e2a4d1d99a9bc98abf04ed569c5871c97e568a83cfff25e","b121f7725eb885a38942124e6d87ef86d650b5221368f49d0b332695d53d0c34","1ff59fddc2d63283af44fd820daff74947a3282bf11bdfb014098aed1a3a51ac","fab58e600970e66547644a44bc9918e3223aa2cbd9e8763cec004b2cfb48827e",{"version":"e9aa2410e8871df21f0d81fa3afaa114c3092b3bacb25765e3e955697df8cfb8","signature":"7359fe30980ad122c41f840074f7881b195cb703d609a117c8dff7f673c4cf00"},{"version":"a8087c3721ee3a254e604071e4cb70469c142850ea3f3583868a8c05681ce026","signature":"75d8a7ffa7462afb0f4920188068b6b59a1ae85f59b7dad26e8942a7b77ccdda"},{"version":"52df1d99c73edcf21259dca5ba24f1d7643cf3a4014711b47df18e6a02c8cf19","signature":"5d15fe3a984cdba90e92274faeae015371a0ba64d7d443b178e77f701111afe9"},{"version":"9c4834280d7503d03fa8014183f30846170636baab6d264341d2b87d417e418c","signature":"63650a6d250c5f2f5e0e45e99113789dd65481a6605956643f765b0114cc2ce0"},{"version":"4270f9cfd62abd8ff10374a5acec0c2649e1d4f31300fd768c4933a58643dbb5","signature":"798d424b753359c997dcffdfc70e5636749621a687fc1125d444f86a5d22a93e"},{"version":"fd76e840ad3b3f7e9bd6d25b9485dc75a68b210c80f0ee034d4e27775114ba5f","signature":"d18efa93b91f45a1f26b97a23ae82670d8a80a91401f929826c4b5836973801e"},{"version":"b7ece87fafd76aebf93a0b670486851917d4d9ae981486286c231d6e6dc05428","signature":"67590c11008841bf8544396a16000a10b5687394d7caf5d2b5f60f8de9fac20b"},{"version":"15433a2e97dcee760d97f8e56afe908fe932611ef00711aed9b246ba058ce0be","signature":"c5fc52cba80e6ba6fde33b0f9370b8ba6866831070cbc84b20a7c6e9e1163160"},{"version":"6e43bf5325bc6ef67cdfb48f74a77bcf99768c1230067f22c88eb7c1a7cd1784","signature":"c0e1493caaab115c737b9ef6f4d37b7d2962a1bf16a18b602f882c9a0a4b01ef"},"d021f18758b28bda32bdaf0a987e0804cec074a9a4cfab8232ed81d96e75dfae","a5aaeca001d2f69093d04aac4db321e4c338fd9b20cbc4f0b0af3dc6ae0f235b","cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","8041cfce439ff29d339742389de04c136e3029d6b1817f07b2d7fcbfb7534990","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","29a46d003ca3c721e6405f00dee7e3de91b14e09701eba5d887bf76fb2d47d38","069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","9990f9e566bc3c2c6e38df81294fb756e7f5b7b0e5bb17ab75384e190548b4b6",{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"ee7d8894904b465b072be0d2e4b45cf6b887cdba16a467645c4e200982ece7ea","f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","df95e00612c1faa5e0e7ef0dba589b18665bbeb3221db2b6cee1fe4d0e61921f","afe73051ff6a03a9565cbd8ebb0e956ee3df5e913ad5c1ded64218aabfa3dcb5","8b06ac3faeacb8484d84ddb44571d8f410697f98d7bfa86c0fda60373a9f5215","7eb06594824ada538b1d8b48c3925a83e7db792f47a081a62cf3e5c4e23cf0ee","f5638f7c2f12a9a1a57b5c41b3c1ea7db3876c003bab68e6a57afd6bcc169af0","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","462bccdf75fcafc1ae8c30400c9425e1a4681db5d605d1a0edb4f990a54d8094","5923d8facbac6ecf7c84739a5c701a57af94a6f6648d6229a6c768cf28f0f8cb","7adecb2c3238794c378d336a8182d4c3dd2c4fa6fa1785e2797a3db550edea62","dc12dc0e5aa06f4e1a7692149b78f89116af823b9e1f1e4eae140cd3e0e674e6","1bfc6565b90c8771615cd8cfcf9b36efc0275e5e83ac7d9181307e96eb495161","8a8a96898906f065f296665e411f51010b51372fa260d5373bf9f64356703190","7f82ef88bdb67d9a850dd1c7cd2d690f33e0f0acd208e3c9eba086f3670d4f73",{"version":"ccfd8774cd9b929f63ff7dcf657977eb0652e3547f1fcac1b3a1dc5db22d4d58","affectsGlobalScope":true},"d92dc90fecd2552db74d8dc3c6fb4db9145b2aa0efe2c127236ba035969068d4","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","675e702f2032766a91eeadee64f51014c64688525da99dccd8178f0c599f13a8","458111fc89d11d2151277c822dfdc1a28fa5b6b2493cf942e37d4cd0a6ee5f22","19c816167e076e7c24f074389c6cf3ed87bdbb917d1ea439ca281f9d26db2439","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","febf0b2de54781102b00f61653b21377390a048fbf5262718c91860d11ff34a6","98f9d826db9cd99d27a01a59ee5f22863df00ccf1aaf43e1d7db80ebf716f7c3","0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","dcd91d3b697cb650b95db5471189b99815af5db2a1cd28760f91e0b12ede8ed5","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","3cf0d343c2276842a5b617f22ba82af6322c7cfe8bb52238ffc0c491a3c21019","df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9",{"version":"f2eff8704452659641164876c1ef0df4174659ce7311b0665798ea3f556fa9ad","affectsGlobalScope":true},"8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","a73a445c1e0a6d0f8b48e8eb22dc9d647896783a7f8991cbbc31c0d94bf1f5a2","d88a5e779faf033be3d52142a04fbe1cb96009868e3bbdd296b2bc6c59e06c0e","cd1d2f103b79002cd94b85a640a103f094227a2c4c53bc8af1fdbf4e13d9729e","5e379df3d61561c2ed7789b5995b9ba2143bbba21a905e2381e16efe7d1fa424","f07a137bbe2de7a122c37bfea00e761975fb264c49f18003d398d71b3fb35a5f","3dce33e7eb25594863b8e615f14a45ab98190d85953436750644212d8a18c066","2b93035328f7778d200252681c1d86285d501ed424825a18f81e4c3028aa51d9","2ac9c8332c5f8510b8bdd571f8271e0f39b0577714d5e95c1e79a12b2616f069","42c21aa963e7b86fa00801d96e88b36803188018d5ad91db2a9101bccd40b3ff","d31eb848cdebb4c55b4893b335a7c0cca95ad66dee13cbb7d0893810c0a9c301","b9f96255e1048ed2ea33ec553122716f0e57fc1c3ad778e9aa15f5b46547bd23","7a9e0a564fee396cacf706523b5aeed96e04c6b871a8bebefad78499fbffc5bc","906c751ef5822ec0dadcea2f0e9db64a33fb4ee926cc9f7efa38afe5d5371b2a","5387c049e9702f2d2d7ece1a74836a14b47fbebe9bbeb19f94c580a37c855351","c68391fb9efad5d99ff332c65b1606248c4e4a9f1dd9a087204242b56c7126d6","e9cf02252d3a0ced987d24845dcb1f11c1be5541f17e5daa44c6de2d18138d0c","e8b02b879754d85f48489294f99147aeccc352c760d95a6fe2b6e49cd400b2fe","9f6908ab3d8a86c68b86e38578afc7095114e66b2fc36a2a96e9252aac3998e0","0eedb2344442b143ddcd788f87096961cd8572b64f10b4afc3356aa0460171c6","71405cc70f183d029cc5018375f6c35117ffdaf11846c35ebf85ee3956b1b2a6","c68baff4d8ba346130e9753cefe2e487a16731bf17e05fdacc81e8c9a26aae9d","2cd15528d8bb5d0453aa339b4b52e0696e8b07e790c153831c642c3dea5ac8af","479d622e66283ffa9883fbc33e441f7fc928b2277ff30aacbec7b7761b4e9579","ade307876dc5ca267ca308d09e737b611505e015c535863f22420a11fffc1c54","f8cdefa3e0dee639eccbe9794b46f90291e5fd3989fcba60d2f08fde56179fb9","86c5a62f99aac7053976e317dbe9acb2eaf903aaf3d2e5bb1cafe5c2df7b37a8","2b300954ce01a8343866f737656e13243e86e5baef51bd0631b21dcef1f6e954","a2d409a9ffd872d6b9d78ead00baa116bbc73cfa959fce9a2f29d3227876b2a1","b288936f560cd71f4a6002953290de9ff8dfbfbf37f5a9391be5c83322324898","61178a781ef82e0ff54f9430397e71e8f365fc1e3725e0e5346f2de7b0d50dfa","6a6ccb37feb3aad32d9be026a3337db195979cd5727a616fc0f557e974101a54","c649ea79205c029a02272ef55b7ab14ada0903db26144d2205021f24727ac7a3","38e2b02897c6357bbcff729ef84c736727b45cc152abe95a7567caccdfad2a1d","d6610ea7e0b1a7686dba062a1e5544dd7d34140f4545305b7c6afaebfb348341","3dee35db743bdba2c8d19aece7ac049bde6fa587e195d86547c882784e6ba34c","b15e55c5fa977c2f25ca0b1db52cfa2d1fd4bf0baf90a8b90d4a7678ca462ff1","f41d30972724714763a2698ae949fbc463afb203b5fa7c4ad7e4de0871129a17","843dd7b6a7c6269fd43827303f5cbe65c1fecabc30b4670a50d5a15d57daeeb9","f06d8b8567ee9fd799bf7f806efe93b67683ef24f4dea5b23ef12edff4434d9d","6017384f697ff38bc3ef6a546df5b230c3c31329db84cbfe686c83bec011e2b2","e1a5b30d9248549ca0c0bb1d653bafae20c64c4aa5928cc4cd3017b55c2177b0","a593632d5878f17295bd53e1c77f27bf4c15212822f764a2bfc1702f4b413fa0","a868a534ba1c2ca9060b8a13b0ffbbbf78b4be7b0ff80d8c75b02773f7192c29","da7545aba8f54a50fde23e2ede00158dc8112560d934cee58098dfb03aae9b9d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","a1a261624efb3a00ff346b13580f70f3463b8cdcc58b60f5793ff11785d52cab","f83b320cceccfc48457a818d18fc9a006ab18d0bdd727aa2c2e73dc1b4a45e98","9d92b037978bb9525bc4b673ebddd443277542e010c0aef019c03a170ccdaa73","b0d10e46cfe3f6c476b69af02eaa38e4ccc7430221ce3109ae84bb9fb8282298","70e9a18da08294f75bf23e46c7d69e67634c0765d355887b9b41f0d959e1426e","ed44ba6b95f08b758748be7902e0cc54178b1337c56d0e2469c77b03f63ac73b"],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"inlineSources":true,"module":1,"outDir":"./types","rootDir":"../src","sourceMap":true,"strict":true,"target":7},"fileIdsList":[[119,238],[119],[90,119,126,127,128,143],[119,127,128,144,145],[119,126,127],[119,126,143,146,149],[119,126,146,149,150],[119,147,148,149,151,152],[119,126,149],[119,126,143,146,147,148,151],[119,126,134],[119,126],[90,119,126],[79,119,126],[119,130,131,132,133,134,135,136,137,138,139,140,141,142],[119,126,132,133],[119,126,132,134],[119,197],[119,197,198,199],[63,119],[66,119],[63,66,119],[64,65,66,67,68,69,70,71,72,73,74,119,154,157,158,159,160,161,162,163,164],[57,63,64,119],[66,72,74,119,153],[119,156],[66,67,119],[63,119,160],[119,192,193],[119,238,239,240,241,242],[119,238,240],[119,155],[119,245,246,247],[91,119,126],[119,250],[119,251],[119,262],[119,256,261],[119,265,267,268,269,270,271,272,273,274,275,276,277],[119,265,266,268,269,270,271,272,273,274,275,276,277],[119,266,267,268,269,270,271,272,273,274,275,276,277],[119,265,266,267,269,270,271,272,273,274,275,276,277],[119,265,266,267,268,270,271,272,273,274,275,276,277],[119,265,266,267,268,269,271,272,273,274,275,276,277],[119,265,266,267,268,269,270,272,273,274,275,276,277],[119,265,266,267,268,269,270,271,273,274,275,276,277],[119,265,266,267,268,269,270,271,272,274,275,276,277],[119,265,266,267,268,269,270,271,272,273,275,276,277],[119,265,266,267,268,269,270,271,272,273,274,276,277],[119,265,266,267,268,269,270,271,272,273,274,275,277],[119,265,266,267,268,269,270,271,272,273,274,275,276],[75,119],[78,119],[79,84,110,119],[80,90,91,98,107,118,119],[80,81,90,98,119],[82,119],[83,84,91,99,119],[84,107,115,119],[85,87,90,98,119],[86,119],[87,88,119],[89,90,119],[90,119],[90,91,92,107,118,119],[90,91,92,107,119],[93,98,107,118,119],[90,91,93,94,98,107,115,118,119],[93,95,107,115,118,119],[75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125],[90,96,119],[97,118,119,123],[87,90,98,107,119],[99,119],[100,119],[78,101,119],[102,117,119,123],[103,119],[104,119],[90,105,119],[105,106,119,121],[79,90,107,108,109,119],[79,107,109,119],[107,108,119],[110,119],[111,119],[90,113,114,119],[113,114,119],[84,98,115,119],[116,119],[98,117,119],[79,93,104,118,119],[84,119],[107,119,120],[119,121],[119,122],[79,84,90,92,101,107,118,119,121,123],[107,119,124],[119,126,283],[119,286,325],[119,286,310,325],[119,325],[119,286],[119,286,311,325],[119,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324],[119,311,325],[119,326],[119,329],[119,202],[119,214,215,216],[119,202,213,214],[119,177],[119,177,178,179,180,181],[119,166,167,168,169,170,171,172,173,174,175,176],[119,254,257],[119,254,257,258,259],[119,256],[119,253,260],[119,255],[56,58,59,60,61,62,119],[56,57,119],[58,119],[57,58,119],[56,58,119],[119,165,182,183,184],[119,183],[55,119,183,184,185],[119,184],[119,187],[119,187,188,191,195],[119,194],[119,165,189,190],[119,210,211,212],[119,209,210],[119,165,209,210],[119,165,202,209],[119,236],[119,190,196],[50,119,189,196,229,231,233,236],[50,119,190,196,229,230,236],[119,189,196,232],[119,190],[119,189,190,196,236],[119,165,186,189,196,222,226,227,228,234,235],[119,165,203],[119,203,204,205,206,207,208],[119,165,202],[119,218],[119,201,218,220,221],[119,165,186,189,196,200,201,218,219],[119,165,196,213,217],[119,165,222],[119,165,186,222,223],[119,223,224,225],[119,126,165,186,222,223],[236],[190],[189,236],[229,236],[189,232],[165,186,222,226]],"referencedMap":[[240,1],[238,2],[144,3],[127,2],[146,4],[128,5],[145,2],[150,6],[151,7],[147,7],[153,8],[148,7],[152,9],[149,10],[135,11],[132,12],[139,13],[133,11],[130,14],[138,2],[143,15],[140,2],[141,2],[142,2],[137,12],[134,16],[131,2],[136,17],[189,2],[202,13],[198,18],[199,18],[200,19],[197,2],[64,20],[65,20],[67,21],[68,20],[69,20],[70,22],[71,2],[72,2],[73,2],[66,20],[165,23],[74,24],[154,25],[157,26],[158,2],[159,2],[160,2],[161,2],[162,2],[163,27],[164,28],[192,2],[194,29],[193,2],[243,30],[239,1],[241,31],[242,1],[190,12],[156,32],[244,2],[245,2],[248,33],[246,2],[249,34],[250,2],[251,35],[252,36],[263,37],[262,38],[247,2],[264,2],[266,39],[267,40],[265,41],[268,42],[269,43],[270,44],[271,45],[272,46],[273,47],[274,48],[275,49],[276,50],[277,51],[278,2],[155,2],[75,52],[76,52],[78,53],[79,54],[80,55],[81,56],[82,57],[83,58],[84,59],[85,60],[86,61],[87,62],[88,62],[89,63],[90,64],[91,65],[92,66],[77,2],[125,2],[93,67],[94,68],[95,69],[126,70],[96,71],[97,72],[98,73],[99,74],[100,75],[101,76],[102,77],[103,78],[104,79],[105,80],[106,81],[107,82],[109,83],[108,84],[110,85],[111,86],[112,2],[113,87],[114,88],[115,89],[116,90],[117,91],[118,92],[119,93],[120,94],[121,95],[122,96],[123,97],[124,98],[279,2],[280,12],[281,2],[282,2],[284,99],[283,2],[285,12],[310,100],[311,101],[286,102],[289,102],[308,100],[309,100],[299,100],[298,103],[296,100],[291,100],[304,100],[302,100],[306,100],[290,100],[303,100],[307,100],[292,100],[293,100],[305,100],[287,100],[294,100],[295,100],[297,100],[301,100],[312,104],[300,100],[288,100],[325,105],[324,2],[319,104],[321,106],[320,104],[313,104],[314,104],[316,104],[318,104],[322,106],[323,106],[315,106],[317,106],[327,107],[326,2],[328,2],[227,2],[329,2],[330,108],[129,2],[253,2],[214,109],[217,110],[215,111],[216,111],[176,2],[173,112],[175,112],[174,112],[172,112],[182,113],[177,114],[181,2],[178,2],[180,2],[179,2],[168,112],[169,112],[170,112],[166,2],[167,2],[171,112],[254,2],[258,115],[260,116],[259,115],[257,117],[261,118],[256,119],[255,2],[56,2],[63,120],[58,121],[59,122],[60,122],[61,123],[62,123],[57,124],[8,2],[10,2],[9,2],[2,2],[11,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[3,2],[4,2],[22,2],[19,2],[20,2],[21,2],[23,2],[24,2],[25,2],[5,2],[26,2],[27,2],[28,2],[29,2],[6,2],[30,2],[31,2],[32,2],[33,2],[7,2],[34,2],[39,2],[40,2],[35,2],[36,2],[37,2],[38,2],[1,2],[41,2],[55,2],[185,125],[184,126],[186,127],[183,128],[188,129],[196,130],[195,131],[187,2],[191,132],[213,133],[211,134],[212,135],[210,136],[228,137],[229,138],[234,139],[231,140],[233,141],[230,142],[232,142],[235,143],[236,144],[237,137],[204,145],[205,145],[206,2],[207,145],[209,146],[203,147],[208,145],[201,2],[219,148],[221,148],[222,149],[220,150],[218,151],[223,152],[224,153],[226,154],[225,155],[46,2],[47,2],[48,2],[49,2],[50,2],[51,2],[42,2],[52,2],[53,2],[54,2],[43,2],[44,2],[45,2]],"exportedModulesMap":[[240,1],[238,2],[144,3],[127,2],[146,4],[128,5],[145,2],[150,6],[151,7],[147,7],[153,8],[148,7],[152,9],[149,10],[135,11],[132,12],[139,13],[133,11],[130,14],[138,2],[143,15],[140,2],[141,2],[142,2],[137,12],[134,16],[131,2],[136,17],[189,2],[202,13],[198,18],[199,18],[200,19],[197,2],[64,20],[65,20],[67,21],[68,20],[69,20],[70,22],[71,2],[72,2],[73,2],[66,20],[165,23],[74,24],[154,25],[157,26],[158,2],[159,2],[160,2],[161,2],[162,2],[163,27],[164,28],[192,2],[194,29],[193,2],[243,30],[239,1],[241,31],[242,1],[190,12],[156,32],[244,2],[245,2],[248,33],[246,2],[249,34],[250,2],[251,35],[252,36],[263,37],[262,38],[247,2],[264,2],[266,39],[267,40],[265,41],[268,42],[269,43],[270,44],[271,45],[272,46],[273,47],[274,48],[275,49],[276,50],[277,51],[278,2],[155,2],[75,52],[76,52],[78,53],[79,54],[80,55],[81,56],[82,57],[83,58],[84,59],[85,60],[86,61],[87,62],[88,62],[89,63],[90,64],[91,65],[92,66],[77,2],[125,2],[93,67],[94,68],[95,69],[126,70],[96,71],[97,72],[98,73],[99,74],[100,75],[101,76],[102,77],[103,78],[104,79],[105,80],[106,81],[107,82],[109,83],[108,84],[110,85],[111,86],[112,2],[113,87],[114,88],[115,89],[116,90],[117,91],[118,92],[119,93],[120,94],[121,95],[122,96],[123,97],[124,98],[279,2],[280,12],[281,2],[282,2],[284,99],[283,2],[285,12],[310,100],[311,101],[286,102],[289,102],[308,100],[309,100],[299,100],[298,103],[296,100],[291,100],[304,100],[302,100],[306,100],[290,100],[303,100],[307,100],[292,100],[293,100],[305,100],[287,100],[294,100],[295,100],[297,100],[301,100],[312,104],[300,100],[288,100],[325,105],[324,2],[319,104],[321,106],[320,104],[313,104],[314,104],[316,104],[318,104],[322,106],[323,106],[315,106],[317,106],[327,107],[326,2],[328,2],[227,2],[329,2],[330,108],[129,2],[253,2],[214,109],[217,110],[215,111],[216,111],[176,2],[173,112],[175,112],[174,112],[172,112],[182,113],[177,114],[181,2],[178,2],[180,2],[179,2],[168,112],[169,112],[170,112],[166,2],[167,2],[171,112],[254,2],[258,115],[260,116],[259,115],[257,117],[261,118],[256,119],[255,2],[56,2],[63,120],[58,121],[59,122],[60,122],[61,123],[62,123],[57,124],[8,2],[10,2],[9,2],[2,2],[11,2],[12,2],[13,2],[14,2],[15,2],[16,2],[17,2],[18,2],[3,2],[4,2],[22,2],[19,2],[20,2],[21,2],[23,2],[24,2],[25,2],[5,2],[26,2],[27,2],[28,2],[29,2],[6,2],[30,2],[31,2],[32,2],[33,2],[7,2],[34,2],[39,2],[40,2],[35,2],[36,2],[37,2],[38,2],[1,2],[41,2],[55,2],[185,125],[184,126],[186,127],[183,128],[188,129],[196,130],[195,131],[187,2],[191,132],[213,133],[211,134],[212,135],[210,136],[228,156],[229,157],[234,158],[231,159],[233,160],[230,157],[232,157],[235,158],[236,161],[237,137],[204,145],[205,145],[206,2],[207,145],[209,146],[203,147],[208,145],[201,2],[219,148],[221,148],[222,149],[220,150],[218,151],[223,152],[224,153],[226,154],[225,155],[46,2],[47,2],[48,2],[49,2],[50,2],[51,2],[42,2],[52,2],[53,2],[54,2],[43,2],[44,2],[45,2]],"semanticDiagnosticsPerFile":[240,238,144,127,146,128,145,150,151,147,153,148,152,149,135,132,139,133,130,138,143,140,141,142,137,134,131,136,189,202,198,199,200,197,64,65,67,68,69,70,71,72,73,66,165,74,154,157,158,159,160,161,162,163,164,192,194,193,243,239,241,242,190,156,244,245,248,246,249,250,251,252,263,262,247,264,266,267,265,268,269,270,271,272,273,274,275,276,277,278,155,75,76,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,77,125,93,94,95,126,96,97,98,99,100,101,102,103,104,105,106,107,109,108,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,279,280,281,282,284,283,285,310,311,286,289,308,309,299,298,296,291,304,302,306,290,303,307,292,293,305,287,294,295,297,301,312,300,288,325,324,319,321,320,313,314,316,318,322,323,315,317,327,326,328,227,329,330,129,253,214,217,215,216,176,173,175,174,172,182,177,181,178,180,179,168,169,170,166,167,171,254,258,260,259,257,261,256,255,56,63,58,59,60,61,62,57,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,30,31,32,33,7,34,39,40,35,36,37,38,1,41,55,185,184,186,183,188,196,195,187,191,213,211,212,210,228,229,234,231,233,230,232,235,236,237,204,205,206,207,209,203,208,201,219,221,222,220,218,223,224,226,225,46,47,48,49,50,51,42,52,53,54,43,44,45],"latestChangedDtsFile":"./types/index.d.ts"},"version":"4.8.4"} +\ No newline at end of file +diff --git a/dist/types/GasFeeController.d.ts.map b/dist/types/GasFeeController.d.ts.map +index 84faaebaed6577287e57e16b6cb73a0809c3e90c..b8340ef0ce941a3108cfbe3cc34e5b9ff9cf609e 100644 +--- a/dist/types/GasFeeController.d.ts.map ++++ b/dist/types/GasFeeController.d.ts.map +@@ -1 +1 @@ +-{"version":3,"file":"GasFeeController.d.ts","sourceRoot":"","sources":["../../src/GasFeeController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,6BAA6B,EAC9B,MAAM,2BAA2B,CAAC;AAOnC,OAAO,K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,OAAO,GAAE,0BAA+B,GACvC,OAAO,CAAC,WAAW,CAAC;IAqFvB;;;;OAIG;IACH,gBAAgB,CAAC,SAAS,EAAE,MAAM;IAOlC,WAAW;IAQX;;;;OAIG;IACM,OAAO;IAKhB,OAAO,CAAC,KAAK;IAUb;;;;;;OAMG;IACG,YAAY,CAAC,eAAe,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI1D,OAAO,CAAC,UAAU;YAMJ,uBAAuB;IAWrC,eAAe,CACb,oBAAoB,EAAE,MAAM,EAC5B,YAAY,EAAE,MAAM,GACnB,yBAAyB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;CAwBrD;AAED,eAAe,gBAAgB,CAAC"} +\ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b8767cb13b3..b3ca42a56596 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [11.14.2] +### Fixed +- Ensure gas estimates always reflect the correct network ([#24253](https://github.com/MetaMask/metamask-extension/pull/24253)) + ## [11.14.1] ### Fixed - Fix crashes on transaction screens for some users with es_419, pt_BR, pt_PT, zh_CN, zh_TW locales ([#24068](https://github.com/MetaMask/metamask-extension/pull/24068)) @@ -4610,7 +4614,8 @@ Update styles and spacing on the critical error page ([#20350](https://github.c - Added the ability to restore accounts from seed words. -[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.14.1...HEAD +[Unreleased]: https://github.com/MetaMask/metamask-extension/compare/v11.14.2...HEAD +[11.14.2]: https://github.com/MetaMask/metamask-extension/compare/v11.14.1...v11.14.2 [11.14.1]: https://github.com/MetaMask/metamask-extension/compare/v11.14.0...v11.14.1 [11.14.0]: https://github.com/MetaMask/metamask-extension/compare/v11.13.3...v11.14.0 [11.13.3]: https://github.com/MetaMask/metamask-extension/compare/v11.13.2...v11.13.3 diff --git a/package.json b/package.json index 91d53f95468c..2fda935eba02 100644 --- a/package.json +++ b/package.json @@ -237,7 +237,8 @@ "@metamask/network-controller@npm:^15.0.0": "patch:@metamask/network-controller@npm%3A18.0.1#~/.yarn/patches/@metamask-network-controller-npm-18.0.1-c4d0cfaecd.patch", "@metamask/network-controller@npm:^18.0.1": "patch:@metamask/network-controller@npm%3A18.0.1#~/.yarn/patches/@metamask-network-controller-npm-18.0.1-c4d0cfaecd.patch", "@metamask/network-controller@npm:^17.2.1": "patch:@metamask/network-controller@npm%3A18.0.1#~/.yarn/patches/@metamask-network-controller-npm-18.0.1-c4d0cfaecd.patch", - "@metamask/keyring-controller@npm:^13.0.0": "patch:@metamask/keyring-controller@npm%3A13.0.0#~/.yarn/patches/@metamask-keyring-controller-npm-13.0.0-d94816a680.patch" + "@metamask/keyring-controller@npm:^13.0.0": "patch:@metamask/keyring-controller@npm%3A13.0.0#~/.yarn/patches/@metamask-keyring-controller-npm-13.0.0-d94816a680.patch", + "@metamask/gas-fee-controller@npm:^14.0.1": "patch:@metamask/gas-fee-controller@npm%3A14.0.1#~/.yarn/patches/@metamask-gas-fee-controller-npm-14.0.1-59e9d16a4e.patch" }, "dependencies": { "@babel/runtime": "patch:@babel/runtime@npm%3A7.24.0#~/.yarn/patches/@babel-runtime-npm-7.24.0-7eb1dd11a2.patch", @@ -290,7 +291,7 @@ "@metamask/ethjs": "^0.6.0", "@metamask/ethjs-contract": "^0.4.1", "@metamask/ethjs-query": "^0.7.1", - "@metamask/gas-fee-controller": "^14.0.0", + "@metamask/gas-fee-controller": "patch:@metamask/gas-fee-controller@npm%3A14.0.1#~/.yarn/patches/@metamask-gas-fee-controller-npm-14.0.1-59e9d16a4e.patch", "@metamask/jazzicon": "^2.0.0", "@metamask/keyring-api": "^3.0.0", "@metamask/keyring-controller": "patch:@metamask/keyring-controller@npm%3A13.0.0#~/.yarn/patches/@metamask-keyring-controller-npm-13.0.0-d94816a680.patch", diff --git a/yarn.lock b/yarn.lock index a453106b0318..8a6334f6c955 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4674,7 +4674,7 @@ __metadata: languageName: node linkType: hard -"@metamask/gas-fee-controller@npm:^14.0.0, @metamask/gas-fee-controller@npm:^14.0.1": +"@metamask/gas-fee-controller@npm:14.0.1": version: 14.0.1 resolution: "@metamask/gas-fee-controller@npm:14.0.1" dependencies: @@ -4716,6 +4716,27 @@ __metadata: languageName: node linkType: hard +"@metamask/gas-fee-controller@patch:@metamask/gas-fee-controller@npm%3A14.0.1#~/.yarn/patches/@metamask-gas-fee-controller-npm-14.0.1-59e9d16a4e.patch": + version: 14.0.1 + resolution: "@metamask/gas-fee-controller@patch:@metamask/gas-fee-controller@npm%3A14.0.1#~/.yarn/patches/@metamask-gas-fee-controller-npm-14.0.1-59e9d16a4e.patch::version=14.0.1&hash=35f894" + dependencies: + "@metamask/base-controller": "npm:^5.0.1" + "@metamask/controller-utils": "npm:^9.0.1" + "@metamask/eth-query": "npm:^4.0.0" + "@metamask/ethjs-unit": "npm:^0.3.0" + "@metamask/network-controller": "npm:^18.0.1" + "@metamask/polling-controller": "npm:^6.0.1" + "@metamask/utils": "npm:^8.3.0" + "@types/bn.js": "npm:^5.1.5" + "@types/uuid": "npm:^8.3.0" + bn.js: "npm:^5.2.1" + uuid: "npm:^8.3.2" + peerDependencies: + "@metamask/network-controller": ^18.0.0 + checksum: 93ff5edb72ce5c877c2bb35de09795ee824ea0709ca16569cdc98d957f286c56e61e9df643afd1bbde862d8ba8593eb9d56511b519201d2a975dade15a89a7a0 + languageName: node + linkType: hard + "@metamask/jazzicon@npm:^2.0.0": version: 2.0.0 resolution: "@metamask/jazzicon@npm:2.0.0" @@ -24879,7 +24900,7 @@ __metadata: "@metamask/ethjs-contract": "npm:^0.4.1" "@metamask/ethjs-query": "npm:^0.7.1" "@metamask/forwarder": "npm:^1.1.0" - "@metamask/gas-fee-controller": "npm:^14.0.0" + "@metamask/gas-fee-controller": "patch:@metamask/gas-fee-controller@npm%3A14.0.1#~/.yarn/patches/@metamask-gas-fee-controller-npm-14.0.1-59e9d16a4e.patch" "@metamask/jazzicon": "npm:^2.0.0" "@metamask/keyring-api": "npm:^3.0.0" "@metamask/keyring-controller": "patch:@metamask/keyring-controller@npm%3A13.0.0#~/.yarn/patches/@metamask-keyring-controller-npm-13.0.0-d94816a680.patch"