@metamask/name-controller 6.0.1 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [7.0.0]
11
+
12
+ ### Changed
13
+
14
+ - **BREAKING:** Changed token API endpoint from `*.metafi.codefi.network` to `*.api.cx.metamask.io` ([#4301](https://github.com/MetaMask/core/pull/4301))
15
+ - Bump `@metamask/base-controller` to `^5.0.2` ([#4232](https://github.com/MetaMask/core/pull/4232))
16
+ - Bump `async-mutex` to `^0.5.0` ([#4335](https://github.com/MetaMask/core/pull/4335))
17
+ - Bump `@metamask/controller-utils` to `^10.0.0` ([#4342](https://github.com/MetaMask/core/pull/4342))
18
+
19
+ ### Fixed
20
+
21
+ - Fix `setName` and `updateProposedNames` methods to protect against prototype-polluting assignments ([#4041](https://github.com/MetaMask/core/pull/4041)
22
+
10
23
  ## [6.0.1]
11
24
 
12
25
  ### Fixed
@@ -100,7 +113,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
100
113
 
101
114
  - Initial Release ([#1647](https://github.com/MetaMask/core/pull/1647))
102
115
 
103
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/name-controller@6.0.1...HEAD
116
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/name-controller@7.0.0...HEAD
117
+ [7.0.0]: https://github.com/MetaMask/core/compare/@metamask/name-controller@6.0.1...@metamask/name-controller@7.0.0
104
118
  [6.0.1]: https://github.com/MetaMask/core/compare/@metamask/name-controller@6.0.0...@metamask/name-controller@6.0.1
105
119
  [6.0.0]: https://github.com/MetaMask/core/compare/@metamask/name-controller@5.0.0...@metamask/name-controller@6.0.0
106
120
  [5.0.0]: https://github.com/MetaMask/core/compare/@metamask/name-controller@4.2.0...@metamask/name-controller@5.0.0
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkB2WJNTJSjs = require('./chunk-B2WJNTJS.js');
6
+ var _chunkPL2KMW2Yjs = require('./chunk-PL2KMW2Y.js');
7
7
  require('./chunk-PL7IXD33.js');
8
8
  require('./chunk-Z4BLTVTB.js');
9
9
 
@@ -11,5 +11,5 @@ require('./chunk-Z4BLTVTB.js');
11
11
 
12
12
 
13
13
 
14
- exports.FALLBACK_VARIATION = _chunkB2WJNTJSjs.FALLBACK_VARIATION; exports.NameController = _chunkB2WJNTJSjs.NameController; exports.NameOrigin = _chunkB2WJNTJSjs.NameOrigin; exports.PROPOSED_NAME_EXPIRE_DURATION = _chunkB2WJNTJSjs.PROPOSED_NAME_EXPIRE_DURATION;
14
+ exports.FALLBACK_VARIATION = _chunkPL2KMW2Yjs.FALLBACK_VARIATION; exports.NameController = _chunkPL2KMW2Yjs.NameController; exports.NameOrigin = _chunkPL2KMW2Yjs.NameOrigin; exports.PROPOSED_NAME_EXPIRE_DURATION = _chunkPL2KMW2Yjs.PROPOSED_NAME_EXPIRE_DURATION;
15
15
  //# sourceMappingURL=NameController.js.map
@@ -3,7 +3,7 @@ import {
3
3
  NameController,
4
4
  NameOrigin,
5
5
  PROPOSED_NAME_EXPIRE_DURATION
6
- } from "./chunk-GJYKWMRC.mjs";
6
+ } from "./chunk-6AVJOVIX.mjs";
7
7
  import "./chunk-6W3DEAGA.mjs";
8
8
  import "./chunk-XUI43LEZ.mjs";
9
9
  export {
@@ -10,6 +10,7 @@ import {
10
10
 
11
11
  // src/NameController.ts
12
12
  import { BaseController } from "@metamask/base-controller";
13
+ import { isSafeDynamicKey } from "@metamask/controller-utils";
13
14
  var FALLBACK_VARIATION = "*";
14
15
  var PROPOSED_NAME_EXPIRE_DURATION = 60 * 60 * 24;
15
16
  var NameOrigin = /* @__PURE__ */ ((NameOrigin2) => {
@@ -296,6 +297,11 @@ updateEntry_fn = function(value, type, variation, callback) {
296
297
  const variationKey = variation ?? DEFAULT_VARIATION;
297
298
  const normalizedValue = __privateMethod(this, _normalizeValue, normalizeValue_fn).call(this, value, type);
298
299
  const normalizedVariation = __privateMethod(this, _normalizeVariation, normalizeVariation_fn).call(this, variationKey, type);
300
+ if ([normalizedValue, normalizedVariation].some(
301
+ (key) => !isSafeDynamicKey(key)
302
+ )) {
303
+ return;
304
+ }
299
305
  this.update((state) => {
300
306
  const typeEntries = state.names[type] || {};
301
307
  state.names[type] = typeEntries;
@@ -510,4 +516,4 @@ export {
510
516
  NameOrigin,
511
517
  NameController
512
518
  };
513
- //# sourceMappingURL=chunk-GJYKWMRC.mjs.map
519
+ //# sourceMappingURL=chunk-6AVJOVIX.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/NameController.ts"],"sourcesContent":["import type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n RestrictedControllerMessenger,\n} from '@metamask/base-controller';\nimport { BaseController } from '@metamask/base-controller';\nimport { isSafeDynamicKey } from '@metamask/controller-utils';\n\nimport type {\n NameProvider,\n NameProviderRequest,\n NameProviderResult,\n NameProviderSourceResult,\n} from './types';\nimport { NameType } from './types';\n\nexport const FALLBACK_VARIATION = '*';\nexport const PROPOSED_NAME_EXPIRE_DURATION = 60 * 60 * 24; // 24 hours\n\n/**\n * Enumerates the possible origins responsible for setting a petname.\n */\nexport enum NameOrigin {\n // Originated from an account identity.\n ACCOUNT_IDENTITY = 'account-identity',\n // Originated from an address book entry.\n ADDRESS_BOOK = 'address-book',\n // Originated from the API (NameController.setName). This is the default.\n API = 'api',\n // Originated from the user taking action in the UI.\n UI = 'ui',\n}\n\nconst DEFAULT_UPDATE_DELAY = 60 * 2; // 2 Minutes\nconst DEFAULT_VARIATION = '';\n\nconst controllerName = 'NameController';\n\nconst stateMetadata = {\n names: { persist: true, anonymous: false },\n nameSources: { persist: true, anonymous: false },\n};\n\nconst getDefaultState = () => ({\n names: {\n [NameType.ETHEREUM_ADDRESS]: {},\n },\n nameSources: {},\n});\n\nexport type ProposedNamesEntry = {\n proposedNames: string[];\n lastRequestTime: number | null;\n updateDelay: number | null;\n};\n\nexport type NameEntry = {\n name: string | null;\n sourceId: string | null;\n origin: NameOrigin | null;\n proposedNames: Record<string, ProposedNamesEntry>;\n};\n\nexport type SourceEntry = {\n label: string;\n};\n\nexport type NameControllerState = {\n // Type > Value > Variation > Entry\n names: Record<NameType, Record<string, Record<string, NameEntry>>>;\n nameSources: Record<string, SourceEntry>;\n};\n\nexport type GetNameState = ControllerGetStateAction<\n typeof controllerName,\n NameControllerState\n>;\n\nexport type NameStateChange = ControllerStateChangeEvent<\n typeof controllerName,\n NameControllerState\n>;\n\nexport type NameControllerActions = GetNameState;\n\nexport type NameControllerEvents = NameStateChange;\n\nexport type NameControllerMessenger = RestrictedControllerMessenger<\n typeof controllerName,\n NameControllerActions,\n NameControllerEvents,\n never,\n never\n>;\n\nexport type NameControllerOptions = {\n messenger: NameControllerMessenger;\n providers: NameProvider[];\n state?: Partial<NameControllerState>;\n updateDelay?: number;\n};\n\nexport type UpdateProposedNamesRequest = {\n value: string;\n type: NameType;\n sourceIds?: string[];\n onlyUpdateAfterDelay?: boolean;\n variation?: string;\n};\n\nexport type UpdateProposedNamesResult = {\n results: Record<string, { proposedNames?: string[]; error?: unknown }>;\n};\n\nexport type SetNameRequest = {\n value: string;\n type: NameType;\n name: string | null;\n sourceId?: string;\n variation?: string;\n origin?: NameOrigin;\n};\n\n/**\n * Controller for storing and deriving names for values such as Ethereum addresses.\n */\nexport class NameController extends BaseController<\n typeof controllerName,\n NameControllerState,\n NameControllerMessenger\n> {\n #providers: NameProvider[];\n\n #updateDelay: number;\n\n /**\n * Construct a Name controller.\n *\n * @param options - Controller options.\n * @param options.messenger - Restricted controller messenger for the name controller.\n * @param options.providers - Array of name provider instances to propose names.\n * @param options.state - Initial state to set on the controller.\n * @param options.updateDelay - The delay in seconds before a new request to a source should be made.\n */\n constructor({\n messenger,\n providers,\n state,\n updateDelay,\n }: NameControllerOptions) {\n super({\n name: controllerName,\n metadata: stateMetadata,\n messenger,\n state: { ...getDefaultState(), ...state },\n });\n\n this.#providers = providers;\n this.#updateDelay = updateDelay ?? DEFAULT_UPDATE_DELAY;\n }\n\n /**\n * Set the user specified name for a value.\n *\n * @param request - Request object.\n * @param request.name - Name to set.\n * @param request.sourceId - Optional ID of the source of the proposed name.\n * @param request.type - Type of value to set the name for.\n * @param request.value - Value to set the name for.\n * @param request.variation - Variation of the raw value to set the name for. The chain ID if the type is Ethereum address.\n */\n setName(request: SetNameRequest) {\n this.#validateSetNameRequest(request);\n\n const {\n value,\n type,\n name,\n sourceId: requestSourceId,\n origin: requestOrigin,\n variation,\n } = request;\n const sourceId = requestSourceId ?? null;\n // If the name is being cleared, the fallback origin should be cleared as well.\n const fallbackOrigin = name === null ? null : NameOrigin.API;\n const origin = requestOrigin ?? fallbackOrigin;\n\n this.#updateEntry(value, type, variation, (entry: NameEntry) => {\n entry.name = name;\n entry.sourceId = sourceId;\n entry.origin = origin;\n });\n }\n\n /**\n * Generate the proposed names for a value using the name providers and store them in the state.\n *\n * @param request - Request object.\n * @param request.value - Value to update the proposed names for.\n * @param request.type - Type of value to update the proposed names for.\n * @param request.sourceIds - Optional array of source IDs to limit which sources are used by the providers. If not provided, all sources in all providers will be used.\n * @param request.variation - Variation of the raw value to update proposed names for. The chain ID if the type is Ethereum address.\n * @returns The updated proposed names for the value.\n */\n async updateProposedNames(\n request: UpdateProposedNamesRequest,\n ): Promise<UpdateProposedNamesResult> {\n this.#validateUpdateProposedNamesRequest(request);\n\n const providerResponses = (\n await Promise.all(\n this.#providers.map((provider) =>\n this.#getProviderResponse(request, provider),\n ),\n )\n ).filter((response) => Boolean(response)) as NameProviderResult[];\n\n this.#updateProposedNameState(request, providerResponses);\n this.#updateSourceState(this.#providers);\n this.#removeExpiredEntries();\n\n return this.#getUpdateProposedNamesResult(providerResponses);\n }\n\n #updateProposedNameState(\n request: UpdateProposedNamesRequest,\n providerResponses: NameProviderResult[],\n ) {\n const { value, type, variation } = request;\n const currentTime = this.#getCurrentTimeSeconds();\n\n this.#updateEntry(value, type, variation, (entry: NameEntry) => {\n this.#removeDormantProposedNames(entry.proposedNames, type);\n\n for (const providerResponse of providerResponses) {\n const { results } = providerResponse;\n\n for (const sourceId of Object.keys(providerResponse.results)) {\n const result = results[sourceId];\n const { proposedNames, updateDelay } = result;\n\n const proposedNameEntry = entry.proposedNames[sourceId] ?? {\n proposedNames: [],\n lastRequestTime: null,\n updateDelay: null,\n };\n\n entry.proposedNames[sourceId] = proposedNameEntry;\n\n if (proposedNames) {\n proposedNameEntry.proposedNames = proposedNames;\n }\n\n proposedNameEntry.lastRequestTime = currentTime;\n proposedNameEntry.updateDelay = updateDelay ?? null;\n }\n }\n });\n }\n\n #updateSourceState(providers: NameProvider[]) {\n const newNameSources = { ...this.state.nameSources };\n\n for (const provider of providers) {\n const { sourceLabels } = provider.getMetadata();\n\n for (const sourceId of Object.keys(sourceLabels)) {\n newNameSources[sourceId] = {\n label: sourceLabels[sourceId],\n };\n }\n }\n\n this.update((state) => {\n state.nameSources = newNameSources;\n });\n }\n\n #getUpdateProposedNamesResult(\n providerResponses: NameProviderResult[],\n ): UpdateProposedNamesResult {\n return providerResponses.reduce(\n (acc: UpdateProposedNamesResult, providerResponse) => {\n const { results } = providerResponse;\n\n for (const sourceId of Object.keys(results)) {\n const { proposedNames, error } = results[sourceId];\n\n acc.results[sourceId] = {\n proposedNames,\n error,\n };\n }\n\n return acc;\n },\n { results: {} },\n );\n }\n\n async #getProviderResponse(\n request: UpdateProposedNamesRequest,\n provider: NameProvider,\n ): Promise<NameProviderResult | undefined> {\n const {\n value,\n type,\n sourceIds: requestedSourceIds,\n onlyUpdateAfterDelay,\n variation,\n } = request;\n\n /* istanbul ignore next */\n const variationKey = variation ?? DEFAULT_VARIATION;\n const supportedSourceIds = this.#getSourceIds(provider, type);\n const currentTime = this.#getCurrentTimeSeconds();\n const normalizedValue = this.#normalizeValue(value, type);\n\n const matchingSourceIds = supportedSourceIds.filter((sourceId) => {\n if (requestedSourceIds && !requestedSourceIds.includes(sourceId)) {\n return false;\n }\n\n if (onlyUpdateAfterDelay) {\n const entry =\n this.state.names[type]?.[normalizedValue]?.[variationKey] ?? {};\n const proposedNamesEntry = entry.proposedNames?.[sourceId] ?? {};\n const lastRequestTime = proposedNamesEntry.lastRequestTime ?? 0;\n const updateDelay = proposedNamesEntry.updateDelay ?? this.#updateDelay;\n\n if (currentTime - lastRequestTime < updateDelay) {\n return false;\n }\n }\n\n return true;\n });\n\n if (!matchingSourceIds.length) {\n return undefined;\n }\n\n const providerRequest: NameProviderRequest = {\n value: this.#normalizeValue(value, type),\n type,\n sourceIds: requestedSourceIds ? matchingSourceIds : undefined,\n variation: this.#normalizeVariation(variationKey, type),\n };\n\n let responseError: unknown | undefined;\n let response: NameProviderResult | undefined;\n\n try {\n response = await provider.getProposedNames(providerRequest);\n responseError = response.error;\n } catch (error) {\n responseError = error;\n }\n\n return this.#normalizeProviderResult(\n response,\n responseError,\n matchingSourceIds,\n );\n }\n\n #normalizeProviderResult(\n result: NameProviderResult | undefined,\n responseError: unknown,\n matchingSourceIds: string[],\n ): NameProviderResult {\n const error = responseError ?? undefined;\n\n const results = matchingSourceIds.reduce((acc, sourceId) => {\n const sourceResult = result?.results?.[sourceId];\n\n const normalizedSourceResult = this.#normalizeProviderSourceResult(\n sourceResult,\n responseError,\n );\n\n return {\n ...acc,\n [sourceId]: normalizedSourceResult,\n };\n }, {});\n\n return { results, error };\n }\n\n #normalizeProviderSourceResult(\n result: NameProviderSourceResult | undefined,\n responseError: unknown,\n ): NameProviderSourceResult | undefined {\n const error = result?.error ?? responseError ?? undefined;\n const updateDelay = result?.updateDelay ?? undefined;\n let proposedNames = error ? undefined : result?.proposedNames ?? undefined;\n\n if (proposedNames) {\n proposedNames = proposedNames.filter(\n (proposedName) => proposedName?.length,\n );\n }\n\n return {\n proposedNames,\n error,\n updateDelay,\n };\n }\n\n #normalizeValue(value: string, type: NameType): string {\n /* istanbul ignore next */\n switch (type) {\n case NameType.ETHEREUM_ADDRESS:\n return value.toLowerCase();\n\n default:\n return value;\n }\n }\n\n #normalizeVariation(variation: string, type: NameType): string {\n /* istanbul ignore next */\n switch (type) {\n case NameType.ETHEREUM_ADDRESS:\n return variation.toLowerCase();\n\n default:\n return variation;\n }\n }\n\n #updateEntry(\n value: string,\n type: NameType,\n variation: string | undefined,\n callback: (entry: NameEntry) => void,\n ) {\n /* istanbul ignore next */\n const variationKey = variation ?? DEFAULT_VARIATION;\n const normalizedValue = this.#normalizeValue(value, type);\n const normalizedVariation = this.#normalizeVariation(variationKey, type);\n\n if (\n [normalizedValue, normalizedVariation].some(\n (key) => !isSafeDynamicKey(key),\n )\n ) {\n return;\n }\n\n this.update((state) => {\n const typeEntries = state.names[type] || {};\n state.names[type] = typeEntries;\n\n const variationEntries = typeEntries[normalizedValue] || {};\n typeEntries[normalizedValue] = variationEntries;\n\n const entry = variationEntries[normalizedVariation] ?? {\n proposedNames: {},\n name: null,\n sourceId: null,\n origin: null,\n };\n variationEntries[normalizedVariation] = entry;\n\n callback(entry);\n });\n }\n\n #getCurrentTimeSeconds(): number {\n return Math.round(Date.now() / 1000);\n }\n\n #validateSetNameRequest(request: SetNameRequest) {\n const { name, value, type, sourceId, variation, origin } = request;\n const errorMessages: string[] = [];\n\n this.#validateValue(value, errorMessages);\n this.#validateType(type, errorMessages);\n this.#validateName(name, errorMessages);\n this.#validateSourceId(sourceId, type, name, errorMessages);\n this.#validateVariation(variation, type, errorMessages);\n this.#validateOrigin(origin, name, errorMessages);\n\n if (errorMessages.length) {\n throw new Error(errorMessages.join(' '));\n }\n }\n\n #validateUpdateProposedNamesRequest(request: UpdateProposedNamesRequest) {\n const { value, type, sourceIds, variation } = request;\n const errorMessages: string[] = [];\n\n this.#validateValue(value, errorMessages);\n this.#validateType(type, errorMessages);\n this.#validateSourceIds(sourceIds, type, errorMessages);\n this.#validateDuplicateSourceIds(type, errorMessages);\n this.#validateVariation(variation, type, errorMessages);\n\n if (errorMessages.length) {\n throw new Error(errorMessages.join(' '));\n }\n }\n\n #validateValue(value: string, errorMessages: string[]) {\n if (!value?.length || typeof value !== 'string') {\n errorMessages.push('Must specify a non-empty string for value.');\n }\n }\n\n #validateType(type: NameType, errorMessages: string[]) {\n if (!Object.values(NameType).includes(type)) {\n errorMessages.push(\n `Must specify one of the following types: ${Object.values(\n NameType,\n ).join(', ')}`,\n );\n }\n }\n\n #validateName(name: string | null, errorMessages: string[]) {\n if (name === null) {\n return;\n }\n\n if (!name?.length || typeof name !== 'string') {\n errorMessages.push('Must specify a non-empty string or null for name.');\n }\n }\n\n #validateSourceIds(\n sourceIds: string[] | undefined,\n type: NameType,\n errorMessages: string[],\n ) {\n if (!sourceIds) {\n return;\n }\n\n const allSourceIds = this.#getAllSourceIds(type);\n const missingSourceIds = [];\n\n for (const sourceId of sourceIds) {\n if (!allSourceIds.includes(sourceId)) {\n missingSourceIds.push(sourceId);\n continue;\n }\n }\n\n if (missingSourceIds.length) {\n errorMessages.push(\n `Unknown source IDs for type '${type}': ${missingSourceIds.join(', ')}`,\n );\n }\n }\n\n #validateSourceId(\n sourceId: string | undefined,\n type: NameType,\n name: string | null,\n errorMessages: string[],\n ) {\n if (sourceId === null || sourceId === undefined) {\n return;\n }\n\n if (name === null) {\n errorMessages.push(\n `Cannot specify a source ID when clearing the saved name: ${sourceId}`,\n );\n return;\n }\n\n const allSourceIds = this.#getAllSourceIds(type);\n\n if (!sourceId.length || typeof sourceId !== 'string') {\n errorMessages.push('Must specify a non-empty string for sourceId.');\n return;\n }\n\n if (!allSourceIds.includes(sourceId)) {\n errorMessages.push(`Unknown source ID for type '${type}': ${sourceId}`);\n }\n }\n\n #validateDuplicateSourceIds(type: NameType, errorMessages: string[]) {\n const allSourceIds = this.#getAllSourceIds(type);\n\n const duplicateSourceIds = allSourceIds.filter(\n (sourceId, index) => allSourceIds.indexOf(sourceId) !== index,\n );\n\n if (duplicateSourceIds.length) {\n errorMessages.push(\n `Duplicate source IDs found for type '${type}': ${duplicateSourceIds.join(\n ', ',\n )}`,\n );\n }\n }\n\n #validateVariation(\n variation: string | undefined,\n type: string,\n errorMessages: string[],\n ) {\n if (type !== NameType.ETHEREUM_ADDRESS) {\n return;\n }\n\n if (\n !variation?.length ||\n typeof variation !== 'string' ||\n (!variation.match(/^0x[0-9A-Fa-f]+$/u) &&\n variation !== FALLBACK_VARIATION)\n ) {\n errorMessages.push(\n `Must specify a chain ID in hexidecimal format or the fallback, \"${FALLBACK_VARIATION}\", for variation when using '${type}' type.`,\n );\n }\n }\n\n #validateOrigin(\n origin: NameOrigin | null | undefined,\n name: string | null,\n errorMessages: string[],\n ) {\n if (!origin) {\n return;\n }\n\n if (name === null) {\n errorMessages.push(\n `Cannot specify an origin when clearing the saved name: ${origin}`,\n );\n return;\n }\n\n if (!Object.values(NameOrigin).includes(origin)) {\n errorMessages.push(\n `Must specify one of the following origins: ${Object.values(\n NameOrigin,\n ).join(', ')}`,\n );\n }\n }\n\n #getAllSourceIds(type: NameType): string[] {\n return (\n this.#providers\n /* istanbul ignore next */\n .map((provider) => this.#getSourceIds(provider, type))\n .flat()\n );\n }\n\n #getSourceIds(provider: NameProvider, type: NameType): string[] {\n return provider.getMetadata().sourceIds[type];\n }\n\n #removeDormantProposedNames(\n proposedNames: Record<string, ProposedNamesEntry>,\n type: NameType,\n ) {\n if (Object.keys(proposedNames).length === 0) {\n return;\n }\n\n const typeSourceIds = this.#getAllSourceIds(type);\n\n const dormantSourceIds = Object.keys(proposedNames).filter(\n (sourceId) => !typeSourceIds.includes(sourceId),\n );\n\n for (const dormantSourceId of dormantSourceIds) {\n delete proposedNames[dormantSourceId];\n }\n }\n\n #removeExpiredEntries(): void {\n const currentTime = this.#getCurrentTimeSeconds();\n\n this.update((state: NameControllerState) => {\n const entries = this.#getEntriesList(state);\n for (const { nameType, value, variation, entry } of entries) {\n if (entry.name !== null) {\n continue;\n }\n\n const proposedNames = Object.values(entry.proposedNames);\n const allProposedNamesExpired = proposedNames.every(\n (proposedName: ProposedNamesEntry) =>\n currentTime - (proposedName.lastRequestTime ?? 0) >=\n PROPOSED_NAME_EXPIRE_DURATION,\n );\n\n if (allProposedNamesExpired) {\n delete state.names[nameType][value][variation];\n }\n }\n });\n }\n\n #getEntriesList(state: NameControllerState): {\n nameType: NameType;\n value: string;\n variation: string;\n entry: NameEntry;\n }[] {\n return Object.entries(state.names).flatMap(([type, typeEntries]) =>\n Object.entries(typeEntries).flatMap(([value, variationEntries]) =>\n Object.entries(variationEntries).map(([variation, entry]) => ({\n entry,\n nameType: type as NameType,\n value,\n variation,\n })),\n ),\n );\n }\n}\n"],"mappings":";;;;;;;;;;;AAKA,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;AAU1B,IAAM,qBAAqB;AAC3B,IAAM,gCAAgC,KAAK,KAAK;AAKhD,IAAK,aAAL,kBAAKA,gBAAL;AAEL,EAAAA,YAAA,sBAAmB;AAEnB,EAAAA,YAAA,kBAAe;AAEf,EAAAA,YAAA,SAAM;AAEN,EAAAA,YAAA,QAAK;AARK,SAAAA;AAAA,GAAA;AAWZ,IAAM,uBAAuB,KAAK;AAClC,IAAM,oBAAoB;AAE1B,IAAM,iBAAiB;AAEvB,IAAM,gBAAgB;AAAA,EACpB,OAAO,EAAE,SAAS,MAAM,WAAW,MAAM;AAAA,EACzC,aAAa,EAAE,SAAS,MAAM,WAAW,MAAM;AACjD;AAEA,IAAM,kBAAkB,OAAO;AAAA,EAC7B,OAAO;AAAA,IACL,yCAA0B,GAAG,CAAC;AAAA,EAChC;AAAA,EACA,aAAa,CAAC;AAChB;AAhDA;AA8HO,IAAM,iBAAN,cAA6B,eAIlC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,YAAY;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,GAA0B;AACxB,UAAM;AAAA,MACJ,MAAM;AAAA,MACN,UAAU;AAAA,MACV;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,CAAC,CAAC,WAAW,KAAK,OAAO;AAAA,QAC5D;AAAA,QACA,UAAU;AAAA,QACV;AAAA,QACA;AAAA,MACF,EAAE;AAAA,IACJ;AAAA,EACF;AACF;","names":["NameOrigin"]}
@@ -10,6 +10,7 @@ var _chunkZ4BLTVTBjs = require('./chunk-Z4BLTVTB.js');
10
10
 
11
11
  // src/NameController.ts
12
12
  var _basecontroller = require('@metamask/base-controller');
13
+ var _controllerutils = require('@metamask/controller-utils');
13
14
  var FALLBACK_VARIATION = "*";
14
15
  var PROPOSED_NAME_EXPIRE_DURATION = 60 * 60 * 24;
15
16
  var NameOrigin = /* @__PURE__ */ ((NameOrigin2) => {
@@ -296,6 +297,11 @@ updateEntry_fn = function(value, type, variation, callback) {
296
297
  const variationKey = variation ?? DEFAULT_VARIATION;
297
298
  const normalizedValue = _chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _normalizeValue, normalizeValue_fn).call(this, value, type);
298
299
  const normalizedVariation = _chunkZ4BLTVTBjs.__privateMethod.call(void 0, this, _normalizeVariation, normalizeVariation_fn).call(this, variationKey, type);
300
+ if ([normalizedValue, normalizedVariation].some(
301
+ (key) => !_controllerutils.isSafeDynamicKey.call(void 0, key)
302
+ )) {
303
+ return;
304
+ }
299
305
  this.update((state) => {
300
306
  const typeEntries = state.names[type] || {};
301
307
  state.names[type] = typeEntries;
@@ -510,4 +516,4 @@ getEntriesList_fn = function(state) {
510
516
 
511
517
 
512
518
  exports.FALLBACK_VARIATION = FALLBACK_VARIATION; exports.PROPOSED_NAME_EXPIRE_DURATION = PROPOSED_NAME_EXPIRE_DURATION; exports.NameOrigin = NameOrigin; exports.NameController = NameController;
513
- //# sourceMappingURL=chunk-B2WJNTJS.js.map
519
+ //# sourceMappingURL=chunk-PL2KMW2Y.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/NameController.ts"],"names":["NameOrigin"],"mappings":";;;;;;;;;;;AAKA,SAAS,sBAAsB;AAC/B,SAAS,wBAAwB;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AkB;AAC9C,WAAO,cAAc,eAAe;AAAA,EACtC;AACF;AAEA;AAAA,0BAAqB,WAAS;AAC5B,QAAM,cAAc,sBAAK,kDAAL;AAEpB,OAAK,OAAO,CAAC,UAA+B;AAC1C,UAAM,UAAU,sBAAK,oCAAL,WAAqB;AACrC,eAAW,EAAE,UAAU,OAAO,WAAW,MAAM,KAAK,SAAS;AAC3D,UAAI,MAAM,SAAS,MAAM;AACvB;AAAA,MACF;AAEA,YAAM,gBAAgB,OAAO,OAAO,MAAM,aAAa;AACvD,YAAM,0BAA0B,cAAc;AAAA,QAC5C,CAAC,iBACC,eAAe,aAAa,mBAAmB,MAC/C;AAAA,MACJ;AAEA,UAAI,yBAAyB;AAC3B,eAAO,MAAM,MAAM,QAAQ,EAAE,KAAK,EAAE,SAAS;AAAA,MAC/C;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEA;AAAA,oBAAe,SAAC,OAKZ;AACF,SAAO,OAAO,QAAQ,MAAM,KAAK,EAAE;AAAA,IAAQ,CAAC,CAAC,MAAM,WAAW,MAC5D,OAAO,QAAQ,WAAW,EAAE;AAAA,MAAQ,CAAC,CAAC,OAAO,gBAAgB,MAC3D,OAAO,QAAQ,gBAAgB,EAAE,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO;AAAA,QAC5D;AAAA,QACA,UAAU;AAAA,QACV;AAAA,QACA;AAAA,MACF,EAAE;AAAA,IACJ;AAAA,EACF;AACF","sourcesContent":["import type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n RestrictedControllerMessenger,\n} from '@metamask/base-controller';\nimport { BaseController } from '@metamask/base-controller';\nimport { isSafeDynamicKey } from '@metamask/controller-utils';\n\nimport type {\n NameProvider,\n NameProviderRequest,\n NameProviderResult,\n NameProviderSourceResult,\n} from './types';\nimport { NameType } from './types';\n\nexport const FALLBACK_VARIATION = '*';\nexport const PROPOSED_NAME_EXPIRE_DURATION = 60 * 60 * 24; // 24 hours\n\n/**\n * Enumerates the possible origins responsible for setting a petname.\n */\nexport enum NameOrigin {\n // Originated from an account identity.\n ACCOUNT_IDENTITY = 'account-identity',\n // Originated from an address book entry.\n ADDRESS_BOOK = 'address-book',\n // Originated from the API (NameController.setName). This is the default.\n API = 'api',\n // Originated from the user taking action in the UI.\n UI = 'ui',\n}\n\nconst DEFAULT_UPDATE_DELAY = 60 * 2; // 2 Minutes\nconst DEFAULT_VARIATION = '';\n\nconst controllerName = 'NameController';\n\nconst stateMetadata = {\n names: { persist: true, anonymous: false },\n nameSources: { persist: true, anonymous: false },\n};\n\nconst getDefaultState = () => ({\n names: {\n [NameType.ETHEREUM_ADDRESS]: {},\n },\n nameSources: {},\n});\n\nexport type ProposedNamesEntry = {\n proposedNames: string[];\n lastRequestTime: number | null;\n updateDelay: number | null;\n};\n\nexport type NameEntry = {\n name: string | null;\n sourceId: string | null;\n origin: NameOrigin | null;\n proposedNames: Record<string, ProposedNamesEntry>;\n};\n\nexport type SourceEntry = {\n label: string;\n};\n\nexport type NameControllerState = {\n // Type > Value > Variation > Entry\n names: Record<NameType, Record<string, Record<string, NameEntry>>>;\n nameSources: Record<string, SourceEntry>;\n};\n\nexport type GetNameState = ControllerGetStateAction<\n typeof controllerName,\n NameControllerState\n>;\n\nexport type NameStateChange = ControllerStateChangeEvent<\n typeof controllerName,\n NameControllerState\n>;\n\nexport type NameControllerActions = GetNameState;\n\nexport type NameControllerEvents = NameStateChange;\n\nexport type NameControllerMessenger = RestrictedControllerMessenger<\n typeof controllerName,\n NameControllerActions,\n NameControllerEvents,\n never,\n never\n>;\n\nexport type NameControllerOptions = {\n messenger: NameControllerMessenger;\n providers: NameProvider[];\n state?: Partial<NameControllerState>;\n updateDelay?: number;\n};\n\nexport type UpdateProposedNamesRequest = {\n value: string;\n type: NameType;\n sourceIds?: string[];\n onlyUpdateAfterDelay?: boolean;\n variation?: string;\n};\n\nexport type UpdateProposedNamesResult = {\n results: Record<string, { proposedNames?: string[]; error?: unknown }>;\n};\n\nexport type SetNameRequest = {\n value: string;\n type: NameType;\n name: string | null;\n sourceId?: string;\n variation?: string;\n origin?: NameOrigin;\n};\n\n/**\n * Controller for storing and deriving names for values such as Ethereum addresses.\n */\nexport class NameController extends BaseController<\n typeof controllerName,\n NameControllerState,\n NameControllerMessenger\n> {\n #providers: NameProvider[];\n\n #updateDelay: number;\n\n /**\n * Construct a Name controller.\n *\n * @param options - Controller options.\n * @param options.messenger - Restricted controller messenger for the name controller.\n * @param options.providers - Array of name provider instances to propose names.\n * @param options.state - Initial state to set on the controller.\n * @param options.updateDelay - The delay in seconds before a new request to a source should be made.\n */\n constructor({\n messenger,\n providers,\n state,\n updateDelay,\n }: NameControllerOptions) {\n super({\n name: controllerName,\n metadata: stateMetadata,\n messenger,\n state: { ...getDefaultState(), ...state },\n });\n\n this.#providers = providers;\n this.#updateDelay = updateDelay ?? DEFAULT_UPDATE_DELAY;\n }\n\n /**\n * Set the user specified name for a value.\n *\n * @param request - Request object.\n * @param request.name - Name to set.\n * @param request.sourceId - Optional ID of the source of the proposed name.\n * @param request.type - Type of value to set the name for.\n * @param request.value - Value to set the name for.\n * @param request.variation - Variation of the raw value to set the name for. The chain ID if the type is Ethereum address.\n */\n setName(request: SetNameRequest) {\n this.#validateSetNameRequest(request);\n\n const {\n value,\n type,\n name,\n sourceId: requestSourceId,\n origin: requestOrigin,\n variation,\n } = request;\n const sourceId = requestSourceId ?? null;\n // If the name is being cleared, the fallback origin should be cleared as well.\n const fallbackOrigin = name === null ? null : NameOrigin.API;\n const origin = requestOrigin ?? fallbackOrigin;\n\n this.#updateEntry(value, type, variation, (entry: NameEntry) => {\n entry.name = name;\n entry.sourceId = sourceId;\n entry.origin = origin;\n });\n }\n\n /**\n * Generate the proposed names for a value using the name providers and store them in the state.\n *\n * @param request - Request object.\n * @param request.value - Value to update the proposed names for.\n * @param request.type - Type of value to update the proposed names for.\n * @param request.sourceIds - Optional array of source IDs to limit which sources are used by the providers. If not provided, all sources in all providers will be used.\n * @param request.variation - Variation of the raw value to update proposed names for. The chain ID if the type is Ethereum address.\n * @returns The updated proposed names for the value.\n */\n async updateProposedNames(\n request: UpdateProposedNamesRequest,\n ): Promise<UpdateProposedNamesResult> {\n this.#validateUpdateProposedNamesRequest(request);\n\n const providerResponses = (\n await Promise.all(\n this.#providers.map((provider) =>\n this.#getProviderResponse(request, provider),\n ),\n )\n ).filter((response) => Boolean(response)) as NameProviderResult[];\n\n this.#updateProposedNameState(request, providerResponses);\n this.#updateSourceState(this.#providers);\n this.#removeExpiredEntries();\n\n return this.#getUpdateProposedNamesResult(providerResponses);\n }\n\n #updateProposedNameState(\n request: UpdateProposedNamesRequest,\n providerResponses: NameProviderResult[],\n ) {\n const { value, type, variation } = request;\n const currentTime = this.#getCurrentTimeSeconds();\n\n this.#updateEntry(value, type, variation, (entry: NameEntry) => {\n this.#removeDormantProposedNames(entry.proposedNames, type);\n\n for (const providerResponse of providerResponses) {\n const { results } = providerResponse;\n\n for (const sourceId of Object.keys(providerResponse.results)) {\n const result = results[sourceId];\n const { proposedNames, updateDelay } = result;\n\n const proposedNameEntry = entry.proposedNames[sourceId] ?? {\n proposedNames: [],\n lastRequestTime: null,\n updateDelay: null,\n };\n\n entry.proposedNames[sourceId] = proposedNameEntry;\n\n if (proposedNames) {\n proposedNameEntry.proposedNames = proposedNames;\n }\n\n proposedNameEntry.lastRequestTime = currentTime;\n proposedNameEntry.updateDelay = updateDelay ?? null;\n }\n }\n });\n }\n\n #updateSourceState(providers: NameProvider[]) {\n const newNameSources = { ...this.state.nameSources };\n\n for (const provider of providers) {\n const { sourceLabels } = provider.getMetadata();\n\n for (const sourceId of Object.keys(sourceLabels)) {\n newNameSources[sourceId] = {\n label: sourceLabels[sourceId],\n };\n }\n }\n\n this.update((state) => {\n state.nameSources = newNameSources;\n });\n }\n\n #getUpdateProposedNamesResult(\n providerResponses: NameProviderResult[],\n ): UpdateProposedNamesResult {\n return providerResponses.reduce(\n (acc: UpdateProposedNamesResult, providerResponse) => {\n const { results } = providerResponse;\n\n for (const sourceId of Object.keys(results)) {\n const { proposedNames, error } = results[sourceId];\n\n acc.results[sourceId] = {\n proposedNames,\n error,\n };\n }\n\n return acc;\n },\n { results: {} },\n );\n }\n\n async #getProviderResponse(\n request: UpdateProposedNamesRequest,\n provider: NameProvider,\n ): Promise<NameProviderResult | undefined> {\n const {\n value,\n type,\n sourceIds: requestedSourceIds,\n onlyUpdateAfterDelay,\n variation,\n } = request;\n\n /* istanbul ignore next */\n const variationKey = variation ?? DEFAULT_VARIATION;\n const supportedSourceIds = this.#getSourceIds(provider, type);\n const currentTime = this.#getCurrentTimeSeconds();\n const normalizedValue = this.#normalizeValue(value, type);\n\n const matchingSourceIds = supportedSourceIds.filter((sourceId) => {\n if (requestedSourceIds && !requestedSourceIds.includes(sourceId)) {\n return false;\n }\n\n if (onlyUpdateAfterDelay) {\n const entry =\n this.state.names[type]?.[normalizedValue]?.[variationKey] ?? {};\n const proposedNamesEntry = entry.proposedNames?.[sourceId] ?? {};\n const lastRequestTime = proposedNamesEntry.lastRequestTime ?? 0;\n const updateDelay = proposedNamesEntry.updateDelay ?? this.#updateDelay;\n\n if (currentTime - lastRequestTime < updateDelay) {\n return false;\n }\n }\n\n return true;\n });\n\n if (!matchingSourceIds.length) {\n return undefined;\n }\n\n const providerRequest: NameProviderRequest = {\n value: this.#normalizeValue(value, type),\n type,\n sourceIds: requestedSourceIds ? matchingSourceIds : undefined,\n variation: this.#normalizeVariation(variationKey, type),\n };\n\n let responseError: unknown | undefined;\n let response: NameProviderResult | undefined;\n\n try {\n response = await provider.getProposedNames(providerRequest);\n responseError = response.error;\n } catch (error) {\n responseError = error;\n }\n\n return this.#normalizeProviderResult(\n response,\n responseError,\n matchingSourceIds,\n );\n }\n\n #normalizeProviderResult(\n result: NameProviderResult | undefined,\n responseError: unknown,\n matchingSourceIds: string[],\n ): NameProviderResult {\n const error = responseError ?? undefined;\n\n const results = matchingSourceIds.reduce((acc, sourceId) => {\n const sourceResult = result?.results?.[sourceId];\n\n const normalizedSourceResult = this.#normalizeProviderSourceResult(\n sourceResult,\n responseError,\n );\n\n return {\n ...acc,\n [sourceId]: normalizedSourceResult,\n };\n }, {});\n\n return { results, error };\n }\n\n #normalizeProviderSourceResult(\n result: NameProviderSourceResult | undefined,\n responseError: unknown,\n ): NameProviderSourceResult | undefined {\n const error = result?.error ?? responseError ?? undefined;\n const updateDelay = result?.updateDelay ?? undefined;\n let proposedNames = error ? undefined : result?.proposedNames ?? undefined;\n\n if (proposedNames) {\n proposedNames = proposedNames.filter(\n (proposedName) => proposedName?.length,\n );\n }\n\n return {\n proposedNames,\n error,\n updateDelay,\n };\n }\n\n #normalizeValue(value: string, type: NameType): string {\n /* istanbul ignore next */\n switch (type) {\n case NameType.ETHEREUM_ADDRESS:\n return value.toLowerCase();\n\n default:\n return value;\n }\n }\n\n #normalizeVariation(variation: string, type: NameType): string {\n /* istanbul ignore next */\n switch (type) {\n case NameType.ETHEREUM_ADDRESS:\n return variation.toLowerCase();\n\n default:\n return variation;\n }\n }\n\n #updateEntry(\n value: string,\n type: NameType,\n variation: string | undefined,\n callback: (entry: NameEntry) => void,\n ) {\n /* istanbul ignore next */\n const variationKey = variation ?? DEFAULT_VARIATION;\n const normalizedValue = this.#normalizeValue(value, type);\n const normalizedVariation = this.#normalizeVariation(variationKey, type);\n\n if (\n [normalizedValue, normalizedVariation].some(\n (key) => !isSafeDynamicKey(key),\n )\n ) {\n return;\n }\n\n this.update((state) => {\n const typeEntries = state.names[type] || {};\n state.names[type] = typeEntries;\n\n const variationEntries = typeEntries[normalizedValue] || {};\n typeEntries[normalizedValue] = variationEntries;\n\n const entry = variationEntries[normalizedVariation] ?? {\n proposedNames: {},\n name: null,\n sourceId: null,\n origin: null,\n };\n variationEntries[normalizedVariation] = entry;\n\n callback(entry);\n });\n }\n\n #getCurrentTimeSeconds(): number {\n return Math.round(Date.now() / 1000);\n }\n\n #validateSetNameRequest(request: SetNameRequest) {\n const { name, value, type, sourceId, variation, origin } = request;\n const errorMessages: string[] = [];\n\n this.#validateValue(value, errorMessages);\n this.#validateType(type, errorMessages);\n this.#validateName(name, errorMessages);\n this.#validateSourceId(sourceId, type, name, errorMessages);\n this.#validateVariation(variation, type, errorMessages);\n this.#validateOrigin(origin, name, errorMessages);\n\n if (errorMessages.length) {\n throw new Error(errorMessages.join(' '));\n }\n }\n\n #validateUpdateProposedNamesRequest(request: UpdateProposedNamesRequest) {\n const { value, type, sourceIds, variation } = request;\n const errorMessages: string[] = [];\n\n this.#validateValue(value, errorMessages);\n this.#validateType(type, errorMessages);\n this.#validateSourceIds(sourceIds, type, errorMessages);\n this.#validateDuplicateSourceIds(type, errorMessages);\n this.#validateVariation(variation, type, errorMessages);\n\n if (errorMessages.length) {\n throw new Error(errorMessages.join(' '));\n }\n }\n\n #validateValue(value: string, errorMessages: string[]) {\n if (!value?.length || typeof value !== 'string') {\n errorMessages.push('Must specify a non-empty string for value.');\n }\n }\n\n #validateType(type: NameType, errorMessages: string[]) {\n if (!Object.values(NameType).includes(type)) {\n errorMessages.push(\n `Must specify one of the following types: ${Object.values(\n NameType,\n ).join(', ')}`,\n );\n }\n }\n\n #validateName(name: string | null, errorMessages: string[]) {\n if (name === null) {\n return;\n }\n\n if (!name?.length || typeof name !== 'string') {\n errorMessages.push('Must specify a non-empty string or null for name.');\n }\n }\n\n #validateSourceIds(\n sourceIds: string[] | undefined,\n type: NameType,\n errorMessages: string[],\n ) {\n if (!sourceIds) {\n return;\n }\n\n const allSourceIds = this.#getAllSourceIds(type);\n const missingSourceIds = [];\n\n for (const sourceId of sourceIds) {\n if (!allSourceIds.includes(sourceId)) {\n missingSourceIds.push(sourceId);\n continue;\n }\n }\n\n if (missingSourceIds.length) {\n errorMessages.push(\n `Unknown source IDs for type '${type}': ${missingSourceIds.join(', ')}`,\n );\n }\n }\n\n #validateSourceId(\n sourceId: string | undefined,\n type: NameType,\n name: string | null,\n errorMessages: string[],\n ) {\n if (sourceId === null || sourceId === undefined) {\n return;\n }\n\n if (name === null) {\n errorMessages.push(\n `Cannot specify a source ID when clearing the saved name: ${sourceId}`,\n );\n return;\n }\n\n const allSourceIds = this.#getAllSourceIds(type);\n\n if (!sourceId.length || typeof sourceId !== 'string') {\n errorMessages.push('Must specify a non-empty string for sourceId.');\n return;\n }\n\n if (!allSourceIds.includes(sourceId)) {\n errorMessages.push(`Unknown source ID for type '${type}': ${sourceId}`);\n }\n }\n\n #validateDuplicateSourceIds(type: NameType, errorMessages: string[]) {\n const allSourceIds = this.#getAllSourceIds(type);\n\n const duplicateSourceIds = allSourceIds.filter(\n (sourceId, index) => allSourceIds.indexOf(sourceId) !== index,\n );\n\n if (duplicateSourceIds.length) {\n errorMessages.push(\n `Duplicate source IDs found for type '${type}': ${duplicateSourceIds.join(\n ', ',\n )}`,\n );\n }\n }\n\n #validateVariation(\n variation: string | undefined,\n type: string,\n errorMessages: string[],\n ) {\n if (type !== NameType.ETHEREUM_ADDRESS) {\n return;\n }\n\n if (\n !variation?.length ||\n typeof variation !== 'string' ||\n (!variation.match(/^0x[0-9A-Fa-f]+$/u) &&\n variation !== FALLBACK_VARIATION)\n ) {\n errorMessages.push(\n `Must specify a chain ID in hexidecimal format or the fallback, \"${FALLBACK_VARIATION}\", for variation when using '${type}' type.`,\n );\n }\n }\n\n #validateOrigin(\n origin: NameOrigin | null | undefined,\n name: string | null,\n errorMessages: string[],\n ) {\n if (!origin) {\n return;\n }\n\n if (name === null) {\n errorMessages.push(\n `Cannot specify an origin when clearing the saved name: ${origin}`,\n );\n return;\n }\n\n if (!Object.values(NameOrigin).includes(origin)) {\n errorMessages.push(\n `Must specify one of the following origins: ${Object.values(\n NameOrigin,\n ).join(', ')}`,\n );\n }\n }\n\n #getAllSourceIds(type: NameType): string[] {\n return (\n this.#providers\n /* istanbul ignore next */\n .map((provider) => this.#getSourceIds(provider, type))\n .flat()\n );\n }\n\n #getSourceIds(provider: NameProvider, type: NameType): string[] {\n return provider.getMetadata().sourceIds[type];\n }\n\n #removeDormantProposedNames(\n proposedNames: Record<string, ProposedNamesEntry>,\n type: NameType,\n ) {\n if (Object.keys(proposedNames).length === 0) {\n return;\n }\n\n const typeSourceIds = this.#getAllSourceIds(type);\n\n const dormantSourceIds = Object.keys(proposedNames).filter(\n (sourceId) => !typeSourceIds.includes(sourceId),\n );\n\n for (const dormantSourceId of dormantSourceIds) {\n delete proposedNames[dormantSourceId];\n }\n }\n\n #removeExpiredEntries(): void {\n const currentTime = this.#getCurrentTimeSeconds();\n\n this.update((state: NameControllerState) => {\n const entries = this.#getEntriesList(state);\n for (const { nameType, value, variation, entry } of entries) {\n if (entry.name !== null) {\n continue;\n }\n\n const proposedNames = Object.values(entry.proposedNames);\n const allProposedNamesExpired = proposedNames.every(\n (proposedName: ProposedNamesEntry) =>\n currentTime - (proposedName.lastRequestTime ?? 0) >=\n PROPOSED_NAME_EXPIRE_DURATION,\n );\n\n if (allProposedNamesExpired) {\n delete state.names[nameType][value][variation];\n }\n }\n });\n }\n\n #getEntriesList(state: NameControllerState): {\n nameType: NameType;\n value: string;\n variation: string;\n entry: NameEntry;\n }[] {\n return Object.entries(state.names).flatMap(([type, typeEntries]) =>\n Object.entries(typeEntries).flatMap(([value, variationEntries]) =>\n Object.entries(variationEntries).map(([variation, entry]) => ({\n entry,\n nameType: type as NameType,\n value,\n variation,\n })),\n ),\n );\n }\n}\n"]}
@@ -39,7 +39,7 @@ var TokenNameProvider = class {
39
39
  };
40
40
  }
41
41
  const { value, variation: chainId } = request;
42
- const url = `https://token-api.metaswap.codefi.network/token/${chainId}?address=${value}`;
42
+ const url = `https://token.api.cx.metamask.io/token/${chainId}?address=${value}`;
43
43
  log("Sending request", url);
44
44
  try {
45
45
  const responseData = await _chunkJHYBLEC5js.handleFetch.call(void 0, url);
@@ -64,4 +64,4 @@ _isEnabled = new WeakMap();
64
64
 
65
65
 
66
66
  exports.TokenNameProvider = TokenNameProvider;
67
- //# sourceMappingURL=chunk-Z6YC2DHC.js.map
67
+ //# sourceMappingURL=chunk-ST2ADXPO.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/providers/token.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAUA,IAAM,KAAK;AACX,IAAM,QAAQ;AAEd,IAAM,MAAM,mBAAmB,eAAe,OAAO;AAbrD;AAeO,IAAM,oBAAN,MAAgD;AAAA,EAGrD,YAAY,EAAE,UAAU,IAAmC,CAAC,GAAG;AAF/D;AAGE,uBAAK,YAAa,cAAc,MAAM;AAAA,EACxC;AAAA,EAEA,cAAoC;AAClC,WAAO;AAAA,MACL,WAAW,EAAE,yCAA0B,GAAG,CAAC,EAAE,EAAE;AAAA,MAC/C,cAAc,EAAE,CAAC,EAAE,GAAG,MAAM;AAAA,IAC9B;AAAA,EACF;AAAA,EAEA,MAAM,iBACJ,SAC6B;AAC7B,QAAI,CAAC,mBAAK,YAAL,YAAmB;AACtB,UAAI,8BAA8B;AAElC,aAAO;AAAA,QACL,SAAS;AAAA,UACP,CAAC,EAAE,GAAG;AAAA,YACJ,eAAe,CAAC;AAAA,UAClB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEA,UAAM,EAAE,OAAO,WAAW,QAAQ,IAAI;AACtC,UAAM,MAAM,mDAAmD,OAAO,YAAY,KAAK;AAEvF,QAAI,mBAAmB,GAAG;AAE1B,QAAI;AACF,YAAM,eAAe,MAAM,YAAY,GAAG;AAC1C,YAAM,eAAe,aAAa;AAClC,YAAM,gBAAgB,eAAe,CAAC,YAAY,IAAI,CAAC;AAEvD,UAAI,sBAAsB,aAAa;AAEvC,aAAO;AAAA,QACL,SAAS;AAAA,UACP,CAAC,EAAE,GAAG;AAAA,YACJ;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF,SAAS,OAAO;AACd,UAAI,kBAAkB,KAAK;AAC3B,YAAM;AAAA,IACR;AAAA,EACF;AACF;AApDE","sourcesContent":["import { createModuleLogger, projectLogger } from '../logger';\nimport type {\n NameProvider,\n NameProviderMetadata,\n NameProviderRequest,\n NameProviderResult,\n} from '../types';\nimport { NameType } from '../types';\nimport { handleFetch } from '../util';\n\nconst ID = 'token';\nconst LABEL = 'Blockchain (Token Name)';\n\nconst log = createModuleLogger(projectLogger, 'token');\n\nexport class TokenNameProvider implements NameProvider {\n #isEnabled: () => boolean;\n\n constructor({ isEnabled }: { isEnabled?: () => boolean } = {}) {\n this.#isEnabled = isEnabled || (() => true);\n }\n\n getMetadata(): NameProviderMetadata {\n return {\n sourceIds: { [NameType.ETHEREUM_ADDRESS]: [ID] },\n sourceLabels: { [ID]: LABEL },\n };\n }\n\n async getProposedNames(\n request: NameProviderRequest,\n ): Promise<NameProviderResult> {\n if (!this.#isEnabled()) {\n log('Skipping request as disabled');\n\n return {\n results: {\n [ID]: {\n proposedNames: [],\n },\n },\n };\n }\n\n const { value, variation: chainId } = request;\n const url = `https://token-api.metaswap.codefi.network/token/${chainId}?address=${value}`;\n\n log('Sending request', url);\n\n try {\n const responseData = await handleFetch(url);\n const proposedName = responseData.name;\n const proposedNames = proposedName ? [proposedName] : [];\n\n log('New proposed names', proposedNames);\n\n return {\n results: {\n [ID]: {\n proposedNames,\n },\n },\n };\n } catch (error) {\n log('Request failed', error);\n throw error;\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/providers/token.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAUA,IAAM,KAAK;AACX,IAAM,QAAQ;AAEd,IAAM,MAAM,mBAAmB,eAAe,OAAO;AAbrD;AAeO,IAAM,oBAAN,MAAgD;AAAA,EAGrD,YAAY,EAAE,UAAU,IAAmC,CAAC,GAAG;AAF/D;AAGE,uBAAK,YAAa,cAAc,MAAM;AAAA,EACxC;AAAA,EAEA,cAAoC;AAClC,WAAO;AAAA,MACL,WAAW,EAAE,yCAA0B,GAAG,CAAC,EAAE,EAAE;AAAA,MAC/C,cAAc,EAAE,CAAC,EAAE,GAAG,MAAM;AAAA,IAC9B;AAAA,EACF;AAAA,EAEA,MAAM,iBACJ,SAC6B;AAC7B,QAAI,CAAC,mBAAK,YAAL,YAAmB;AACtB,UAAI,8BAA8B;AAElC,aAAO;AAAA,QACL,SAAS;AAAA,UACP,CAAC,EAAE,GAAG;AAAA,YACJ,eAAe,CAAC;AAAA,UAClB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEA,UAAM,EAAE,OAAO,WAAW,QAAQ,IAAI;AACtC,UAAM,MAAM,0CAA0C,OAAO,YAAY,KAAK;AAE9E,QAAI,mBAAmB,GAAG;AAE1B,QAAI;AACF,YAAM,eAAe,MAAM,YAAY,GAAG;AAC1C,YAAM,eAAe,aAAa;AAClC,YAAM,gBAAgB,eAAe,CAAC,YAAY,IAAI,CAAC;AAEvD,UAAI,sBAAsB,aAAa;AAEvC,aAAO;AAAA,QACL,SAAS;AAAA,UACP,CAAC,EAAE,GAAG;AAAA,YACJ;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF,SAAS,OAAO;AACd,UAAI,kBAAkB,KAAK;AAC3B,YAAM;AAAA,IACR;AAAA,EACF;AACF;AApDE","sourcesContent":["import { createModuleLogger, projectLogger } from '../logger';\nimport type {\n NameProvider,\n NameProviderMetadata,\n NameProviderRequest,\n NameProviderResult,\n} from '../types';\nimport { NameType } from '../types';\nimport { handleFetch } from '../util';\n\nconst ID = 'token';\nconst LABEL = 'Blockchain (Token Name)';\n\nconst log = createModuleLogger(projectLogger, 'token');\n\nexport class TokenNameProvider implements NameProvider {\n #isEnabled: () => boolean;\n\n constructor({ isEnabled }: { isEnabled?: () => boolean } = {}) {\n this.#isEnabled = isEnabled || (() => true);\n }\n\n getMetadata(): NameProviderMetadata {\n return {\n sourceIds: { [NameType.ETHEREUM_ADDRESS]: [ID] },\n sourceLabels: { [ID]: LABEL },\n };\n }\n\n async getProposedNames(\n request: NameProviderRequest,\n ): Promise<NameProviderResult> {\n if (!this.#isEnabled()) {\n log('Skipping request as disabled');\n\n return {\n results: {\n [ID]: {\n proposedNames: [],\n },\n },\n };\n }\n\n const { value, variation: chainId } = request;\n const url = `https://token.api.cx.metamask.io/token/${chainId}?address=${value}`;\n\n log('Sending request', url);\n\n try {\n const responseData = await handleFetch(url);\n const proposedName = responseData.name;\n const proposedNames = proposedName ? [proposedName] : [];\n\n log('New proposed names', proposedNames);\n\n return {\n results: {\n [ID]: {\n proposedNames,\n },\n },\n };\n } catch (error) {\n log('Request failed', error);\n throw error;\n }\n }\n}\n"]}
@@ -39,7 +39,7 @@ var TokenNameProvider = class {
39
39
  };
40
40
  }
41
41
  const { value, variation: chainId } = request;
42
- const url = `https://token-api.metaswap.codefi.network/token/${chainId}?address=${value}`;
42
+ const url = `https://token.api.cx.metamask.io/token/${chainId}?address=${value}`;
43
43
  log("Sending request", url);
44
44
  try {
45
45
  const responseData = await handleFetch(url);
@@ -64,4 +64,4 @@ _isEnabled = new WeakMap();
64
64
  export {
65
65
  TokenNameProvider
66
66
  };
67
- //# sourceMappingURL=chunk-EOUDE5KM.mjs.map
67
+ //# sourceMappingURL=chunk-WHDNAWDA.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/providers/token.ts"],"sourcesContent":["import { createModuleLogger, projectLogger } from '../logger';\nimport type {\n NameProvider,\n NameProviderMetadata,\n NameProviderRequest,\n NameProviderResult,\n} from '../types';\nimport { NameType } from '../types';\nimport { handleFetch } from '../util';\n\nconst ID = 'token';\nconst LABEL = 'Blockchain (Token Name)';\n\nconst log = createModuleLogger(projectLogger, 'token');\n\nexport class TokenNameProvider implements NameProvider {\n #isEnabled: () => boolean;\n\n constructor({ isEnabled }: { isEnabled?: () => boolean } = {}) {\n this.#isEnabled = isEnabled || (() => true);\n }\n\n getMetadata(): NameProviderMetadata {\n return {\n sourceIds: { [NameType.ETHEREUM_ADDRESS]: [ID] },\n sourceLabels: { [ID]: LABEL },\n };\n }\n\n async getProposedNames(\n request: NameProviderRequest,\n ): Promise<NameProviderResult> {\n if (!this.#isEnabled()) {\n log('Skipping request as disabled');\n\n return {\n results: {\n [ID]: {\n proposedNames: [],\n },\n },\n };\n }\n\n const { value, variation: chainId } = request;\n const url = `https://token.api.cx.metamask.io/token/${chainId}?address=${value}`;\n\n log('Sending request', url);\n\n try {\n const responseData = await handleFetch(url);\n const proposedName = responseData.name;\n const proposedNames = proposedName ? [proposedName] : [];\n\n log('New proposed names', proposedNames);\n\n return {\n results: {\n [ID]: {\n proposedNames,\n },\n },\n };\n } catch (error) {\n log('Request failed', error);\n throw error;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAUA,IAAM,KAAK;AACX,IAAM,QAAQ;AAEd,IAAM,MAAM,mBAAmB,eAAe,OAAO;AAbrD;AAeO,IAAM,oBAAN,MAAgD;AAAA,EAGrD,YAAY,EAAE,UAAU,IAAmC,CAAC,GAAG;AAF/D;AAGE,uBAAK,YAAa,cAAc,MAAM;AAAA,EACxC;AAAA,EAEA,cAAoC;AAClC,WAAO;AAAA,MACL,WAAW,EAAE,yCAA0B,GAAG,CAAC,EAAE,EAAE;AAAA,MAC/C,cAAc,EAAE,CAAC,EAAE,GAAG,MAAM;AAAA,IAC9B;AAAA,EACF;AAAA,EAEA,MAAM,iBACJ,SAC6B;AAC7B,QAAI,CAAC,mBAAK,YAAL,YAAmB;AACtB,UAAI,8BAA8B;AAElC,aAAO;AAAA,QACL,SAAS;AAAA,UACP,CAAC,EAAE,GAAG;AAAA,YACJ,eAAe,CAAC;AAAA,UAClB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEA,UAAM,EAAE,OAAO,WAAW,QAAQ,IAAI;AACtC,UAAM,MAAM,0CAA0C,OAAO,YAAY,KAAK;AAE9E,QAAI,mBAAmB,GAAG;AAE1B,QAAI;AACF,YAAM,eAAe,MAAM,YAAY,GAAG;AAC1C,YAAM,eAAe,aAAa;AAClC,YAAM,gBAAgB,eAAe,CAAC,YAAY,IAAI,CAAC;AAEvD,UAAI,sBAAsB,aAAa;AAEvC,aAAO;AAAA,QACL,SAAS;AAAA,UACP,CAAC,EAAE,GAAG;AAAA,YACJ;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF,SAAS,OAAO;AACd,UAAI,kBAAkB,KAAK;AAC3B,YAAM;AAAA,IACR;AAAA,EACF;AACF;AApDE;","names":[]}
package/dist/index.js CHANGED
@@ -3,13 +3,13 @@
3
3
  var _chunkW64QIPGBjs = require('./chunk-W64QIPGB.js');
4
4
 
5
5
 
6
- var _chunkZ6YC2DHCjs = require('./chunk-Z6YC2DHC.js');
6
+ var _chunkST2ADXPOjs = require('./chunk-ST2ADXPO.js');
7
7
 
8
8
 
9
9
 
10
10
 
11
11
 
12
- var _chunkB2WJNTJSjs = require('./chunk-B2WJNTJS.js');
12
+ var _chunkPL2KMW2Yjs = require('./chunk-PL2KMW2Y.js');
13
13
 
14
14
 
15
15
  var _chunkRYIUDJOIjs = require('./chunk-RYIUDJOI.js');
@@ -33,5 +33,5 @@ require('./chunk-Z4BLTVTB.js');
33
33
 
34
34
 
35
35
 
36
- exports.ENSNameProvider = _chunkRYIUDJOIjs.ENSNameProvider; exports.EtherscanNameProvider = _chunkX55IV67Mjs.EtherscanNameProvider; exports.FALLBACK_VARIATION = _chunkB2WJNTJSjs.FALLBACK_VARIATION; exports.LensNameProvider = _chunkW64QIPGBjs.LensNameProvider; exports.NameController = _chunkB2WJNTJSjs.NameController; exports.NameOrigin = _chunkB2WJNTJSjs.NameOrigin; exports.NameType = _chunkPL7IXD33js.NameType; exports.PROPOSED_NAME_EXPIRE_DURATION = _chunkB2WJNTJSjs.PROPOSED_NAME_EXPIRE_DURATION; exports.TokenNameProvider = _chunkZ6YC2DHCjs.TokenNameProvider;
36
+ exports.ENSNameProvider = _chunkRYIUDJOIjs.ENSNameProvider; exports.EtherscanNameProvider = _chunkX55IV67Mjs.EtherscanNameProvider; exports.FALLBACK_VARIATION = _chunkPL2KMW2Yjs.FALLBACK_VARIATION; exports.LensNameProvider = _chunkW64QIPGBjs.LensNameProvider; exports.NameController = _chunkPL2KMW2Yjs.NameController; exports.NameOrigin = _chunkPL2KMW2Yjs.NameOrigin; exports.NameType = _chunkPL7IXD33js.NameType; exports.PROPOSED_NAME_EXPIRE_DURATION = _chunkPL2KMW2Yjs.PROPOSED_NAME_EXPIRE_DURATION; exports.TokenNameProvider = _chunkST2ADXPOjs.TokenNameProvider;
37
37
  //# sourceMappingURL=index.js.map
package/dist/index.mjs CHANGED
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk-WSOVXHAC.mjs";
4
4
  import {
5
5
  TokenNameProvider
6
- } from "./chunk-EOUDE5KM.mjs";
6
+ } from "./chunk-WHDNAWDA.mjs";
7
7
  import {
8
8
  FALLBACK_VARIATION,
9
9
  NameController,
10
10
  NameOrigin,
11
11
  PROPOSED_NAME_EXPIRE_DURATION
12
- } from "./chunk-GJYKWMRC.mjs";
12
+ } from "./chunk-6AVJOVIX.mjs";
13
13
  import {
14
14
  ENSNameProvider
15
15
  } from "./chunk-BLG7EQAA.mjs";
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkZ6YC2DHCjs = require('../chunk-Z6YC2DHC.js');
3
+ var _chunkST2ADXPOjs = require('../chunk-ST2ADXPO.js');
4
4
  require('../chunk-JHYBLEC5.js');
5
5
  require('../chunk-QBR7BSWB.js');
6
6
  require('../chunk-PL7IXD33.js');
7
7
  require('../chunk-Z4BLTVTB.js');
8
8
 
9
9
 
10
- exports.TokenNameProvider = _chunkZ6YC2DHCjs.TokenNameProvider;
10
+ exports.TokenNameProvider = _chunkST2ADXPOjs.TokenNameProvider;
11
11
  //# sourceMappingURL=token.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TokenNameProvider
3
- } from "../chunk-EOUDE5KM.mjs";
3
+ } from "../chunk-WHDNAWDA.mjs";
4
4
  import "../chunk-DSVOMJX6.mjs";
5
5
  import "../chunk-L244TFFU.mjs";
6
6
  import "../chunk-6W3DEAGA.mjs";
@@ -1 +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","../src/types.ts","../src/NameController.ts","../src/constants.ts","../src/logger.ts","../src/providers/ens.ts","../../../node_modules/async-mutex/lib/MutexInterface.d.ts","../../../node_modules/async-mutex/lib/Mutex.d.ts","../../../node_modules/async-mutex/lib/SemaphoreInterface.d.ts","../../../node_modules/async-mutex/lib/Semaphore.d.ts","../../../node_modules/async-mutex/lib/withTimeout.d.ts","../../../node_modules/async-mutex/lib/index.d.ts","../src/util.ts","../src/providers/etherscan.ts","../src/providers/token.ts","../src/providers/lens.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/bn.js/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/uuid/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",{"version":"e2c94e81cdfe8a18b57378c0aed021497bb58c2a2c34283efcf723eb318fc55b","signature":"afcbd5d06f667069c1dc56ffe60f8bef811485ff72216b15f1a1fe0495101975"},{"version":"ff2de120ee7e60bb86b5a9a9f01c591e126b0d0de4160803ed75cf32e0e579a5","signature":"3bbe4bc3533e832b996ac19dbed75ed666d27f0e8aa022377f7388195c7836e1"},{"version":"b981686b9fda8ce4f3bdf506ca23bcdf23fd125bb6b0ce0b43019c58eedea0dd","signature":"be0385c870e46e811bdc18c7451911616492b31619f5cde9687e0f56880279d5"},{"version":"1ca812bf578d708a4bdfff972ac150578bcb2236e559331f67de774a3a23f59d","signature":"7bd3844e77367d48f1f9ea69d39b92ff9d086dc499da91fe8df78406b2e3f1fc"},{"version":"fba62525bd983a696757b61a723ec8fefd84187ce720a543b2ba37115da25952","signature":"ed8f950427563bfda16a940b1c576674331263ebdea00b30159a76709bda90c0"},"72e7be5040a865e113cf78e17eba90499c44607a6a59d0d9b6f843369167523c","0d2acd3a3840418f280e10b2adc0154848f4a162ab6a6466cbf5d0210200a6f8","08417035838838db86f31bd576b1fe246be76c1507b8fc1f2eec744c0d0d125e","b78647f4fd09671f9e7502612cf5f0c072ab2ec917312810d36927fcdeeb5a7c","d6b58d955981bc1742501b792f1ab9f4cba0c4611f28dcf1c99376c1c33c9f9c","0cb9cfa126435d30332ff00441e0db904e55dccb5b1fa7220eaf024e7f425eeb",{"version":"69c8b283250442a2c6fb150ba550ae474ef546d58b5db632350215836ea04a5e","signature":"ff78e2b5e72e4a547f8cde31baf018a86cd816341ef0b4a442701072065176cd"},{"version":"6b40c558ddb094c75e956adf8578b96a86207fb2818327099e27f105ed653c82","signature":"70f81384e2a4a6cfb33b412e01de1edb5aba996561765de7a693eb86378e8ae3"},{"version":"2717a64c9b1c16ad805e4a97b1b5932a3b3f431373e6c37743228f902cfe10d4","signature":"96a1670b02d165b1c88e9f612dd5a777ea0acd9a45a2ea8d58065167b85035d8"},{"version":"f2e5126db9fc35529e8feccb307852ba27995fcb2f31ed4ec9b0425705b3008b","signature":"dd49ef44e602db5d02a95eb385b8f95ee123406eb7241b3a816608b54c9cb855"},"3cb1269984968e387c4686adc3f6ad19ff05a3831e0f4dac0955af88d4619f69","a5aaeca001d2f69093d04aac4db321e4c338fd9b20cbc4f0b0af3dc6ae0f235b","cc957354aa3c94c9961ebf46282cfde1e81d107fc5785a61f62c67f1dd3ac2eb","8041cfce439ff29d339742389de04c136e3029d6b1817f07b2d7fcbfb7534990","93de1c6dab503f053efe8d304cb522bb3a89feab8c98f307a674a4fae04773e9","29a46d003ca3c721e6405f00dee7e3de91b14e09701eba5d887bf76fb2d47d38","069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","8aceb205dcc6f814ad99635baf1e40b6e01d06d3fe27b72fd766c6d0b8c0c600","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","fab58e600970e66547644a44bc9918e3223aa2cbd9e8763cec004b2cfb48827e","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,203],[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],[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,203,204,205,206,207],[119,203,205],[119,155],[119,211,212,213],[91,119,126],[119,216],[119,217],[119,228],[119,222,227],[119,231,233,234,235,236,237,238,239,240,241,242,243],[119,231,232,234,235,236,237,238,239,240,241,242,243],[119,232,233,234,235,236,237,238,239,240,241,242,243],[119,231,232,233,235,236,237,238,239,240,241,242,243],[119,231,232,233,234,236,237,238,239,240,241,242,243],[119,231,232,233,234,235,237,238,239,240,241,242,243],[119,231,232,233,234,235,236,238,239,240,241,242,243],[119,231,232,233,234,235,236,237,239,240,241,242,243],[119,231,232,233,234,235,236,237,238,240,241,242,243],[119,231,232,233,234,235,236,237,238,239,241,242,243],[119,231,232,233,234,235,236,237,238,239,240,242,243],[119,231,232,233,234,235,236,237,238,239,240,241,243],[119,231,232,233,234,235,236,237,238,239,240,241,242],[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,249],[119,252,291],[119,252,276,291],[119,291],[119,252],[119,252,277,291],[119,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290],[119,277,291],[119,292],[119,296],[119,192],[119,194],[119,192,193,194,195,196],[119,192,194],[119,177],[119,177,178,179,180,181],[119,166,167,168,169,170,171,172,173,174,175,176],[119,220,223],[119,220,223,224,225],[119,222],[119,219,226],[119,221],[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,186,187],[119,187,188,191,199,200,201],[119,165],[119,187,190],[119,187,189,190,197,198],[119,187,190,198],[186,187],[156,165],[187]],"referencedMap":[[205,1],[203,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],[64,18],[65,18],[67,19],[68,18],[69,18],[70,20],[71,2],[72,2],[73,2],[66,18],[165,21],[74,22],[154,23],[157,24],[158,2],[159,2],[160,2],[161,2],[162,2],[163,25],[164,26],[208,27],[204,1],[206,28],[207,1],[209,12],[156,29],[210,2],[211,2],[214,30],[212,2],[215,31],[216,2],[217,32],[218,33],[229,34],[228,35],[213,2],[230,2],[232,36],[233,37],[231,38],[234,39],[235,40],[236,41],[237,42],[238,43],[239,44],[240,45],[241,46],[242,47],[243,48],[244,2],[155,2],[75,49],[76,49],[78,50],[79,51],[80,52],[81,53],[82,54],[83,55],[84,56],[85,57],[86,58],[87,59],[88,59],[89,60],[90,61],[91,62],[92,63],[77,2],[125,2],[93,64],[94,65],[95,66],[126,67],[96,68],[97,69],[98,70],[99,71],[100,72],[101,73],[102,74],[103,75],[104,76],[105,77],[106,78],[107,79],[109,80],[108,81],[110,82],[111,83],[112,2],[113,84],[114,85],[115,86],[116,87],[117,88],[118,89],[119,90],[120,91],[121,92],[122,93],[123,94],[124,95],[245,2],[246,12],[247,2],[248,2],[250,96],[249,2],[251,12],[276,97],[277,98],[252,99],[255,99],[274,97],[275,97],[265,97],[264,100],[262,97],[257,97],[270,97],[268,97],[272,97],[256,97],[269,97],[273,97],[258,97],[259,97],[271,97],[253,97],[260,97],[261,97],[263,97],[267,97],[278,101],[266,97],[254,97],[291,102],[290,2],[285,101],[287,103],[286,101],[279,101],[280,101],[282,101],[284,101],[288,103],[289,103],[281,103],[283,103],[293,104],[292,2],[294,2],[295,2],[296,2],[297,105],[193,106],[192,2],[195,107],[194,2],[197,108],[196,109],[129,2],[219,2],[176,2],[173,110],[175,110],[174,110],[172,110],[182,111],[177,112],[181,2],[178,2],[180,2],[179,2],[168,110],[169,110],[170,110],[166,2],[167,2],[171,110],[220,2],[224,113],[226,114],[225,113],[223,115],[227,116],[222,117],[221,2],[56,2],[63,118],[58,119],[59,120],[60,120],[61,121],[62,121],[57,122],[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,123],[184,124],[183,125],[186,126],[188,127],[189,2],[202,128],[190,129],[191,130],[199,131],[201,132],[200,132],[187,2],[198,2],[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":[[205,1],[203,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],[64,18],[65,18],[67,19],[68,18],[69,18],[70,20],[71,2],[72,2],[73,2],[66,18],[165,21],[74,22],[154,23],[157,24],[158,2],[159,2],[160,2],[161,2],[162,2],[163,25],[164,26],[208,27],[204,1],[206,28],[207,1],[209,12],[156,29],[210,2],[211,2],[214,30],[212,2],[215,31],[216,2],[217,32],[218,33],[229,34],[228,35],[213,2],[230,2],[232,36],[233,37],[231,38],[234,39],[235,40],[236,41],[237,42],[238,43],[239,44],[240,45],[241,46],[242,47],[243,48],[244,2],[155,2],[75,49],[76,49],[78,50],[79,51],[80,52],[81,53],[82,54],[83,55],[84,56],[85,57],[86,58],[87,59],[88,59],[89,60],[90,61],[91,62],[92,63],[77,2],[125,2],[93,64],[94,65],[95,66],[126,67],[96,68],[97,69],[98,70],[99,71],[100,72],[101,73],[102,74],[103,75],[104,76],[105,77],[106,78],[107,79],[109,80],[108,81],[110,82],[111,83],[112,2],[113,84],[114,85],[115,86],[116,87],[117,88],[118,89],[119,90],[120,91],[121,92],[122,93],[123,94],[124,95],[245,2],[246,12],[247,2],[248,2],[250,96],[249,2],[251,12],[276,97],[277,98],[252,99],[255,99],[274,97],[275,97],[265,97],[264,100],[262,97],[257,97],[270,97],[268,97],[272,97],[256,97],[269,97],[273,97],[258,97],[259,97],[271,97],[253,97],[260,97],[261,97],[263,97],[267,97],[278,101],[266,97],[254,97],[291,102],[290,2],[285,101],[287,103],[286,101],[279,101],[280,101],[282,101],[284,101],[288,103],[289,103],[281,103],[283,103],[293,104],[292,2],[294,2],[295,2],[296,2],[297,105],[193,106],[192,2],[195,107],[194,2],[197,108],[196,109],[129,2],[219,2],[176,2],[173,110],[175,110],[174,110],[172,110],[182,111],[177,112],[181,2],[178,2],[180,2],[179,2],[168,110],[169,110],[170,110],[166,2],[167,2],[171,110],[220,2],[224,113],[226,114],[225,113],[223,115],[227,116],[222,117],[221,2],[56,2],[63,118],[58,119],[59,120],[60,120],[61,121],[62,121],[57,122],[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,123],[184,124],[183,125],[186,126],[188,133],[202,128],[190,134],[191,135],[199,135],[201,135],[200,135],[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":[205,203,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,64,65,67,68,69,70,71,72,73,66,165,74,154,157,158,159,160,161,162,163,164,208,204,206,207,209,156,210,211,214,212,215,216,217,218,229,228,213,230,232,233,231,234,235,236,237,238,239,240,241,242,243,244,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,245,246,247,248,250,249,251,276,277,252,255,274,275,265,264,262,257,270,268,272,256,269,273,258,259,271,253,260,261,263,267,278,266,254,291,290,285,287,286,279,280,282,284,288,289,281,283,293,292,294,295,296,297,193,192,195,194,197,196,129,219,176,173,175,174,172,182,177,181,178,180,179,168,169,170,166,167,171,220,224,226,225,223,227,222,221,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,189,202,190,191,199,201,200,187,198,46,47,48,49,50,51,42,52,53,54,43,44,45],"latestChangedDtsFile":"./types/index.d.ts"},"version":"4.8.4"}
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.es2019.intl.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/assert.d.ts","../../../node_modules/@types/node/assert/strict.d.ts","../../../node_modules/@types/node/globals.d.ts","../../../node_modules/@types/node/async_hooks.d.ts","../../../node_modules/@types/node/buffer.d.ts","../../../node_modules/@types/node/child_process.d.ts","../../../node_modules/@types/node/cluster.d.ts","../../../node_modules/@types/node/console.d.ts","../../../node_modules/@types/node/constants.d.ts","../../../node_modules/@types/node/crypto.d.ts","../../../node_modules/@types/node/dgram.d.ts","../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../node_modules/@types/node/dns.d.ts","../../../node_modules/@types/node/dns/promises.d.ts","../../../node_modules/@types/node/dom-events.d.ts","../../../node_modules/@types/node/domain.d.ts","../../../node_modules/@types/node/events.d.ts","../../../node_modules/@types/node/fs.d.ts","../../../node_modules/@types/node/fs/promises.d.ts","../../../node_modules/@types/node/http.d.ts","../../../node_modules/@types/node/http2.d.ts","../../../node_modules/@types/node/https.d.ts","../../../node_modules/@types/node/inspector.d.ts","../../../node_modules/@types/node/module.d.ts","../../../node_modules/@types/node/net.d.ts","../../../node_modules/@types/node/os.d.ts","../../../node_modules/@types/node/path.d.ts","../../../node_modules/@types/node/perf_hooks.d.ts","../../../node_modules/@types/node/process.d.ts","../../../node_modules/@types/node/punycode.d.ts","../../../node_modules/@types/node/querystring.d.ts","../../../node_modules/@types/node/readline.d.ts","../../../node_modules/@types/node/repl.d.ts","../../../node_modules/@types/node/stream.d.ts","../../../node_modules/@types/node/stream/promises.d.ts","../../../node_modules/@types/node/stream/consumers.d.ts","../../../node_modules/@types/node/stream/web.d.ts","../../../node_modules/@types/node/string_decoder.d.ts","../../../node_modules/@types/node/test.d.ts","../../../node_modules/@types/node/timers.d.ts","../../../node_modules/@types/node/timers/promises.d.ts","../../../node_modules/@types/node/tls.d.ts","../../../node_modules/@types/node/trace_events.d.ts","../../../node_modules/@types/node/tty.d.ts","../../../node_modules/@types/node/url.d.ts","../../../node_modules/@types/node/util.d.ts","../../../node_modules/@types/node/v8.d.ts","../../../node_modules/@types/node/vm.d.ts","../../../node_modules/@types/node/wasi.d.ts","../../../node_modules/@types/node/worker_threads.d.ts","../../../node_modules/@types/node/zlib.d.ts","../../../node_modules/@types/node/globals.global.d.ts","../../../node_modules/@types/node/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/utils.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","../src/types.ts","../src/NameController.ts","../src/constants.ts","../src/logger.ts","../src/providers/ens.ts","../../../node_modules/async-mutex/lib/MutexInterface.d.ts","../../../node_modules/async-mutex/lib/Mutex.d.ts","../../../node_modules/async-mutex/lib/SemaphoreInterface.d.ts","../../../node_modules/async-mutex/lib/Semaphore.d.ts","../../../node_modules/async-mutex/lib/withTimeout.d.ts","../../../node_modules/async-mutex/lib/tryAcquire.d.ts","../../../node_modules/async-mutex/lib/errors.d.ts","../../../node_modules/async-mutex/lib/index.d.ts","../src/util.ts","../src/providers/etherscan.ts","../src/providers/token.ts","../src/providers/lens.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/uuid/index.d.ts","../../../node_modules/@types/yargs-parser/index.d.ts","../../../node_modules/@types/yargs/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","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":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","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":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","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","75b22c74010ba649de1a1676a4c4b8b5bb4294fecd05089e2094429b16d7840c","5615ccf831db2ffc82145243081ebdb60ea8e1005ee8f975d1c0c1401a9c894e","38682ed3630bb6ecdace80d5a9adc811fc20a419f1940446e306c3a020d083b9","cc182e6e4f691cd6f7bf7cb491247a4c7818f9f1cb2db1d45c65ff906e3f741b","a50599c08934a62f11657bdbe0dc929ab66da1b1f09974408fd9a33ec1bb8060","5a20e7d6c630b91be15e9b837853173829d00273197481dc8d3e94df61105a71","8d478048d71cc16f806d4b71b252ecb67c7444ccf4f4b09b29a312712184f859","e0eda929c6b9b628cdeb0e54cd3582cb97e64f28aab34612fc1431c545899584","9df4662ca3dbc2522bc115833ee04faa1afbb4e249a85ef4a0a09c621346bd08","b25d9065cf1c1f537a140bbc508e953ed2262f77134574c432d206ff36f4bdbf","1b103313097041aa9cd705a682c652f08613cb5cf8663321061c0902f845e81c","68ccec8662818911d8a12b8ed028bc5729fb4f1d34793c4701265ba60bc73cf4","5f85b8b79dc4d36af672c035b2beb71545de63a5d60bccbeee64c260941672ab","b3d48529ae61dc27d0bfbfa2cb3e0dff8189644bd155bdf5df1e8e14669f7043","40fe4b689225816b31fe5794c0fbf3534568819709e40295ead998a2bc1ab237","f65b5e33b9ad545a1eebbd6afe857314725ad42aaf069913e33f928ab3e4990a","fb6f2a87beb7fb1f4c2b762d0c76a9459fc91f557231569b0ee21399e22aa13d","31c858dc85996fac4b7fa944e1016d5c72f514930a72357ab5001097bf6511c7","3de30a871b3340be8b679c52aa12f90dd1c8c60874517be58968fdbcc4d79445","6fd985bd31eaf77542625306fb0404d32bff978990f0a06428e5f0b9a3b58109","5b3cd03ae354ea96eff1f74d7c410fe4852e6382227e8b0ecf87ab5e3a5bbcd4","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419",{"version":"056097110efd16869ec118cedb44ecbac9a019576eee808d61304ca6d5cb2cbe","affectsGlobalScope":true},"f51b4042a3ac86f1f707500a9768f88d0b0c1fc3f3e45a73333283dea720cdc6",{"version":"6fb8358e10ed92a7f515b7d79da3904c955a3ffd4e14aa9df6f0ea113041f1cf","affectsGlobalScope":true},"45c831238c6dac21c72da5f335747736a56a3847192bf03c84b958a7e9ec93e2","661a11d16ad2e3543a77c53bcd4017ee9a450f47ab7def3ab493a86eae4d550c",{"version":"8cdc646cec7819581ef343b83855b1bfe4fe674f2c84f4fb8dc90d82fb56bd3a","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","9dd56225cc2d8cb8fe5ceb0043ff386987637e12fecc6078896058a99deae284","2375ed4b439215aa3b6d0c6fd175c78a4384b30cb43cbadaecbf0a18954c98cb","7693b90b3075deaccafd5efb467bf9f2b747a3075be888652ef73e64396d8628","41231da15bb5e3e806a8395bd15c7befd2ec90f9f4e3c9d0ae1356bccb76dbb0","fccfef201d057cb407fa515311bd608549bab6c7b8adcf8f2df31f5d3b796478",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},"5f20d20b7607174caf1a6da9141aeb9f2142159ae2410ca30c7a0fccd1d19c99",{"version":"464762c6213566d072f1ced5e8e9a954785ec5e53883b7397198abb5ef5b8f71","affectsGlobalScope":true},"6387920dc3e18927335b086deec75bf8e50f879a5e273d32ee7bb7a55ba50572","9bba37424094688c4663c177a1379b229f919b8912889a472f32fdc5f08ddb4d","29a4be13b3a30d3e66667b75c58ec61fb2df8fa0422534fdee3cfb30c5dbf450","83366d901beda79d6eb37aaaf6ca248dcd88946302b2a7d975590783be51e88e","bf268a0aea37ad4ae3b7a9b58559190b6fc01ea16a31e35cd05817a0a60f895a","43ec77c369473e92e2ecebf0554a0fdaa9c256644a6070f28228dfcceec77351",{"version":"d7dad6db394a3d9f7b49755e4b610fbf8ed6eb0c9810ae5f1a119f6b5d76de45","affectsGlobalScope":true},"95ed02bacb4502c985b69742ec82a4576d4ff4a6620ecc91593f611d502ae546","bf755525c4e6f85a970b98c4755d98e8aa1b6dbd83a5d8fcc57d3d497351b936","dd67d2b5e4e8a182a38de8e69fb736945eaa4588e0909c14e01a14bd3cc1fd1e",{"version":"28084e15b63e6211769db2fe646d8bc5c4c6776321e0deffe2d12eefd52cb6b9","affectsGlobalScope":true},{"version":"aed37dabf86c99d6c8508700576ecede86688397bc12523541858705a0c737c2","affectsGlobalScope":true},"cc6ef5733d4ea6d2e06310a32dffd2c16418b467c5033d49cecc4f3a25de7497","94768454c3348b6ebe48e45fbad8c92e2bb7af4a35243edbe2b90823d0bd7f9a","0be79b3ff0f16b6c2f9bc8c4cc7097ea417d8d67f8267f7e1eec8e32b548c2ff","1c61ffa3a71b77363b30d19832c269ef62fba787f5610cac7254728d3b69ab2e","84da3c28344e621fd1d591f2c09e9595292d2b70018da28a553268ac122597d4","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","6e191fea1db6e9e4fa828259cf489e820ec9170effff57fb081a2f3295db4722","aed943465fbce1efe49ee16b5ea409050f15cd8eaf116f6fadb64ef0772e7d95","70d08483a67bf7050dbedace398ef3fee9f436fcd60517c97c4c1e22e3c6f3e8","c40fdf7b2e18df49ce0568e37f0292c12807a0748be79e272745e7216bed2606",{"version":"e933de8143e1d12dd51d89b398760fd5a9081896be366dad88a922d0b29f3c69","affectsGlobalScope":true},"4e228e78c1e9b0a75c70588d59288f63a6258e8b1fe4a67b0c53fe03461421d9","b38d55d08708c2410a3039687db70b4a5bfa69fc4845617c313b5a10d9c5c637","205d50c24359ead003dc537b9b65d2a64208dfdffe368f403cf9e0357831db9e","1265fddcd0c68be9d2a3b29805d0280484c961264dd95e0b675f7bd91f777e78",{"version":"a05e2d784c9be7051c4ac87a407c66d2106e23490c18c038bbd0712bde7602fd","affectsGlobalScope":true},{"version":"df90b9d0e9980762da8daf8adf6ffa0c853e76bfd269c377be0d07a9ad87acd2","affectsGlobalScope":true},"cf434b5c04792f62d6f4bdd5e2c8673f36e638e910333c172614d5def9b17f98","1d65d4798df9c2df008884035c41d3e67731f29db5ecb64cd7378797c7c53a2f","0faee6b555890a1cb106e2adc5d3ffd89545b1da894d474e9d436596d654998f","c6c01ea1c42508edf11a36d13b70f6e35774f74355ba5d358354d4a77cc67ea1","867f95abf1df444aab146b19847391fc2f922a55f6a970a27ed8226766cee29f",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b0297b09e607bec9698cac7cf55463d6731406efb1161ee4d448293b47397c84","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","68cc8d6fcc2f270d7108f02f3ebc59480a54615be3e09a47e14527f349e9d53e","3eb11dbf3489064a47a2e1cf9d261b1f100ef0b3b50ffca6c44dd99d6dd81ac1","b17f3bb7d8333479c7e45e5f3d876761b9bca58f97594eca3f6a944fd825e632","3c1f1236cce6d6e0c4e2c1b4371e6f72d7c14842ecd76a98ed0748ee5730c8f3","6d7f58d5ea72d7834946fd7104a734dc7d40661be8b2e1eaced1ddce3268ebaf","4c26222991e6c97d5a8f541d4f2c67585eda9e8b33cf9f52931b098045236e88","277983d414aa99d78655186c3ee1e1c38c302e336aff1d77b47fcdc39d8273fe","47383b45796d525a4039cd22d2840ac55a1ff03a43d027f7f867ba7314a9cf53","6548773b3abbc18de29176c2141f766d4e437e40596ee480447abf83575445ad","6ddd27af0436ce59dd4c1896e2bfdb2bdb2529847d078b83ce67a144dff05491","816264799aef3fd5a09a3b6c25217d5ec26a9dfc7465eac7d6073bcdc7d88f3f","4df0891b133884cd9ed752d31c7d0ec0a09234e9ed5394abffd3c660761598db","b603b62d3dcd31ef757dc7339b4fa8acdbca318b0fb9ac485f9a1351955615f9","e642bd47b75ad6b53cbf0dfd7ddfa0f120bd10193f0c58ec37d87b59bf604aca","be90b24d2ee6f875ce3aaa482e7c41a54278856b03d04212681c4032df62baf9","78f5ff400b3cb37e7b90eef1ff311253ed31c8cb66505e9828fad099bffde021","372c47090e1131305d163469a895ff2938f33fa73aad988df31cd31743f9efb6","71c67dc6987bdbd5599353f90009ff825dd7db0450ef9a0aee5bb0c574d18512","6f12403b5eca6ae7ca8e3efe3eeb9c683b06ce3e3844ccfd04098d83cd7e4957","282c535df88175d64d9df4550d2fd1176fd940c1c6822f1e7584003237f179d3","c3a4752cf103e4c6034d5bd449c8f9d5e7b352d22a5f8f9a41a8efb11646f9c2","11a9e38611ac3c77c74240c58b6bd64a0032128b29354e999650f1de1e034b1c","4ed103ca6fff9cb244f7c4b86d1eb28ce8069c32db720784329946731badb5bb","d738f282842970e058672663311c6875482ee36607c88b98ffb6604fba99cb2a","ec859cd8226aa623e41bbb47c249a55ee16dc1b8647359585244d57d3a5ed0c7","8891c6e959d253a66434ff5dc9ae46058fb3493e84b4ca39f710ef2d350656b1","c4463cf02535444dcbc3e67ecd29f1972490f74e49957d6fd4282a1013796ba6","0cb0a957ff02de0b25fd0f3f37130ca7f22d1e0dea256569c714c1f73c6791f8","2f5075dc512d51786b1ba3b1696565641dfaae3ac854f5f13d61fa12ef81a47e","ca3353cc82b1981f0d25d71d7432d583a6ef882ccdea82d65fbe49af37be51cb","50679a8e27aacf72f8c40bcab15d7ef5e83494089b4726b83eec4554344d5cdc","45351e0d51780b6f4088277a4457b9879506ee2720a887de232df0f1efcb33d8","5d697a4b315cc5bb3042ae869abffd10c3b0d7b182cda0e4c45d8819937e5796","89b040dec8fcfc1de98827e1f4d4977e6ff5d3302c6790e9f10b54b916e1c742","6ee58aa536dabb19b09bc036f1abe83feb51e13d63b23d30b2d0631a2de99b8f","8aceb205dcc6f814ad99635baf1e40b6e01d06d3fe27b72fd766c6d0b8c0c600","299567f84bfedd1468dca2755a829cb19e607a6811673788807dc8921e211bc9","795d9fb85aad92221504db74dd179b506bd189bba0c104426f7e7bb8a66ffee5","1311bc194e0a69fe61031e852c1c0b439e2a2a3d1d5e2d8ff795499b9f283459","4b7ce19369d7e7fae76720c2c6c7f671bf3fa0f7093edb864f1ac358ca7c456c","c972ef44deca1fa8fab465915ffa00f82e126aacf3dfc8979c03b1b066ce5bb6","30285a1011c6d6b52f3ba3abb0a984be8148c05cdefb8eb6eb562335a3991f35",{"version":"e2c94e81cdfe8a18b57378c0aed021497bb58c2a2c34283efcf723eb318fc55b","signature":"d69910d1d26a13ed4ed41ecc95b91c855759a04e1775b1d6b816fea42fbfe63e"},{"version":"81c9dd99e9be4e5800cb18f82cb95cc19e56a779934312a2e6cf172ac963c19b","signature":"64384273b41963e60a0abd234580af672971278cc0a775c866a1ea65dfcd8b3c"},{"version":"b981686b9fda8ce4f3bdf506ca23bcdf23fd125bb6b0ce0b43019c58eedea0dd","signature":"be0385c870e46e811bdc18c7451911616492b31619f5cde9687e0f56880279d5"},{"version":"1ca812bf578d708a4bdfff972ac150578bcb2236e559331f67de774a3a23f59d","signature":"7bd3844e77367d48f1f9ea69d39b92ff9d086dc499da91fe8df78406b2e3f1fc"},{"version":"fba62525bd983a696757b61a723ec8fefd84187ce720a543b2ba37115da25952","signature":"fd93ebabcf33438c0a1e5ad2905e522244a41879d8672f9c1672ed9561343b6d"},"f3815045e126ec1b9d224782805a915ae01876a1c7d1eb9b3e320ffadbd63535","d07557f21b2ad690bfe37864aa28090bd7d01c7152b77938d92d97c8419c7144","b843ea5227a9873512aa1226b546a7e52ea5e922b89461f8b202a2f2a3f0b013","64b4d440f905da272e0568224ef8d62c5cd730755c6d453043f2e606e060ec5a","d6b58d955981bc1742501b792f1ab9f4cba0c4611f28dcf1c99376c1c33c9f9c","f0b9f6d5db82c3d1679f71b187c4451dbc2875ba734ce416a4804ad47390970a","a5c38939c3e22954a7166d80ab931ac6757283737b000f1e6dc924c6f4402b88","31a863da9da2a3edec16665695bdbc3134e853195f82dafec58e98c8e1bb3119",{"version":"69c8b283250442a2c6fb150ba550ae474ef546d58b5db632350215836ea04a5e","signature":"ff78e2b5e72e4a547f8cde31baf018a86cd816341ef0b4a442701072065176cd"},{"version":"6b40c558ddb094c75e956adf8578b96a86207fb2818327099e27f105ed653c82","signature":"70f81384e2a4a6cfb33b412e01de1edb5aba996561765de7a693eb86378e8ae3"},{"version":"c1ddf9f9c9d3010fa5970a04e1e20e741ff5c69ff9f9c686d832049f563338a4","signature":"96a1670b02d165b1c88e9f612dd5a777ea0acd9a45a2ea8d58065167b85035d8"},{"version":"f2e5126db9fc35529e8feccb307852ba27995fcb2f31ed4ec9b0425705b3008b","signature":"dd49ef44e602db5d02a95eb385b8f95ee123406eb7241b3a816608b54c9cb855"},"3cb1269984968e387c4686adc3f6ad19ff05a3831e0f4dac0955af88d4619f69","4489c6a9fde8934733aa7df6f7911461ee6e9e4ad092736bd416f6b2cc20b2c6","2c8e55457aaf4902941dfdba4061935922e8ee6e120539c9801cd7b400fae050","8041cfce439ff29d339742389de04c136e3029d6b1817f07b2d7fcbfb7534990","670a76db379b27c8ff42f1ba927828a22862e2ab0b0908e38b671f0e912cc5ed","9d38964b57191567a14b396422c87488cecd48f405c642daa734159875ee81d9","069bebfee29864e3955378107e243508b163e77ab10de6a5ee03ae06939f0bb9","8c95f96ccd4be0674944077aec1e4f2cccd515ca06d4327562dd017250e7d3fc",{"version":"64d4b35c5456adf258d2cf56c341e203a073253f229ef3208fc0d5020253b241","affectsGlobalScope":true},"ee7d8894904b465b072be0d2e4b45cf6b887cdba16a467645c4e200982ece7ea","f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","bc3cba7b0af2d52e7425299aee518db479d44004eff6fbbd206d1ee7e5ec3fb5","afe73051ff6a03a9565cbd8ebb0e956ee3df5e913ad5c1ded64218aabfa3dcb5","035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","d8aab31ba8e618cc3eea10b0945de81cb93b7e8150a013a482332263b9305322","462bccdf75fcafc1ae8c30400c9425e1a4681db5d605d1a0edb4f990a54d8094","5923d8facbac6ecf7c84739a5c701a57af94a6f6648d6229a6c768cf28f0f8cb","7adecb2c3238794c378d336a8182d4c3dd2c4fa6fa1785e2797a3db550edea62","dc12dc0e5aa06f4e1a7692149b78f89116af823b9e1f1e4eae140cd3e0e674e6","1bfc6565b90c8771615cd8cfcf9b36efc0275e5e83ac7d9181307e96eb495161","8a8a96898906f065f296665e411f51010b51372fa260d5373bf9f64356703190","7f82ef88bdb67d9a850dd1c7cd2d690f33e0f0acd208e3c9eba086f3670d4f73",{"version":"ccfd8774cd9b929f63ff7dcf657977eb0652e3547f1fcac1b3a1dc5db22d4d58","affectsGlobalScope":true},"d92dc90fecd2552db74d8dc3c6fb4db9145b2aa0efe2c127236ba035969068d4","96d14f21b7652903852eef49379d04dbda28c16ed36468f8c9fa08f7c14c9538","b8442e9db28157344d1bc5d8a5a256f1692de213f0c0ddeb84359834015a008c","458111fc89d11d2151277c822dfdc1a28fa5b6b2493cf942e37d4cd0a6ee5f22","da2b6356b84a40111aaecb18304ea4e4fcb43d70efb1c13ca7d7a906445ee0d3","187119ff4f9553676a884e296089e131e8cc01691c546273b1d0089c3533ce42","febf0b2de54781102b00f61653b21377390a048fbf5262718c91860d11ff34a6","6f294731b495c65ecf46a5694f0082954b961cf05463bea823f8014098eaffa0","0aaef8cded245bf5036a7a40b65622dd6c4da71f7a35343112edbe112b348a1e","00baffbe8a2f2e4875367479489b5d43b5fc1429ecb4a4cc98cfc3009095f52a","68a0d0c508e1b6d8d23a519a8a0a3303dc5baa4849ca049f21e5bad41945e3fc","3c92b6dfd43cc1c2485d9eba5ff0b74a19bb8725b692773ef1d66dac48cda4bd","b03afe4bec768ae333582915146f48b161e567a81b5ebc31c4d78af089770ac9","df996e25faa505f85aeb294d15ebe61b399cf1d1e49959cdfaf2cc0815c203f9","4f6a12044ee6f458db11964153830abbc499e73d065c51c329ec97407f4b13dd","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","916be7d770b0ae0406be9486ac12eb9825f21514961dd050594c4b250617d5a8","254d9fb8c872d73d34594be8a200fd7311dbfa10a4116bfc465fba408052f2b3","d88a5e779faf033be3d52142a04fbe1cb96009868e3bbdd296b2bc6c59e06c0e","2ccea88888048bbfcacbc9531a5596ea48a3e7dcd0a25f531a81bb717903ba4f","5e379df3d61561c2ed7789b5995b9ba2143bbba21a905e2381e16efe7d1fa424","f07a137bbe2de7a122c37bfea00e761975fb264c49f18003d398d71b3fb35a5f","d8f7109e14f20eb735225a62fd3f8366da1a8349e90331cdad57f4b04caf6c5a","cf3d384d082b933d987c4e2fe7bfb8710adfd9dc8155190056ed6695a25a559e","9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","c2576a4083232b0e2d9bd06875dd43d371dee2e090325a9eac0133fd5650c1cb","4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","f40ac11d8859092d20f953aae14ba967282c3bb056431a37fced1866ec7a2681","cc11e9e79d4746cc59e0e17473a59d6f104692fd0eeea1bdb2e206eabed83b03","b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","7d8ddf0f021c53099e34ee831a06c394d50371816caa98684812f089b4c6b3d4","7d2a0ba1297be385a89b5515b88cd31b4a1eeef5236f710166dc1b36b1741e1b","9d92b037978bb9525bc4b673ebddd443277542e010c0aef019c03a170ccdaa73","ab82804a14454734010dcdcd43f564ff7b0389bee4c5692eec76ff5b30d4cf66","fab58e600970e66547644a44bc9918e3223aa2cbd9e8763cec004b2cfb48827e","bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","ae271d475b632ce7b03fea6d9cf6da72439e57a109672671cbc79f54e1386938"],"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":[[217],[92,128,129,130,145],[129,130,146,147],[128,129],[128,145,148,151],[128,148,151,152],[149,150,151,153,154],[128,151],[128,145,148,149,150,153],[128,136],[128],[92,128],[80,128],[132,133,134,135,136,137,138,139,140,141,142,143,144],[128,134,135],[128,134,136],[64],[67],[64,67],[65,66,67,68,69,70,71,72,73,74,75,156,159,160,161,162,163,164,165,166],[58,64,65],[67,73,75,155],[158],[67,68],[64,162],[194,195],[217,218,219,220,221],[217,219],[157],[224,225,226],[93,128],[229],[230],[241],[235,240],[244,246,247,248,249,250,251,252,253,254,255,256],[244,245,247,248,249,250,251,252,253,254,255,256],[245,246,247,248,249,250,251,252,253,254,255,256],[244,245,246,248,249,250,251,252,253,254,255,256],[244,245,246,247,249,250,251,252,253,254,255,256],[244,245,246,247,248,250,251,252,253,254,255,256],[244,245,246,247,248,249,251,252,253,254,255,256],[244,245,246,247,248,249,250,252,253,254,255,256],[244,245,246,247,248,249,250,251,253,254,255,256],[244,245,246,247,248,249,250,251,252,254,255,256],[244,245,246,247,248,249,250,251,252,253,255,256],[244,245,246,247,248,249,250,251,252,253,254,256],[244,245,246,247,248,249,250,251,252,253,254,255],[76],[79],[80,85,112],[81,92,93,100,109,120],[81,82,92,100],[83,121],[84,85,93,101],[85,109,117],[86,88,92,100],[87],[88,89],[92],[91,92],[79,92],[92,93,94,109,120],[92,93,94,109],[92,95,100,109,120],[92,93,95,96,100,109,117,120],[95,97,109,117,120],[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,126,127],[92,98],[99,120,125],[88,92,100,109],[101],[102],[79,103],[104,119,125],[105],[106],[92,107],[107,108,121,123],[80,92,109,110,111],[80,109,111],[109,110],[112],[113],[92,115,116],[115,116],[85,100,109,117],[118],[100,119],[80,95,106,120],[85,121],[109,122],[123],[124],[80,85,92,94,103,109,120,123,125],[109,126],[128,262],[265,304],[265,289,304],[304],[265],[265,290,304],[265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303],[290,304],[305],[309],[204],[206],[204,205,206,207,208,209,210],[204,206],[179],[179,180,181,182,183],[168,169,170,171,172,173,174,175,176,177,178],[233,236],[233,236,237,238],[235],[232,239],[234],[57,59,60,61,62,63],[57,58],[59],[58,59],[57,59],[167,184,185,186],[185],[186],[56,185,186,187],[189],[189,190,193,197],[196],[167,191,192],[188,198,199],[199,200,203,213,214,215],[167],[199,202],[199,201,202,211,212],[199,202,212],[188,199],[158,167],[199]],"referencedMap":[[219,1],[146,2],[148,3],[130,4],[152,5],[153,6],[149,6],[155,7],[150,6],[154,8],[151,9],[137,10],[134,11],[141,12],[135,10],[132,13],[145,14],[139,11],[136,15],[138,16],[65,17],[66,17],[68,18],[69,17],[70,17],[71,19],[67,17],[167,20],[75,21],[156,22],[159,23],[165,24],[166,25],[196,26],[222,27],[218,1],[220,28],[221,1],[192,11],[158,29],[227,30],[228,31],[230,32],[231,33],[242,34],[241,35],[245,36],[246,37],[244,38],[247,39],[248,40],[249,41],[250,42],[251,43],[252,44],[253,45],[254,46],[255,47],[256,48],[76,49],[77,49],[79,50],[80,51],[81,52],[82,53],[83,54],[84,55],[85,56],[86,57],[87,58],[88,59],[89,59],[90,60],[91,61],[92,62],[93,63],[94,64],[95,65],[96,66],[97,67],[128,68],[98,69],[99,70],[100,71],[101,72],[102,73],[103,74],[104,75],[105,76],[106,77],[107,78],[108,79],[109,80],[111,81],[110,82],[112,83],[113,84],[115,85],[116,86],[117,87],[118,88],[119,89],[120,90],[121,91],[122,92],[123,93],[124,94],[125,95],[126,96],[259,11],[263,97],[264,11],[289,98],[290,99],[265,100],[268,100],[287,98],[288,98],[278,98],[277,101],[275,98],[270,98],[283,98],[281,98],[285,98],[269,98],[282,98],[286,98],[271,98],[272,98],[284,98],[266,98],[273,98],[274,98],[276,98],[280,98],[291,102],[279,98],[267,98],[304,103],[298,102],[300,104],[299,102],[292,102],[293,102],[295,102],[297,102],[301,104],[302,104],[294,104],[296,104],[306,105],[310,106],[205,107],[207,108],[211,109],[209,110],[208,110],[175,111],[177,111],[176,111],[174,111],[184,112],[179,113],[170,111],[171,111],[172,111],[173,111],[237,114],[239,115],[238,114],[236,116],[240,117],[235,118],[64,119],[59,120],[60,121],[61,121],[62,122],[63,122],[58,123],[187,124],[186,125],[185,126],[188,127],[190,128],[198,129],[197,130],[193,131],[200,132],[216,133],[202,134],[203,135],[213,136],[215,137],[214,137]],"exportedModulesMap":[[219,1],[146,2],[148,3],[130,4],[152,5],[153,6],[149,6],[155,7],[150,6],[154,8],[151,9],[137,10],[134,11],[141,12],[135,10],[132,13],[145,14],[139,11],[136,15],[138,16],[65,17],[66,17],[68,18],[69,17],[70,17],[71,19],[67,17],[167,20],[75,21],[156,22],[159,23],[165,24],[166,25],[196,26],[222,27],[218,1],[220,28],[221,1],[192,11],[158,29],[227,30],[228,31],[230,32],[231,33],[242,34],[241,35],[245,36],[246,37],[244,38],[247,39],[248,40],[249,41],[250,42],[251,43],[252,44],[253,45],[254,46],[255,47],[256,48],[76,49],[77,49],[79,50],[80,51],[81,52],[82,53],[83,54],[84,55],[85,56],[86,57],[87,58],[88,59],[89,59],[90,60],[91,61],[92,62],[93,63],[94,64],[95,65],[96,66],[97,67],[128,68],[98,69],[99,70],[100,71],[101,72],[102,73],[103,74],[104,75],[105,76],[106,77],[107,78],[108,79],[109,80],[111,81],[110,82],[112,83],[113,84],[115,85],[116,86],[117,87],[118,88],[119,89],[120,90],[121,91],[122,92],[123,93],[124,94],[125,95],[126,96],[259,11],[263,97],[264,11],[289,98],[290,99],[265,100],[268,100],[287,98],[288,98],[278,98],[277,101],[275,98],[270,98],[283,98],[281,98],[285,98],[269,98],[282,98],[286,98],[271,98],[272,98],[284,98],[266,98],[273,98],[274,98],[276,98],[280,98],[291,102],[279,98],[267,98],[304,103],[298,102],[300,104],[299,102],[292,102],[293,102],[295,102],[297,102],[301,104],[302,104],[294,104],[296,104],[306,105],[310,106],[205,107],[207,108],[211,109],[209,110],[208,110],[175,111],[177,111],[176,111],[174,111],[184,112],[179,113],[170,111],[171,111],[172,111],[173,111],[237,114],[239,115],[238,114],[236,116],[240,117],[235,118],[64,119],[59,120],[60,121],[61,121],[62,122],[63,122],[58,123],[187,124],[186,125],[185,126],[188,127],[190,128],[198,129],[197,130],[193,131],[200,138],[216,133],[202,139],[203,140],[213,140],[215,140],[214,140]],"semanticDiagnosticsPerFile":[219,217,146,129,148,130,147,152,153,149,155,150,154,151,137,134,141,135,132,140,145,142,143,144,139,136,133,138,191,65,66,68,69,70,71,72,73,74,67,167,75,156,159,160,161,162,163,164,165,166,194,196,195,222,218,220,221,192,158,223,224,227,225,228,229,230,231,242,241,226,243,245,246,244,247,248,249,250,251,252,253,254,255,256,257,157,76,77,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,78,127,95,96,97,128,98,99,100,101,102,103,104,105,106,107,108,109,111,110,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,258,259,260,261,263,262,264,289,290,265,268,287,288,278,277,275,270,283,281,285,269,282,286,271,272,284,266,273,274,276,280,291,279,267,304,303,298,300,299,292,293,295,297,301,302,294,296,306,305,307,308,309,310,205,204,207,206,210,211,209,208,131,232,178,175,177,176,174,184,179,183,180,182,181,170,171,172,168,169,173,233,237,239,238,236,240,235,234,57,64,59,60,61,62,63,58,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,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,56,187,186,185,188,190,198,197,189,193,200,201,216,202,203,213,215,214,199,212,47,48,49,50,51,52,43,53,54,55,44,45,46],"latestChangedDtsFile":"./types/index.d.ts"},"version":"4.9.5"}
@@ -14,49 +14,49 @@ export declare enum NameOrigin {
14
14
  UI = "ui"
15
15
  }
16
16
  declare const controllerName = "NameController";
17
- export declare type ProposedNamesEntry = {
17
+ export type ProposedNamesEntry = {
18
18
  proposedNames: string[];
19
19
  lastRequestTime: number | null;
20
20
  updateDelay: number | null;
21
21
  };
22
- export declare type NameEntry = {
22
+ export type NameEntry = {
23
23
  name: string | null;
24
24
  sourceId: string | null;
25
25
  origin: NameOrigin | null;
26
26
  proposedNames: Record<string, ProposedNamesEntry>;
27
27
  };
28
- export declare type SourceEntry = {
28
+ export type SourceEntry = {
29
29
  label: string;
30
30
  };
31
- export declare type NameControllerState = {
31
+ export type NameControllerState = {
32
32
  names: Record<NameType, Record<string, Record<string, NameEntry>>>;
33
33
  nameSources: Record<string, SourceEntry>;
34
34
  };
35
- export declare type GetNameState = ControllerGetStateAction<typeof controllerName, NameControllerState>;
36
- export declare type NameStateChange = ControllerStateChangeEvent<typeof controllerName, NameControllerState>;
37
- export declare type NameControllerActions = GetNameState;
38
- export declare type NameControllerEvents = NameStateChange;
39
- export declare type NameControllerMessenger = RestrictedControllerMessenger<typeof controllerName, NameControllerActions, NameControllerEvents, never, never>;
40
- export declare type NameControllerOptions = {
35
+ export type GetNameState = ControllerGetStateAction<typeof controllerName, NameControllerState>;
36
+ export type NameStateChange = ControllerStateChangeEvent<typeof controllerName, NameControllerState>;
37
+ export type NameControllerActions = GetNameState;
38
+ export type NameControllerEvents = NameStateChange;
39
+ export type NameControllerMessenger = RestrictedControllerMessenger<typeof controllerName, NameControllerActions, NameControllerEvents, never, never>;
40
+ export type NameControllerOptions = {
41
41
  messenger: NameControllerMessenger;
42
42
  providers: NameProvider[];
43
43
  state?: Partial<NameControllerState>;
44
44
  updateDelay?: number;
45
45
  };
46
- export declare type UpdateProposedNamesRequest = {
46
+ export type UpdateProposedNamesRequest = {
47
47
  value: string;
48
48
  type: NameType;
49
49
  sourceIds?: string[];
50
50
  onlyUpdateAfterDelay?: boolean;
51
51
  variation?: string;
52
52
  };
53
- export declare type UpdateProposedNamesResult = {
53
+ export type UpdateProposedNamesResult = {
54
54
  results: Record<string, {
55
55
  proposedNames?: string[];
56
56
  error?: unknown;
57
57
  }>;
58
58
  };
59
- export declare type SetNameRequest = {
59
+ export type SetNameRequest = {
60
60
  value: string;
61
61
  type: NameType;
62
62
  name: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"NameController.d.ts","sourceRoot":"","sources":["../../src/NameController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,wBAAwB,EACxB,0BAA0B,EAC1B,6BAA6B,EAC9B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,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f,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,qBAAa,cAAe,SAAQ,cAAc,CAChD,OAAO,cAAc,EACrB,mBAAmB,EACnB,uBAAuB,CACxB;;IAKC;;;;;;;;OAQG;gBACS,EACV,SAAS,EACT,SAAS,EACT,KAAK,EACL,WAAW,GACZ,EAAE,qBAAqB;IAYxB;;;;;;;;;OASG;IACH,OAAO,CAAC,OAAO,EAAE,cAAc;IAuB/B;;;;;;;;;OASG;IACG,mBAAmB,CACvB,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,yBAAyB,CAAC;CAogBtC"}
@@ -1,5 +1,5 @@
1
1
  import type { NameProvider, NameProviderMetadata, NameProviderRequest, NameProviderResult } from '../types';
2
- export declare type ReverseLookupCallback = (address: string, chainId: string) => Promise<string>;
2
+ export type ReverseLookupCallback = (address: string, chainId: string) => Promise<string>;
3
3
  export declare class ENSNameProvider implements NameProvider {
4
4
  #private;
5
5
  constructor({ isEnabled, reverseLookup, }: {
@@ -1 +1 @@
1
- {"version":3,"file":"ens.d.ts","sourceRoot":"","sources":["../../../src/providers/ens.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAGlB,oBAAY,qBAAqB,GAAG,CAClC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC,MAAM,CAAC,CAAC;AAOrB,qBAAa,eAAgB,YAAW,YAAY;;gBAKtC,EACV,SAAS,EACT,aAAa,GACd,EAAE;QACD,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC;QAC1B,aAAa,EAAE,qBAAqB,CAAC;KACtC;IAKD,WAAW,IAAI,oBAAoB;IAO7B,gBAAgB,CACpB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,kBAAkB,CAAC;CAiC/B"}
1
+ {"version":3,"file":"ens.d.ts","sourceRoot":"","sources":["../../../src/providers/ens.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAGlB,MAAM,MAAM,qBAAqB,GAAG,CAClC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,MAAM,KACZ,OAAO,CAAC,MAAM,CAAC,CAAC;AAOrB,qBAAa,eAAgB,YAAW,YAAY;;gBAKtC,EACV,SAAS,EACT,aAAa,GACd,EAAE;QACD,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC;QAC1B,aAAa,EAAE,qBAAqB,CAAC;KACtC;IAKD,WAAW,IAAI,oBAAoB;IAO7B,gBAAgB,CACpB,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,kBAAkB,CAAC;CAiC/B"}
@@ -4,7 +4,7 @@ export declare enum NameType {
4
4
  ETHEREUM_ADDRESS = "ethereumAddress"
5
5
  }
6
6
  /** The metadata for a name provider. */
7
- export declare type NameProviderMetadata = {
7
+ export type NameProviderMetadata = {
8
8
  /**
9
9
  * IDs for each alternate source of proposed names.
10
10
  * Keyed by the name type.
@@ -17,7 +17,7 @@ export declare type NameProviderMetadata = {
17
17
  sourceLabels: Record<string, string>;
18
18
  };
19
19
  /** The request data to get proposed names from a name provider. */
20
- export declare type NameProviderRequest = {
20
+ export type NameProviderRequest = {
21
21
  /** The optional list of source IDs to get proposed names from. */
22
22
  sourceIds?: string[];
23
23
  /** The type of name being requested. */
@@ -31,7 +31,7 @@ export declare type NameProviderRequest = {
31
31
  variation: string;
32
32
  };
33
33
  /** The resulting data after requesting proposed names from a name provider, for a single source. */
34
- export declare type NameProviderSourceResult = {
34
+ export type NameProviderSourceResult = {
35
35
  /**
36
36
  * The array of proposed names from the source.
37
37
  * Undefined if there is an error.
@@ -49,7 +49,7 @@ export declare type NameProviderSourceResult = {
49
49
  error?: unknown;
50
50
  };
51
51
  /** The resulting data after requesting proposed names from a name provider. */
52
- export declare type NameProviderResult = {
52
+ export type NameProviderResult = {
53
53
  /**
54
54
  * The resulting data from each alternate source of proposed names supported by the name provider.
55
55
  * Keyed by the source ID.
@@ -62,7 +62,7 @@ export declare type NameProviderResult = {
62
62
  error?: unknown;
63
63
  };
64
64
  /** An object capable of proposing friendly names for a raw value of a given type. */
65
- export declare type NameProvider = {
65
+ export type NameProvider = {
66
66
  /**
67
67
  * Returns metadata about the name provider.
68
68
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,oBAAY,QAAQ;IAClB,0CAA0C;IAC1C,gBAAgB,oBAAoB;CACrC;AAED,wCAAwC;AACxC,oBAAY,oBAAoB,GAAG;IACjC;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;IAEtC;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACtC,CAAC;AAEF,mEAAmE;AACnE,oBAAY,mBAAmB,GAAG;IAChC,kEAAkE;IAClE,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IAErB,wCAAwC;IACxC,IAAI,EAAE,QAAQ,CAAC;IAEf,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,oGAAoG;AACpG,oBAAY,wBAAwB,GAAG;IACrC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IAEzB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,+EAA+E;AA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AC/B;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;IAElD;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,qFAAqF;AACrF,MAAM,MAAM,YAAY,GAAG;IACzB;;OAEG;IACH,WAAW,IAAI,oBAAoB,CAAC;IAEpC;;;;OAIG;IACH,gBAAgB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;CAC7E,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask/name-controller",
3
- "version": "6.0.1",
3
+ "version": "7.0.0",
4
4
  "description": "Stores and suggests names for values such as Ethereum addresses",
5
5
  "keywords": [
6
6
  "MetaMask",
@@ -42,9 +42,10 @@
42
42
  "test:watch": "jest --watch"
43
43
  },
44
44
  "dependencies": {
45
- "@metamask/base-controller": "^5.0.1",
45
+ "@metamask/base-controller": "^5.0.2",
46
+ "@metamask/controller-utils": "^10.0.0",
46
47
  "@metamask/utils": "^8.3.0",
47
- "async-mutex": "^0.2.6"
48
+ "async-mutex": "^0.5.0"
48
49
  },
49
50
  "devDependencies": {
50
51
  "@metamask/auto-changelog": "^3.4.4",
@@ -54,7 +55,7 @@
54
55
  "ts-jest": "^27.1.4",
55
56
  "typedoc": "^0.24.8",
56
57
  "typedoc-plugin-missing-exports": "^2.0.0",
57
- "typescript": "~4.8.4"
58
+ "typescript": "~4.9.5"
58
59
  },
59
60
  "engines": {
60
61
  "node": ">=16.0.0"
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/NameController.ts"],"names":["NameOrigin"],"mappings":";;;;;;;;;;;AAKA,SAAS,sBAAsB;AAUxB,IAAM,qBAAqB;AAC3B,IAAM,gCAAgC,KAAK,KAAK;AAKhD,IAAK,aAAL,kBAAKA,gBAAL;AAEL,EAAAA,YAAA,sBAAmB;AAEnB,EAAAA,YAAA,kBAAe;AAEf,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vB;AAAA,MACF;AAEA,YAAM,gBAAgB,OAAO,OAAO,MAAM,aAAa;AACvD,YAAM,0BAA0B,cAAc;AAAA,QAC5C,CAAC,iBACC,eAAe,aAAa,mBAAmB,MAC/C;AAAA,MACJ;AAEA,UAAI,yBAAyB;AAC3B,eAAO,MAAM,MAAM,QAAQ,EAAE,KAAK,EAAE,SAAS;AAAA,MAC/C;AAAA,IACF;AAAA,EACF,CAAC;AACH;AAEA;AAAA,oBAAe,SAAC,OAKZ;AACF,SAAO,OAAO,QAAQ,MAAM,KAAK,EAAE;AAAA,IAAQ,CAAC,CAAC,MAAM,WAAW,MAC5D,OAAO,QAAQ,WAAW,EAAE;AAAA,MAAQ,CAAC,CAAC,OAAO,gBAAgB,MAC3D,OAAO,QAAQ,gBAAgB,EAAE,IAAI,CAAC,CAAC,WAAW,KAAK,OAAO;AAAA,QAC5D;AAAA,QACA,UAAU;AAAA,QACV;AAAA,QACA;AAAA,MACF,EAAE;AAAA,IACJ;AAAA,EACF;AACF","sourcesContent":["import type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n RestrictedControllerMessenger,\n} from '@metamask/base-controller';\nimport { BaseController } from '@metamask/base-controller';\n\nimport type {\n NameProvider,\n NameProviderRequest,\n NameProviderResult,\n NameProviderSourceResult,\n} from './types';\nimport { NameType } from './types';\n\nexport const FALLBACK_VARIATION = '*';\nexport const PROPOSED_NAME_EXPIRE_DURATION = 60 * 60 * 24; // 24 hours\n\n/**\n * Enumerates the possible origins responsible for setting a petname.\n */\nexport enum NameOrigin {\n // Originated from an account identity.\n ACCOUNT_IDENTITY = 'account-identity',\n // Originated from an address book entry.\n ADDRESS_BOOK = 'address-book',\n // Originated from the API (NameController.setName). This is the default.\n API = 'api',\n // Originated from the user taking action in the UI.\n UI = 'ui',\n}\n\nconst DEFAULT_UPDATE_DELAY = 60 * 2; // 2 Minutes\nconst DEFAULT_VARIATION = '';\n\nconst controllerName = 'NameController';\n\nconst stateMetadata = {\n names: { persist: true, anonymous: false },\n nameSources: { persist: true, anonymous: false },\n};\n\nconst getDefaultState = () => ({\n names: {\n [NameType.ETHEREUM_ADDRESS]: {},\n },\n nameSources: {},\n});\n\nexport type ProposedNamesEntry = {\n proposedNames: string[];\n lastRequestTime: number | null;\n updateDelay: number | null;\n};\n\nexport type NameEntry = {\n name: string | null;\n sourceId: string | null;\n origin: NameOrigin | null;\n proposedNames: Record<string, ProposedNamesEntry>;\n};\n\nexport type SourceEntry = {\n label: string;\n};\n\nexport type NameControllerState = {\n // Type > Value > Variation > Entry\n names: Record<NameType, Record<string, Record<string, NameEntry>>>;\n nameSources: Record<string, SourceEntry>;\n};\n\nexport type GetNameState = ControllerGetStateAction<\n typeof controllerName,\n NameControllerState\n>;\n\nexport type NameStateChange = ControllerStateChangeEvent<\n typeof controllerName,\n NameControllerState\n>;\n\nexport type NameControllerActions = GetNameState;\n\nexport type NameControllerEvents = NameStateChange;\n\nexport type NameControllerMessenger = RestrictedControllerMessenger<\n typeof controllerName,\n NameControllerActions,\n NameControllerEvents,\n never,\n never\n>;\n\nexport type NameControllerOptions = {\n messenger: NameControllerMessenger;\n providers: NameProvider[];\n state?: Partial<NameControllerState>;\n updateDelay?: number;\n};\n\nexport type UpdateProposedNamesRequest = {\n value: string;\n type: NameType;\n sourceIds?: string[];\n onlyUpdateAfterDelay?: boolean;\n variation?: string;\n};\n\nexport type UpdateProposedNamesResult = {\n results: Record<string, { proposedNames?: string[]; error?: unknown }>;\n};\n\nexport type SetNameRequest = {\n value: string;\n type: NameType;\n name: string | null;\n sourceId?: string;\n variation?: string;\n origin?: NameOrigin;\n};\n\n/**\n * Controller for storing and deriving names for values such as Ethereum addresses.\n */\nexport class NameController extends BaseController<\n typeof controllerName,\n NameControllerState,\n NameControllerMessenger\n> {\n #providers: NameProvider[];\n\n #updateDelay: number;\n\n /**\n * Construct a Name controller.\n *\n * @param options - Controller options.\n * @param options.messenger - Restricted controller messenger for the name controller.\n * @param options.providers - Array of name provider instances to propose names.\n * @param options.state - Initial state to set on the controller.\n * @param options.updateDelay - The delay in seconds before a new request to a source should be made.\n */\n constructor({\n messenger,\n providers,\n state,\n updateDelay,\n }: NameControllerOptions) {\n super({\n name: controllerName,\n metadata: stateMetadata,\n messenger,\n state: { ...getDefaultState(), ...state },\n });\n\n this.#providers = providers;\n this.#updateDelay = updateDelay ?? DEFAULT_UPDATE_DELAY;\n }\n\n /**\n * Set the user specified name for a value.\n *\n * @param request - Request object.\n * @param request.name - Name to set.\n * @param request.sourceId - Optional ID of the source of the proposed name.\n * @param request.type - Type of value to set the name for.\n * @param request.value - Value to set the name for.\n * @param request.variation - Variation of the raw value to set the name for. The chain ID if the type is Ethereum address.\n */\n setName(request: SetNameRequest) {\n this.#validateSetNameRequest(request);\n\n const {\n value,\n type,\n name,\n sourceId: requestSourceId,\n origin: requestOrigin,\n variation,\n } = request;\n const sourceId = requestSourceId ?? null;\n // If the name is being cleared, the fallback origin should be cleared as well.\n const fallbackOrigin = name === null ? null : NameOrigin.API;\n const origin = requestOrigin ?? fallbackOrigin;\n\n this.#updateEntry(value, type, variation, (entry: NameEntry) => {\n entry.name = name;\n entry.sourceId = sourceId;\n entry.origin = origin;\n });\n }\n\n /**\n * Generate the proposed names for a value using the name providers and store them in the state.\n *\n * @param request - Request object.\n * @param request.value - Value to update the proposed names for.\n * @param request.type - Type of value to update the proposed names for.\n * @param request.sourceIds - Optional array of source IDs to limit which sources are used by the providers. If not provided, all sources in all providers will be used.\n * @param request.variation - Variation of the raw value to update proposed names for. The chain ID if the type is Ethereum address.\n * @returns The updated proposed names for the value.\n */\n async updateProposedNames(\n request: UpdateProposedNamesRequest,\n ): Promise<UpdateProposedNamesResult> {\n this.#validateUpdateProposedNamesRequest(request);\n\n const providerResponses = (\n await Promise.all(\n this.#providers.map((provider) =>\n this.#getProviderResponse(request, provider),\n ),\n )\n ).filter((response) => Boolean(response)) as NameProviderResult[];\n\n this.#updateProposedNameState(request, providerResponses);\n this.#updateSourceState(this.#providers);\n this.#removeExpiredEntries();\n\n return this.#getUpdateProposedNamesResult(providerResponses);\n }\n\n #updateProposedNameState(\n request: UpdateProposedNamesRequest,\n providerResponses: NameProviderResult[],\n ) {\n const { value, type, variation } = request;\n const currentTime = this.#getCurrentTimeSeconds();\n\n this.#updateEntry(value, type, variation, (entry: NameEntry) => {\n this.#removeDormantProposedNames(entry.proposedNames, type);\n\n for (const providerResponse of providerResponses) {\n const { results } = providerResponse;\n\n for (const sourceId of Object.keys(providerResponse.results)) {\n const result = results[sourceId];\n const { proposedNames, updateDelay } = result;\n\n const proposedNameEntry = entry.proposedNames[sourceId] ?? {\n proposedNames: [],\n lastRequestTime: null,\n updateDelay: null,\n };\n\n entry.proposedNames[sourceId] = proposedNameEntry;\n\n if (proposedNames) {\n proposedNameEntry.proposedNames = proposedNames;\n }\n\n proposedNameEntry.lastRequestTime = currentTime;\n proposedNameEntry.updateDelay = updateDelay ?? null;\n }\n }\n });\n }\n\n #updateSourceState(providers: NameProvider[]) {\n const newNameSources = { ...this.state.nameSources };\n\n for (const provider of providers) {\n const { sourceLabels } = provider.getMetadata();\n\n for (const sourceId of Object.keys(sourceLabels)) {\n newNameSources[sourceId] = {\n label: sourceLabels[sourceId],\n };\n }\n }\n\n this.update((state) => {\n state.nameSources = newNameSources;\n });\n }\n\n #getUpdateProposedNamesResult(\n providerResponses: NameProviderResult[],\n ): UpdateProposedNamesResult {\n return providerResponses.reduce(\n (acc: UpdateProposedNamesResult, providerResponse) => {\n const { results } = providerResponse;\n\n for (const sourceId of Object.keys(results)) {\n const { proposedNames, error } = results[sourceId];\n\n acc.results[sourceId] = {\n proposedNames,\n error,\n };\n }\n\n return acc;\n },\n { results: {} },\n );\n }\n\n async #getProviderResponse(\n request: UpdateProposedNamesRequest,\n provider: NameProvider,\n ): Promise<NameProviderResult | undefined> {\n const {\n value,\n type,\n sourceIds: requestedSourceIds,\n onlyUpdateAfterDelay,\n variation,\n } = request;\n\n /* istanbul ignore next */\n const variationKey = variation ?? DEFAULT_VARIATION;\n const supportedSourceIds = this.#getSourceIds(provider, type);\n const currentTime = this.#getCurrentTimeSeconds();\n const normalizedValue = this.#normalizeValue(value, type);\n\n const matchingSourceIds = supportedSourceIds.filter((sourceId) => {\n if (requestedSourceIds && !requestedSourceIds.includes(sourceId)) {\n return false;\n }\n\n if (onlyUpdateAfterDelay) {\n const entry =\n this.state.names[type]?.[normalizedValue]?.[variationKey] ?? {};\n const proposedNamesEntry = entry.proposedNames?.[sourceId] ?? {};\n const lastRequestTime = proposedNamesEntry.lastRequestTime ?? 0;\n const updateDelay = proposedNamesEntry.updateDelay ?? this.#updateDelay;\n\n if (currentTime - lastRequestTime < updateDelay) {\n return false;\n }\n }\n\n return true;\n });\n\n if (!matchingSourceIds.length) {\n return undefined;\n }\n\n const providerRequest: NameProviderRequest = {\n value: this.#normalizeValue(value, type),\n type,\n sourceIds: requestedSourceIds ? matchingSourceIds : undefined,\n variation: this.#normalizeVariation(variationKey, type),\n };\n\n let responseError: unknown | undefined;\n let response: NameProviderResult | undefined;\n\n try {\n response = await provider.getProposedNames(providerRequest);\n responseError = response.error;\n } catch (error) {\n responseError = error;\n }\n\n return this.#normalizeProviderResult(\n response,\n responseError,\n matchingSourceIds,\n );\n }\n\n #normalizeProviderResult(\n result: NameProviderResult | undefined,\n responseError: unknown,\n matchingSourceIds: string[],\n ): NameProviderResult {\n const error = responseError ?? undefined;\n\n const results = matchingSourceIds.reduce((acc, sourceId) => {\n const sourceResult = result?.results?.[sourceId];\n\n const normalizedSourceResult = this.#normalizeProviderSourceResult(\n sourceResult,\n responseError,\n );\n\n return {\n ...acc,\n [sourceId]: normalizedSourceResult,\n };\n }, {});\n\n return { results, error };\n }\n\n #normalizeProviderSourceResult(\n result: NameProviderSourceResult | undefined,\n responseError: unknown,\n ): NameProviderSourceResult | undefined {\n const error = result?.error ?? responseError ?? undefined;\n const updateDelay = result?.updateDelay ?? undefined;\n let proposedNames = error ? undefined : result?.proposedNames ?? undefined;\n\n if (proposedNames) {\n proposedNames = proposedNames.filter(\n (proposedName) => proposedName?.length,\n );\n }\n\n return {\n proposedNames,\n error,\n updateDelay,\n };\n }\n\n #normalizeValue(value: string, type: NameType): string {\n /* istanbul ignore next */\n switch (type) {\n case NameType.ETHEREUM_ADDRESS:\n return value.toLowerCase();\n\n default:\n return value;\n }\n }\n\n #normalizeVariation(variation: string, type: NameType): string {\n /* istanbul ignore next */\n switch (type) {\n case NameType.ETHEREUM_ADDRESS:\n return variation.toLowerCase();\n\n default:\n return variation;\n }\n }\n\n #updateEntry(\n value: string,\n type: NameType,\n variation: string | undefined,\n callback: (entry: NameEntry) => void,\n ) {\n /* istanbul ignore next */\n const variationKey = variation ?? DEFAULT_VARIATION;\n const normalizedValue = this.#normalizeValue(value, type);\n const normalizedVariation = this.#normalizeVariation(variationKey, type);\n\n this.update((state) => {\n const typeEntries = state.names[type] || {};\n state.names[type] = typeEntries;\n\n const variationEntries = typeEntries[normalizedValue] || {};\n typeEntries[normalizedValue] = variationEntries;\n\n const entry = variationEntries[normalizedVariation] ?? {\n proposedNames: {},\n name: null,\n sourceId: null,\n origin: null,\n };\n variationEntries[normalizedVariation] = entry;\n\n callback(entry);\n });\n }\n\n #getCurrentTimeSeconds(): number {\n return Math.round(Date.now() / 1000);\n }\n\n #validateSetNameRequest(request: SetNameRequest) {\n const { name, value, type, sourceId, variation, origin } = request;\n const errorMessages: string[] = [];\n\n this.#validateValue(value, errorMessages);\n this.#validateType(type, errorMessages);\n this.#validateName(name, errorMessages);\n this.#validateSourceId(sourceId, type, name, errorMessages);\n this.#validateVariation(variation, type, errorMessages);\n this.#validateOrigin(origin, name, errorMessages);\n\n if (errorMessages.length) {\n throw new Error(errorMessages.join(' '));\n }\n }\n\n #validateUpdateProposedNamesRequest(request: UpdateProposedNamesRequest) {\n const { value, type, sourceIds, variation } = request;\n const errorMessages: string[] = [];\n\n this.#validateValue(value, errorMessages);\n this.#validateType(type, errorMessages);\n this.#validateSourceIds(sourceIds, type, errorMessages);\n this.#validateDuplicateSourceIds(type, errorMessages);\n this.#validateVariation(variation, type, errorMessages);\n\n if (errorMessages.length) {\n throw new Error(errorMessages.join(' '));\n }\n }\n\n #validateValue(value: string, errorMessages: string[]) {\n if (!value?.length || typeof value !== 'string') {\n errorMessages.push('Must specify a non-empty string for value.');\n }\n }\n\n #validateType(type: NameType, errorMessages: string[]) {\n if (!Object.values(NameType).includes(type)) {\n errorMessages.push(\n `Must specify one of the following types: ${Object.values(\n NameType,\n ).join(', ')}`,\n );\n }\n }\n\n #validateName(name: string | null, errorMessages: string[]) {\n if (name === null) {\n return;\n }\n\n if (!name?.length || typeof name !== 'string') {\n errorMessages.push('Must specify a non-empty string or null for name.');\n }\n }\n\n #validateSourceIds(\n sourceIds: string[] | undefined,\n type: NameType,\n errorMessages: string[],\n ) {\n if (!sourceIds) {\n return;\n }\n\n const allSourceIds = this.#getAllSourceIds(type);\n const missingSourceIds = [];\n\n for (const sourceId of sourceIds) {\n if (!allSourceIds.includes(sourceId)) {\n missingSourceIds.push(sourceId);\n continue;\n }\n }\n\n if (missingSourceIds.length) {\n errorMessages.push(\n `Unknown source IDs for type '${type}': ${missingSourceIds.join(', ')}`,\n );\n }\n }\n\n #validateSourceId(\n sourceId: string | undefined,\n type: NameType,\n name: string | null,\n errorMessages: string[],\n ) {\n if (sourceId === null || sourceId === undefined) {\n return;\n }\n\n if (name === null) {\n errorMessages.push(\n `Cannot specify a source ID when clearing the saved name: ${sourceId}`,\n );\n return;\n }\n\n const allSourceIds = this.#getAllSourceIds(type);\n\n if (!sourceId.length || typeof sourceId !== 'string') {\n errorMessages.push('Must specify a non-empty string for sourceId.');\n return;\n }\n\n if (!allSourceIds.includes(sourceId)) {\n errorMessages.push(`Unknown source ID for type '${type}': ${sourceId}`);\n }\n }\n\n #validateDuplicateSourceIds(type: NameType, errorMessages: string[]) {\n const allSourceIds = this.#getAllSourceIds(type);\n\n const duplicateSourceIds = allSourceIds.filter(\n (sourceId, index) => allSourceIds.indexOf(sourceId) !== index,\n );\n\n if (duplicateSourceIds.length) {\n errorMessages.push(\n `Duplicate source IDs found for type '${type}': ${duplicateSourceIds.join(\n ', ',\n )}`,\n );\n }\n }\n\n #validateVariation(\n variation: string | undefined,\n type: string,\n errorMessages: string[],\n ) {\n if (type !== NameType.ETHEREUM_ADDRESS) {\n return;\n }\n\n if (\n !variation?.length ||\n typeof variation !== 'string' ||\n (!variation.match(/^0x[0-9A-Fa-f]+$/u) &&\n variation !== FALLBACK_VARIATION)\n ) {\n errorMessages.push(\n `Must specify a chain ID in hexidecimal format or the fallback, \"${FALLBACK_VARIATION}\", for variation when using '${type}' type.`,\n );\n }\n }\n\n #validateOrigin(\n origin: NameOrigin | null | undefined,\n name: string | null,\n errorMessages: string[],\n ) {\n if (!origin) {\n return;\n }\n\n if (name === null) {\n errorMessages.push(\n `Cannot specify an origin when clearing the saved name: ${origin}`,\n );\n return;\n }\n\n if (!Object.values(NameOrigin).includes(origin)) {\n errorMessages.push(\n `Must specify one of the following origins: ${Object.values(\n NameOrigin,\n ).join(', ')}`,\n );\n }\n }\n\n #getAllSourceIds(type: NameType): string[] {\n return (\n this.#providers\n /* istanbul ignore next */\n .map((provider) => this.#getSourceIds(provider, type))\n .flat()\n );\n }\n\n #getSourceIds(provider: NameProvider, type: NameType): string[] {\n return provider.getMetadata().sourceIds[type];\n }\n\n #removeDormantProposedNames(\n proposedNames: Record<string, ProposedNamesEntry>,\n type: NameType,\n ) {\n if (Object.keys(proposedNames).length === 0) {\n return;\n }\n\n const typeSourceIds = this.#getAllSourceIds(type);\n\n const dormantSourceIds = Object.keys(proposedNames).filter(\n (sourceId) => !typeSourceIds.includes(sourceId),\n );\n\n for (const dormantSourceId of dormantSourceIds) {\n delete proposedNames[dormantSourceId];\n }\n }\n\n #removeExpiredEntries(): void {\n const currentTime = this.#getCurrentTimeSeconds();\n\n this.update((state: NameControllerState) => {\n const entries = this.#getEntriesList(state);\n for (const { nameType, value, variation, entry } of entries) {\n if (entry.name !== null) {\n continue;\n }\n\n const proposedNames = Object.values(entry.proposedNames);\n const allProposedNamesExpired = proposedNames.every(\n (proposedName: ProposedNamesEntry) =>\n currentTime - (proposedName.lastRequestTime ?? 0) >=\n PROPOSED_NAME_EXPIRE_DURATION,\n );\n\n if (allProposedNamesExpired) {\n delete state.names[nameType][value][variation];\n }\n }\n });\n }\n\n #getEntriesList(state: NameControllerState): {\n nameType: NameType;\n value: string;\n variation: string;\n entry: NameEntry;\n }[] {\n return Object.entries(state.names).flatMap(([type, typeEntries]) =>\n Object.entries(typeEntries).flatMap(([value, variationEntries]) =>\n Object.entries(variationEntries).map(([variation, entry]) => ({\n entry,\n nameType: type as NameType,\n value,\n variation,\n })),\n ),\n );\n }\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/providers/token.ts"],"sourcesContent":["import { createModuleLogger, projectLogger } from '../logger';\nimport type {\n NameProvider,\n NameProviderMetadata,\n NameProviderRequest,\n NameProviderResult,\n} from '../types';\nimport { NameType } from '../types';\nimport { handleFetch } from '../util';\n\nconst ID = 'token';\nconst LABEL = 'Blockchain (Token Name)';\n\nconst log = createModuleLogger(projectLogger, 'token');\n\nexport class TokenNameProvider implements NameProvider {\n #isEnabled: () => boolean;\n\n constructor({ isEnabled }: { isEnabled?: () => boolean } = {}) {\n this.#isEnabled = isEnabled || (() => true);\n }\n\n getMetadata(): NameProviderMetadata {\n return {\n sourceIds: { [NameType.ETHEREUM_ADDRESS]: [ID] },\n sourceLabels: { [ID]: LABEL },\n };\n }\n\n async getProposedNames(\n request: NameProviderRequest,\n ): Promise<NameProviderResult> {\n if (!this.#isEnabled()) {\n log('Skipping request as disabled');\n\n return {\n results: {\n [ID]: {\n proposedNames: [],\n },\n },\n };\n }\n\n const { value, variation: chainId } = request;\n const url = `https://token-api.metaswap.codefi.network/token/${chainId}?address=${value}`;\n\n log('Sending request', url);\n\n try {\n const responseData = await handleFetch(url);\n const proposedName = responseData.name;\n const proposedNames = proposedName ? [proposedName] : [];\n\n log('New proposed names', proposedNames);\n\n return {\n results: {\n [ID]: {\n proposedNames,\n },\n },\n };\n } catch (error) {\n log('Request failed', error);\n throw error;\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAUA,IAAM,KAAK;AACX,IAAM,QAAQ;AAEd,IAAM,MAAM,mBAAmB,eAAe,OAAO;AAbrD;AAeO,IAAM,oBAAN,MAAgD;AAAA,EAGrD,YAAY,EAAE,UAAU,IAAmC,CAAC,GAAG;AAF/D;AAGE,uBAAK,YAAa,cAAc,MAAM;AAAA,EACxC;AAAA,EAEA,cAAoC;AAClC,WAAO;AAAA,MACL,WAAW,EAAE,yCAA0B,GAAG,CAAC,EAAE,EAAE;AAAA,MAC/C,cAAc,EAAE,CAAC,EAAE,GAAG,MAAM;AAAA,IAC9B;AAAA,EACF;AAAA,EAEA,MAAM,iBACJ,SAC6B;AAC7B,QAAI,CAAC,mBAAK,YAAL,YAAmB;AACtB,UAAI,8BAA8B;AAElC,aAAO;AAAA,QACL,SAAS;AAAA,UACP,CAAC,EAAE,GAAG;AAAA,YACJ,eAAe,CAAC;AAAA,UAClB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAEA,UAAM,EAAE,OAAO,WAAW,QAAQ,IAAI;AACtC,UAAM,MAAM,mDAAmD,OAAO,YAAY,KAAK;AAEvF,QAAI,mBAAmB,GAAG;AAE1B,QAAI;AACF,YAAM,eAAe,MAAM,YAAY,GAAG;AAC1C,YAAM,eAAe,aAAa;AAClC,YAAM,gBAAgB,eAAe,CAAC,YAAY,IAAI,CAAC;AAEvD,UAAI,sBAAsB,aAAa;AAEvC,aAAO;AAAA,QACL,SAAS;AAAA,UACP,CAAC,EAAE,GAAG;AAAA,YACJ;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF,SAAS,OAAO;AACd,UAAI,kBAAkB,KAAK;AAC3B,YAAM;AAAA,IACR;AAAA,EACF;AACF;AApDE;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/NameController.ts"],"sourcesContent":["import type {\n ControllerGetStateAction,\n ControllerStateChangeEvent,\n RestrictedControllerMessenger,\n} from '@metamask/base-controller';\nimport { BaseController } from '@metamask/base-controller';\n\nimport type {\n NameProvider,\n NameProviderRequest,\n NameProviderResult,\n NameProviderSourceResult,\n} from './types';\nimport { NameType } from './types';\n\nexport const FALLBACK_VARIATION = '*';\nexport const PROPOSED_NAME_EXPIRE_DURATION = 60 * 60 * 24; // 24 hours\n\n/**\n * Enumerates the possible origins responsible for setting a petname.\n */\nexport enum NameOrigin {\n // Originated from an account identity.\n ACCOUNT_IDENTITY = 'account-identity',\n // Originated from an address book entry.\n ADDRESS_BOOK = 'address-book',\n // Originated from the API (NameController.setName). This is the default.\n API = 'api',\n // Originated from the user taking action in the UI.\n UI = 'ui',\n}\n\nconst DEFAULT_UPDATE_DELAY = 60 * 2; // 2 Minutes\nconst DEFAULT_VARIATION = '';\n\nconst controllerName = 'NameController';\n\nconst stateMetadata = {\n names: { persist: true, anonymous: false },\n nameSources: { persist: true, anonymous: false },\n};\n\nconst getDefaultState = () => ({\n names: {\n [NameType.ETHEREUM_ADDRESS]: {},\n },\n nameSources: {},\n});\n\nexport type ProposedNamesEntry = {\n proposedNames: string[];\n lastRequestTime: number | null;\n updateDelay: number | null;\n};\n\nexport type NameEntry = {\n name: string | null;\n sourceId: string | null;\n origin: NameOrigin | null;\n proposedNames: Record<string, ProposedNamesEntry>;\n};\n\nexport type SourceEntry = {\n label: string;\n};\n\nexport type NameControllerState = {\n // Type > Value > Variation > Entry\n names: Record<NameType, Record<string, Record<string, NameEntry>>>;\n nameSources: Record<string, SourceEntry>;\n};\n\nexport type GetNameState = ControllerGetStateAction<\n typeof controllerName,\n NameControllerState\n>;\n\nexport type NameStateChange = ControllerStateChangeEvent<\n typeof controllerName,\n NameControllerState\n>;\n\nexport type NameControllerActions = GetNameState;\n\nexport type NameControllerEvents = NameStateChange;\n\nexport type NameControllerMessenger = RestrictedControllerMessenger<\n typeof controllerName,\n NameControllerActions,\n NameControllerEvents,\n never,\n never\n>;\n\nexport type NameControllerOptions = {\n messenger: NameControllerMessenger;\n providers: NameProvider[];\n state?: Partial<NameControllerState>;\n updateDelay?: number;\n};\n\nexport type UpdateProposedNamesRequest = {\n value: string;\n type: NameType;\n sourceIds?: string[];\n onlyUpdateAfterDelay?: boolean;\n variation?: string;\n};\n\nexport type UpdateProposedNamesResult = {\n results: Record<string, { proposedNames?: string[]; error?: unknown }>;\n};\n\nexport type SetNameRequest = {\n value: string;\n type: NameType;\n name: string | null;\n sourceId?: string;\n variation?: string;\n origin?: NameOrigin;\n};\n\n/**\n * Controller for storing and deriving names for values such as Ethereum addresses.\n */\nexport class NameController extends BaseController<\n typeof controllerName,\n NameControllerState,\n NameControllerMessenger\n> {\n #providers: NameProvider[];\n\n #updateDelay: number;\n\n /**\n * Construct a Name controller.\n *\n * @param options - Controller options.\n * @param options.messenger - Restricted controller messenger for the name controller.\n * @param options.providers - Array of name provider instances to propose names.\n * @param options.state - Initial state to set on the controller.\n * @param options.updateDelay - The delay in seconds before a new request to a source should be made.\n */\n constructor({\n messenger,\n providers,\n state,\n updateDelay,\n }: NameControllerOptions) {\n super({\n name: controllerName,\n metadata: stateMetadata,\n messenger,\n state: { ...getDefaultState(), ...state },\n });\n\n this.#providers = providers;\n this.#updateDelay = updateDelay ?? DEFAULT_UPDATE_DELAY;\n }\n\n /**\n * Set the user specified name for a value.\n *\n * @param request - Request object.\n * @param request.name - Name to set.\n * @param request.sourceId - Optional ID of the source of the proposed name.\n * @param request.type - Type of value to set the name for.\n * @param request.value - Value to set the name for.\n * @param request.variation - Variation of the raw value to set the name for. The chain ID if the type is Ethereum address.\n */\n setName(request: SetNameRequest) {\n this.#validateSetNameRequest(request);\n\n const {\n value,\n type,\n name,\n sourceId: requestSourceId,\n origin: requestOrigin,\n variation,\n } = request;\n const sourceId = requestSourceId ?? null;\n // If the name is being cleared, the fallback origin should be cleared as well.\n const fallbackOrigin = name === null ? null : NameOrigin.API;\n const origin = requestOrigin ?? fallbackOrigin;\n\n this.#updateEntry(value, type, variation, (entry: NameEntry) => {\n entry.name = name;\n entry.sourceId = sourceId;\n entry.origin = origin;\n });\n }\n\n /**\n * Generate the proposed names for a value using the name providers and store them in the state.\n *\n * @param request - Request object.\n * @param request.value - Value to update the proposed names for.\n * @param request.type - Type of value to update the proposed names for.\n * @param request.sourceIds - Optional array of source IDs to limit which sources are used by the providers. If not provided, all sources in all providers will be used.\n * @param request.variation - Variation of the raw value to update proposed names for. The chain ID if the type is Ethereum address.\n * @returns The updated proposed names for the value.\n */\n async updateProposedNames(\n request: UpdateProposedNamesRequest,\n ): Promise<UpdateProposedNamesResult> {\n this.#validateUpdateProposedNamesRequest(request);\n\n const providerResponses = (\n await Promise.all(\n this.#providers.map((provider) =>\n this.#getProviderResponse(request, provider),\n ),\n )\n ).filter((response) => Boolean(response)) as NameProviderResult[];\n\n this.#updateProposedNameState(request, providerResponses);\n this.#updateSourceState(this.#providers);\n this.#removeExpiredEntries();\n\n return this.#getUpdateProposedNamesResult(providerResponses);\n }\n\n #updateProposedNameState(\n request: UpdateProposedNamesRequest,\n providerResponses: NameProviderResult[],\n ) {\n const { value, type, variation } = request;\n const currentTime = this.#getCurrentTimeSeconds();\n\n this.#updateEntry(value, type, variation, (entry: NameEntry) => {\n this.#removeDormantProposedNames(entry.proposedNames, type);\n\n for (const providerResponse of providerResponses) {\n const { results } = providerResponse;\n\n for (const sourceId of Object.keys(providerResponse.results)) {\n const result = results[sourceId];\n const { proposedNames, updateDelay } = result;\n\n const proposedNameEntry = entry.proposedNames[sourceId] ?? {\n proposedNames: [],\n lastRequestTime: null,\n updateDelay: null,\n };\n\n entry.proposedNames[sourceId] = proposedNameEntry;\n\n if (proposedNames) {\n proposedNameEntry.proposedNames = proposedNames;\n }\n\n proposedNameEntry.lastRequestTime = currentTime;\n proposedNameEntry.updateDelay = updateDelay ?? null;\n }\n }\n });\n }\n\n #updateSourceState(providers: NameProvider[]) {\n const newNameSources = { ...this.state.nameSources };\n\n for (const provider of providers) {\n const { sourceLabels } = provider.getMetadata();\n\n for (const sourceId of Object.keys(sourceLabels)) {\n newNameSources[sourceId] = {\n label: sourceLabels[sourceId],\n };\n }\n }\n\n this.update((state) => {\n state.nameSources = newNameSources;\n });\n }\n\n #getUpdateProposedNamesResult(\n providerResponses: NameProviderResult[],\n ): UpdateProposedNamesResult {\n return providerResponses.reduce(\n (acc: UpdateProposedNamesResult, providerResponse) => {\n const { results } = providerResponse;\n\n for (const sourceId of Object.keys(results)) {\n const { proposedNames, error } = results[sourceId];\n\n acc.results[sourceId] = {\n proposedNames,\n error,\n };\n }\n\n return acc;\n },\n { results: {} },\n );\n }\n\n async #getProviderResponse(\n request: UpdateProposedNamesRequest,\n provider: NameProvider,\n ): Promise<NameProviderResult | undefined> {\n const {\n value,\n type,\n sourceIds: requestedSourceIds,\n onlyUpdateAfterDelay,\n variation,\n } = request;\n\n /* istanbul ignore next */\n const variationKey = variation ?? DEFAULT_VARIATION;\n const supportedSourceIds = this.#getSourceIds(provider, type);\n const currentTime = this.#getCurrentTimeSeconds();\n const normalizedValue = this.#normalizeValue(value, type);\n\n const matchingSourceIds = supportedSourceIds.filter((sourceId) => {\n if (requestedSourceIds && !requestedSourceIds.includes(sourceId)) {\n return false;\n }\n\n if (onlyUpdateAfterDelay) {\n const entry =\n this.state.names[type]?.[normalizedValue]?.[variationKey] ?? {};\n const proposedNamesEntry = entry.proposedNames?.[sourceId] ?? {};\n const lastRequestTime = proposedNamesEntry.lastRequestTime ?? 0;\n const updateDelay = proposedNamesEntry.updateDelay ?? this.#updateDelay;\n\n if (currentTime - lastRequestTime < updateDelay) {\n return false;\n }\n }\n\n return true;\n });\n\n if (!matchingSourceIds.length) {\n return undefined;\n }\n\n const providerRequest: NameProviderRequest = {\n value: this.#normalizeValue(value, type),\n type,\n sourceIds: requestedSourceIds ? matchingSourceIds : undefined,\n variation: this.#normalizeVariation(variationKey, type),\n };\n\n let responseError: unknown | undefined;\n let response: NameProviderResult | undefined;\n\n try {\n response = await provider.getProposedNames(providerRequest);\n responseError = response.error;\n } catch (error) {\n responseError = error;\n }\n\n return this.#normalizeProviderResult(\n response,\n responseError,\n matchingSourceIds,\n );\n }\n\n #normalizeProviderResult(\n result: NameProviderResult | undefined,\n responseError: unknown,\n matchingSourceIds: string[],\n ): NameProviderResult {\n const error = responseError ?? undefined;\n\n const results = matchingSourceIds.reduce((acc, sourceId) => {\n const sourceResult = result?.results?.[sourceId];\n\n const normalizedSourceResult = this.#normalizeProviderSourceResult(\n sourceResult,\n responseError,\n );\n\n return {\n ...acc,\n [sourceId]: normalizedSourceResult,\n };\n }, {});\n\n return { results, error };\n }\n\n #normalizeProviderSourceResult(\n result: NameProviderSourceResult | undefined,\n responseError: unknown,\n ): NameProviderSourceResult | undefined {\n const error = result?.error ?? responseError ?? undefined;\n const updateDelay = result?.updateDelay ?? undefined;\n let proposedNames = error ? undefined : result?.proposedNames ?? undefined;\n\n if (proposedNames) {\n proposedNames = proposedNames.filter(\n (proposedName) => proposedName?.length,\n );\n }\n\n return {\n proposedNames,\n error,\n updateDelay,\n };\n }\n\n #normalizeValue(value: string, type: NameType): string {\n /* istanbul ignore next */\n switch (type) {\n case NameType.ETHEREUM_ADDRESS:\n return value.toLowerCase();\n\n default:\n return value;\n }\n }\n\n #normalizeVariation(variation: string, type: NameType): string {\n /* istanbul ignore next */\n switch (type) {\n case NameType.ETHEREUM_ADDRESS:\n return variation.toLowerCase();\n\n default:\n return variation;\n }\n }\n\n #updateEntry(\n value: string,\n type: NameType,\n variation: string | undefined,\n callback: (entry: NameEntry) => void,\n ) {\n /* istanbul ignore next */\n const variationKey = variation ?? DEFAULT_VARIATION;\n const normalizedValue = this.#normalizeValue(value, type);\n const normalizedVariation = this.#normalizeVariation(variationKey, type);\n\n this.update((state) => {\n const typeEntries = state.names[type] || {};\n state.names[type] = typeEntries;\n\n const variationEntries = typeEntries[normalizedValue] || {};\n typeEntries[normalizedValue] = variationEntries;\n\n const entry = variationEntries[normalizedVariation] ?? {\n proposedNames: {},\n name: null,\n sourceId: null,\n origin: null,\n };\n variationEntries[normalizedVariation] = entry;\n\n callback(entry);\n });\n }\n\n #getCurrentTimeSeconds(): number {\n return Math.round(Date.now() / 1000);\n }\n\n #validateSetNameRequest(request: SetNameRequest) {\n const { name, value, type, sourceId, variation, origin } = request;\n const errorMessages: string[] = [];\n\n this.#validateValue(value, errorMessages);\n this.#validateType(type, errorMessages);\n this.#validateName(name, errorMessages);\n this.#validateSourceId(sourceId, type, name, errorMessages);\n this.#validateVariation(variation, type, errorMessages);\n this.#validateOrigin(origin, name, errorMessages);\n\n if (errorMessages.length) {\n throw new Error(errorMessages.join(' '));\n }\n }\n\n #validateUpdateProposedNamesRequest(request: UpdateProposedNamesRequest) {\n const { value, type, sourceIds, variation } = request;\n const errorMessages: string[] = [];\n\n this.#validateValue(value, errorMessages);\n this.#validateType(type, errorMessages);\n this.#validateSourceIds(sourceIds, type, errorMessages);\n this.#validateDuplicateSourceIds(type, errorMessages);\n this.#validateVariation(variation, type, errorMessages);\n\n if (errorMessages.length) {\n throw new Error(errorMessages.join(' '));\n }\n }\n\n #validateValue(value: string, errorMessages: string[]) {\n if (!value?.length || typeof value !== 'string') {\n errorMessages.push('Must specify a non-empty string for value.');\n }\n }\n\n #validateType(type: NameType, errorMessages: string[]) {\n if (!Object.values(NameType).includes(type)) {\n errorMessages.push(\n `Must specify one of the following types: ${Object.values(\n NameType,\n ).join(', ')}`,\n );\n }\n }\n\n #validateName(name: string | null, errorMessages: string[]) {\n if (name === null) {\n return;\n }\n\n if (!name?.length || typeof name !== 'string') {\n errorMessages.push('Must specify a non-empty string or null for name.');\n }\n }\n\n #validateSourceIds(\n sourceIds: string[] | undefined,\n type: NameType,\n errorMessages: string[],\n ) {\n if (!sourceIds) {\n return;\n }\n\n const allSourceIds = this.#getAllSourceIds(type);\n const missingSourceIds = [];\n\n for (const sourceId of sourceIds) {\n if (!allSourceIds.includes(sourceId)) {\n missingSourceIds.push(sourceId);\n continue;\n }\n }\n\n if (missingSourceIds.length) {\n errorMessages.push(\n `Unknown source IDs for type '${type}': ${missingSourceIds.join(', ')}`,\n );\n }\n }\n\n #validateSourceId(\n sourceId: string | undefined,\n type: NameType,\n name: string | null,\n errorMessages: string[],\n ) {\n if (sourceId === null || sourceId === undefined) {\n return;\n }\n\n if (name === null) {\n errorMessages.push(\n `Cannot specify a source ID when clearing the saved name: ${sourceId}`,\n );\n return;\n }\n\n const allSourceIds = this.#getAllSourceIds(type);\n\n if (!sourceId.length || typeof sourceId !== 'string') {\n errorMessages.push('Must specify a non-empty string for sourceId.');\n return;\n }\n\n if (!allSourceIds.includes(sourceId)) {\n errorMessages.push(`Unknown source ID for type '${type}': ${sourceId}`);\n }\n }\n\n #validateDuplicateSourceIds(type: NameType, errorMessages: string[]) {\n const allSourceIds = this.#getAllSourceIds(type);\n\n const duplicateSourceIds = allSourceIds.filter(\n (sourceId, index) => allSourceIds.indexOf(sourceId) !== index,\n );\n\n if (duplicateSourceIds.length) {\n errorMessages.push(\n `Duplicate source IDs found for type '${type}': ${duplicateSourceIds.join(\n ', ',\n )}`,\n );\n }\n }\n\n #validateVariation(\n variation: string | undefined,\n type: string,\n errorMessages: string[],\n ) {\n if (type !== NameType.ETHEREUM_ADDRESS) {\n return;\n }\n\n if (\n !variation?.length ||\n typeof variation !== 'string' ||\n (!variation.match(/^0x[0-9A-Fa-f]+$/u) &&\n variation !== FALLBACK_VARIATION)\n ) {\n errorMessages.push(\n `Must specify a chain ID in hexidecimal format or the fallback, \"${FALLBACK_VARIATION}\", for variation when using '${type}' type.`,\n );\n }\n }\n\n #validateOrigin(\n origin: NameOrigin | null | undefined,\n name: string | null,\n errorMessages: string[],\n ) {\n if (!origin) {\n return;\n }\n\n if (name === null) {\n errorMessages.push(\n `Cannot specify an origin when clearing the saved name: ${origin}`,\n );\n return;\n }\n\n if (!Object.values(NameOrigin).includes(origin)) {\n errorMessages.push(\n `Must specify one of the following origins: ${Object.values(\n NameOrigin,\n ).join(', ')}`,\n );\n }\n }\n\n #getAllSourceIds(type: NameType): string[] {\n return (\n this.#providers\n /* istanbul ignore next */\n .map((provider) => this.#getSourceIds(provider, type))\n .flat()\n );\n }\n\n #getSourceIds(provider: NameProvider, type: NameType): string[] {\n return provider.getMetadata().sourceIds[type];\n }\n\n #removeDormantProposedNames(\n proposedNames: Record<string, ProposedNamesEntry>,\n type: NameType,\n ) {\n if (Object.keys(proposedNames).length === 0) {\n return;\n }\n\n const typeSourceIds = this.#getAllSourceIds(type);\n\n const dormantSourceIds = Object.keys(proposedNames).filter(\n (sourceId) => !typeSourceIds.includes(sourceId),\n );\n\n for (const dormantSourceId of dormantSourceIds) {\n delete proposedNames[dormantSourceId];\n }\n }\n\n #removeExpiredEntries(): void {\n const currentTime = this.#getCurrentTimeSeconds();\n\n this.update((state: NameControllerState) => {\n const entries = this.#getEntriesList(state);\n for (const { nameType, value, variation, entry } of entries) {\n if (entry.name !== null) {\n continue;\n }\n\n const proposedNames = Object.values(entry.proposedNames);\n const allProposedNamesExpired = proposedNames.every(\n (proposedName: ProposedNamesEntry) =>\n currentTime - (proposedName.lastRequestTime ?? 0) >=\n PROPOSED_NAME_EXPIRE_DURATION,\n );\n\n if (allProposedNamesExpired) {\n delete state.names[nameType][value][variation];\n }\n }\n });\n }\n\n #getEntriesList(state: NameControllerState): {\n nameType: NameType;\n value: string;\n variation: string;\n entry: NameEntry;\n }[] {\n return Object.entries(state.names).flatMap(([type, typeEntries]) =>\n Object.entries(typeEntries).flatMap(([value, variationEntries]) =>\n Object.entries(variationEntries).map(([variation, entry]) => ({\n entry,\n nameType: type as NameType,\n value,\n variation,\n })),\n ),\n );\n }\n}\n"],"mappings":";;;;;;;;;;;AAKA,SAAS,sBAAsB;AAUxB,IAAM,qBAAqB;AAC3B,IAAM,gCAAgC,KAAK,KAAK;AAKhD,IAAK,aAAL,kBAAKA,gBAAL;AAEL,EAAAA,YAAA,sBAAmB;AAEnB,EAAAA,YAAA,kBAAe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