@metamask-previews/phishing-controller 17.4.1-preview-abca9bcea → 18.0.0-preview-0a30e47

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/CHANGELOG.md +14 -3
  2. package/dist/{CacheManager.d.mts → CacheManager.d.ts} +1 -1
  3. package/dist/CacheManager.d.ts.map +1 -0
  4. package/dist/CacheManager.js +167 -0
  5. package/dist/CacheManager.js.map +1 -0
  6. package/dist/{PathTrie.d.cts → PathTrie.d.ts} +1 -1
  7. package/dist/PathTrie.d.ts.map +1 -0
  8. package/dist/{PathTrie.mjs → PathTrie.js} +2 -2
  9. package/dist/PathTrie.js.map +1 -0
  10. package/dist/{PhishingController-method-action-types.d.cts → PhishingController-method-action-types.d.ts} +2 -2
  11. package/dist/PhishingController-method-action-types.d.ts.map +1 -0
  12. package/dist/{PhishingController-method-action-types.mjs → PhishingController-method-action-types.js} +1 -1
  13. package/dist/PhishingController-method-action-types.js.map +1 -0
  14. package/dist/{PhishingController.d.cts → PhishingController.d.ts} +10 -10
  15. package/dist/PhishingController.d.ts.map +1 -0
  16. package/dist/PhishingController.js +1256 -0
  17. package/dist/PhishingController.js.map +1 -0
  18. package/dist/{PhishingDetector.d.mts → PhishingDetector.d.ts} +3 -3
  19. package/dist/PhishingDetector.d.ts.map +1 -0
  20. package/dist/PhishingDetector.js +266 -0
  21. package/dist/PhishingDetector.js.map +1 -0
  22. package/dist/{address-poisoning.d.cts → address-poisoning.d.ts} +2 -2
  23. package/dist/address-poisoning.d.ts.map +1 -0
  24. package/dist/{address-poisoning.mjs → address-poisoning.js} +2 -2
  25. package/dist/address-poisoning.js.map +1 -0
  26. package/dist/{index.d.cts → index.d.ts} +12 -12
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +7 -0
  29. package/dist/index.js.map +1 -0
  30. package/dist/tests/{utils.d.mts → utils.d.ts} +3 -3
  31. package/dist/tests/utils.d.ts.map +1 -0
  32. package/dist/tests/{utils.mjs → utils.js} +2 -2
  33. package/dist/tests/utils.js.map +1 -0
  34. package/dist/{types.d.mts → types.d.ts} +62 -62
  35. package/dist/types.d.ts.map +1 -0
  36. package/dist/{types.mjs → types.js} +1 -1
  37. package/dist/types.js.map +1 -0
  38. package/dist/{utils.d.mts → utils.d.ts} +72 -72
  39. package/dist/utils.d.ts.map +1 -0
  40. package/dist/{utils.mjs → utils.js} +6 -6
  41. package/dist/utils.js.map +1 -0
  42. package/package.json +17 -21
  43. package/dist/CacheManager.cjs +0 -177
  44. package/dist/CacheManager.cjs.map +0 -1
  45. package/dist/CacheManager.d.cts +0 -104
  46. package/dist/CacheManager.d.cts.map +0 -1
  47. package/dist/CacheManager.d.mts.map +0 -1
  48. package/dist/CacheManager.mjs +0 -173
  49. package/dist/CacheManager.mjs.map +0 -1
  50. package/dist/PathTrie.cjs +0 -169
  51. package/dist/PathTrie.cjs.map +0 -1
  52. package/dist/PathTrie.d.cts.map +0 -1
  53. package/dist/PathTrie.d.mts +0 -46
  54. package/dist/PathTrie.d.mts.map +0 -1
  55. package/dist/PathTrie.mjs.map +0 -1
  56. package/dist/PhishingController-method-action-types.cjs +0 -7
  57. package/dist/PhishingController-method-action-types.cjs.map +0 -1
  58. package/dist/PhishingController-method-action-types.d.cts.map +0 -1
  59. package/dist/PhishingController-method-action-types.d.mts +0 -123
  60. package/dist/PhishingController-method-action-types.d.mts.map +0 -1
  61. package/dist/PhishingController-method-action-types.mjs.map +0 -1
  62. package/dist/PhishingController.cjs +0 -1218
  63. package/dist/PhishingController.cjs.map +0 -1
  64. package/dist/PhishingController.d.cts.map +0 -1
  65. package/dist/PhishingController.d.mts +0 -425
  66. package/dist/PhishingController.d.mts.map +0 -1
  67. package/dist/PhishingController.mjs +0 -1215
  68. package/dist/PhishingController.mjs.map +0 -1
  69. package/dist/PhishingDetector.cjs +0 -283
  70. package/dist/PhishingDetector.cjs.map +0 -1
  71. package/dist/PhishingDetector.d.cts +0 -73
  72. package/dist/PhishingDetector.d.cts.map +0 -1
  73. package/dist/PhishingDetector.d.mts.map +0 -1
  74. package/dist/PhishingDetector.mjs +0 -279
  75. package/dist/PhishingDetector.mjs.map +0 -1
  76. package/dist/address-poisoning.cjs +0 -71
  77. package/dist/address-poisoning.cjs.map +0 -1
  78. package/dist/address-poisoning.d.cts.map +0 -1
  79. package/dist/address-poisoning.d.mts +0 -3
  80. package/dist/address-poisoning.d.mts.map +0 -1
  81. package/dist/address-poisoning.mjs.map +0 -1
  82. package/dist/index.cjs +0 -36
  83. package/dist/index.cjs.map +0 -1
  84. package/dist/index.d.cts.map +0 -1
  85. package/dist/index.d.mts +0 -12
  86. package/dist/index.d.mts.map +0 -1
  87. package/dist/index.mjs +0 -7
  88. package/dist/index.mjs.map +0 -1
  89. package/dist/tests/utils.cjs +0 -102
  90. package/dist/tests/utils.cjs.map +0 -1
  91. package/dist/tests/utils.d.cts +0 -70
  92. package/dist/tests/utils.d.cts.map +0 -1
  93. package/dist/tests/utils.d.mts.map +0 -1
  94. package/dist/tests/utils.mjs.map +0 -1
  95. package/dist/types.cjs +0 -267
  96. package/dist/types.cjs.map +0 -1
  97. package/dist/types.d.cts +0 -338
  98. package/dist/types.d.cts.map +0 -1
  99. package/dist/types.d.mts.map +0 -1
  100. package/dist/types.mjs.map +0 -1
  101. package/dist/utils.cjs +0 -522
  102. package/dist/utils.cjs.map +0 -1
  103. package/dist/utils.d.cts +0 -304
  104. package/dist/utils.d.cts.map +0 -1
  105. package/dist/utils.d.mts.map +0 -1
  106. package/dist/utils.mjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -7,9 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [18.0.0]
11
+
10
12
  ### Changed
11
13
 
12
- - Bump `@metamask/transaction-controller` from `^69.8.0` to `^69.8.1` ([#10124](https://github.com/MetaMask/core/pull/10124))
14
+ - **BREAKING:** Drop CommonJS support ([#9536](https://github.com/MetaMask/core/pull/9536))
15
+ - This package is now ESM-only, but can still be used in CommonJS projects via `require(esm)` in modern Node.js versions (22+), or dynamic imports in older Node.js versions.
16
+ - **BREAKING:** Bump minimum Node.js version to 22 ([#9976](https://github.com/MetaMask/core/pull/9976))
17
+ - **BREAKING:** Bump TypeScript target to ES2022 ([#10019](https://github.com/MetaMask/core/pull/10019))
18
+ - This package now ships ES2022 code, requiring a compatible modern environment or bundler configuration to consume.
19
+ - Bump `@metamask/transaction-controller` from `^69.8.0` to `^70.0.0` ([#10124](https://github.com/MetaMask/core/pull/10124), [#10160](https://github.com/MetaMask/core/pull/10160))
20
+ - Bump `@metamask/address-book-controller` from `^7.1.2` to `^8.0.0` ([#10160](https://github.com/MetaMask/core/pull/10160))
21
+ - Bump `@metamask/base-controller` from `^9.1.0` to `^10.0.0` ([#10160](https://github.com/MetaMask/core/pull/10160))
22
+ - Bump `@metamask/controller-utils` from `^12.3.0` to `^13.0.0` ([#10160](https://github.com/MetaMask/core/pull/10160))
23
+ - Bump `@metamask/messenger` from `^2.0.0` to `^3.0.0` ([#10160](https://github.com/MetaMask/core/pull/10160))
13
24
 
14
25
  ## [17.4.1]
15
26
 
@@ -270,7 +281,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
270
281
 
271
282
  - Bump `@metamask/base-controller` from `^8.0.1` to `^8.4.0` ([#6284](https://github.com/MetaMask/core/pull/6284), [#6355](https://github.com/MetaMask/core/pull/6355), [#6465](https://github.com/MetaMask/core/pull/6465), [#6632](https://github.com/MetaMask/core/pull/6632))
272
283
  - Bump `@metamask/controller-utils` from `^11.11.0` to `^11.14.0` ([#6303](https://github.com/MetaMask/core/pull/6303), [#6620](https://github.com/MetaMask/core/pull/6620), [#6629](https://github.com/MetaMask/core/pull/6629))
273
-
274
284
  - Bump `@noble/hashes` from `^1.4.0` to `^1.8.0` ([#6101](https://github.com/MetaMask/core/pull/6101))
275
285
 
276
286
  ## [13.1.0]
@@ -658,7 +668,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
658
668
 
659
669
  All changes listed after this point were applied to this package following the monorepo conversion.
660
670
 
661
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@17.4.1...HEAD
671
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@18.0.0...HEAD
672
+ [18.0.0]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@17.4.1...@metamask/phishing-controller@18.0.0
662
673
  [17.4.1]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@17.4.0...@metamask/phishing-controller@17.4.1
663
674
  [17.4.0]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@17.3.1...@metamask/phishing-controller@17.4.0
664
675
  [17.3.1]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@17.3.0...@metamask/phishing-controller@17.3.1
@@ -101,4 +101,4 @@ export declare class CacheManager<T> {
101
101
  */
102
102
  getAllEntries(): Record<string, CacheEntry<T>>;
103
103
  }
104
- //# sourceMappingURL=CacheManager.d.mts.map
104
+ //# sourceMappingURL=CacheManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CacheManager.d.ts","sourceRoot":"","sources":["../src/CacheManager.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,UAAU,CAAC,CAAC,IAAI;IAC1B,IAAI,EAAE,CAAC,CAAC;IACR,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;CAC7D,CAAC;AAEF;;;;GAIG;AACH,qBAAa,YAAY,CAAC,CAAC;;IASzB;;;;;;;;OAQG;IACH,YAAY,EACV,QAAc,EAAE,oBAAoB;IACpC,YAAkB,EAClB,YAAiB,EACjB,WAAW,GACZ,EAAE,mBAAmB,CAAC,CAAC,CAAC,EAMxB;IAED;;;;OAIG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAExB;IAED;;;;OAIG;IACH,MAAM,IAAI,MAAM,CAEf;IAED;;;;OAIG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAGhC;IAED;;;;OAIG;IACH,UAAU,IAAI,MAAM,CAEnB;IAED;;;;OAIG;IACH,OAAO,IAAI,MAAM,CAEhB;IAED;;OAEG;IACH,KAAK,IAAI,IAAI,CAGZ;IAED;;;;;OAKG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAgB9B;IAED;;;;;OAKG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC,GAAG,IAAI,CAQ9B;IAED;;;;;OAKG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAM3B;IAED;;;;OAIG;IACH,IAAI,IAAI,MAAM,EAAE,CAEf;IAED;;;;;OAKG;IACH,aAAa,IAAI,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,CAE7C;CA4BF"}
@@ -0,0 +1,167 @@
1
+ import { fetchTimeNow } from './utils.js';
2
+ /**
3
+ * Generic cache manager with TTL and size limit support
4
+ *
5
+ * @template T - The type of data to cache
6
+ */
7
+ export class CacheManager {
8
+ #cacheTTL;
9
+ #maxCacheSize;
10
+ #cache;
11
+ #updateState;
12
+ /**
13
+ * Constructor for CacheManager
14
+ *
15
+ * @param options - Cache configuration options
16
+ * @param options.cacheTTL - Time to live in seconds for cached entries
17
+ * @param options.maxCacheSize - Maximum number of entries in the cache
18
+ * @param options.initialCache - Initial cache state
19
+ * @param options.updateState - Function to update the state when cache changes
20
+ */
21
+ constructor({ cacheTTL = 300, // 5 minutes default
22
+ maxCacheSize = 100, initialCache = {}, updateState, }) {
23
+ this.#cacheTTL = cacheTTL;
24
+ this.#maxCacheSize = maxCacheSize;
25
+ this.#cache = new Map(Object.entries(initialCache));
26
+ this.#updateState = updateState;
27
+ this.#evictEntries();
28
+ }
29
+ /**
30
+ * Set the time-to-live for cached entries
31
+ *
32
+ * @param ttl - The TTL in seconds
33
+ */
34
+ setTTL(ttl) {
35
+ this.#cacheTTL = ttl;
36
+ }
37
+ /**
38
+ * Get the current TTL setting
39
+ *
40
+ * @returns The TTL in seconds
41
+ */
42
+ getTTL() {
43
+ return this.#cacheTTL;
44
+ }
45
+ /**
46
+ * Set the maximum cache size
47
+ *
48
+ * @param maxSize - The maximum cache size
49
+ */
50
+ setMaxSize(maxSize) {
51
+ this.#maxCacheSize = maxSize;
52
+ this.#evictEntries();
53
+ }
54
+ /**
55
+ * Get the current maximum cache size
56
+ *
57
+ * @returns The maximum cache size
58
+ */
59
+ getMaxSize() {
60
+ return this.#maxCacheSize;
61
+ }
62
+ /**
63
+ * Get the current cache size
64
+ *
65
+ * @returns The current number of entries in the cache
66
+ */
67
+ getSize() {
68
+ return this.#cache.size;
69
+ }
70
+ /**
71
+ * Clear the cache
72
+ */
73
+ clear() {
74
+ this.#cache.clear();
75
+ this.#persistCache();
76
+ }
77
+ /**
78
+ * Get a cached result if it exists and is not expired
79
+ *
80
+ * @param key - The cache key
81
+ * @returns The cached data or undefined if not found or expired
82
+ */
83
+ get(key) {
84
+ const cacheEntry = this.#cache.get(key);
85
+ if (!cacheEntry) {
86
+ return undefined;
87
+ }
88
+ // Check if the entry is expired
89
+ const now = fetchTimeNow();
90
+ if (now - cacheEntry.timestamp > this.#cacheTTL) {
91
+ // Entry expired, remove it from cache
92
+ this.#cache.delete(key);
93
+ this.#persistCache();
94
+ return undefined;
95
+ }
96
+ return cacheEntry.data;
97
+ }
98
+ /**
99
+ * Add an entry to the cache, evicting oldest entries if necessary
100
+ *
101
+ * @param key - The cache key
102
+ * @param data - The data to cache
103
+ */
104
+ set(key, data) {
105
+ this.#cache.set(key, {
106
+ data,
107
+ timestamp: fetchTimeNow(),
108
+ });
109
+ this.#evictEntries();
110
+ this.#persistCache();
111
+ }
112
+ /**
113
+ * Delete a specific entry from the cache
114
+ *
115
+ * @param key - The cache key
116
+ * @returns True if an entry was deleted
117
+ */
118
+ delete(key) {
119
+ const result = this.#cache.delete(key);
120
+ if (result) {
121
+ this.#persistCache();
122
+ }
123
+ return result;
124
+ }
125
+ /**
126
+ * Get all keys in the cache
127
+ *
128
+ * @returns Array of cache keys
129
+ */
130
+ keys() {
131
+ return Array.from(this.#cache.keys());
132
+ }
133
+ /**
134
+ * Get all entries in the cache (including expired ones)
135
+ * Useful for debugging or persistence
136
+ *
137
+ * @returns Record of all cache entries
138
+ */
139
+ getAllEntries() {
140
+ return Object.fromEntries(this.#cache);
141
+ }
142
+ /**
143
+ * Persist the current cache state
144
+ */
145
+ #persistCache() {
146
+ this.#updateState(Object.fromEntries(this.#cache));
147
+ }
148
+ /**
149
+ * Evict oldest entries if cache exceeds max size
150
+ */
151
+ #evictEntries() {
152
+ if (this.#cache.size <= this.#maxCacheSize) {
153
+ return;
154
+ }
155
+ const entriesToRemove = this.#cache.size - this.#maxCacheSize;
156
+ let count = 0;
157
+ // Delete the oldest entries (Map maintains insertion order)
158
+ for (const key of this.#cache.keys()) {
159
+ if (count >= entriesToRemove) {
160
+ break;
161
+ }
162
+ this.#cache.delete(key);
163
+ count += 1;
164
+ }
165
+ }
166
+ }
167
+ //# sourceMappingURL=CacheManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CacheManager.js","sourceRoot":"","sources":["../src/CacheManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAoB1C;;;;GAIG;AACH,MAAM,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AC,IAAI,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YAC3C,OAAO;QACT,CAAC;QAED,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,GAAG,IAAI,CAAC,aAAa,CAAC;QAC9D,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,4DAA4D;QAC5D,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,CAAC;YACrC,IAAI,KAAK,IAAI,eAAe,EAAE,CAAC;gBAC7B,MAAM;YACR,CAAC;YACD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACxB,KAAK,IAAI,CAAC,CAAC;QACb,CAAC;IACH,CAAC;CACF","sourcesContent":["import { fetchTimeNow } from './utils.js';\n\n/**\n * Generic cache entry type that wraps the data with a timestamp\n */\nexport type CacheEntry<T> = {\n data: T;\n timestamp: number;\n};\n\n/**\n * Configuration options for CacheManager\n */\nexport type CacheManagerOptions<T> = {\n cacheTTL?: number;\n maxCacheSize?: number;\n initialCache?: Record<string, CacheEntry<T>>;\n updateState: (cache: Record<string, CacheEntry<T>>) => void;\n};\n\n/**\n * Generic cache manager with TTL and size limit support\n *\n * @template T - The type of data to cache\n */\nexport class CacheManager<T> {\n #cacheTTL: number;\n\n #maxCacheSize: number;\n\n readonly #cache: Map<string, CacheEntry<T>>;\n\n readonly #updateState: (cache: Record<string, CacheEntry<T>>) => void;\n\n /**\n * Constructor for CacheManager\n *\n * @param options - Cache configuration options\n * @param options.cacheTTL - Time to live in seconds for cached entries\n * @param options.maxCacheSize - Maximum number of entries in the cache\n * @param options.initialCache - Initial cache state\n * @param options.updateState - Function to update the state when cache changes\n */\n constructor({\n cacheTTL = 300, // 5 minutes default\n maxCacheSize = 100,\n initialCache = {},\n updateState,\n }: CacheManagerOptions<T>) {\n this.#cacheTTL = cacheTTL;\n this.#maxCacheSize = maxCacheSize;\n this.#cache = new Map(Object.entries(initialCache));\n this.#updateState = updateState;\n this.#evictEntries();\n }\n\n /**\n * Set the time-to-live for cached entries\n *\n * @param ttl - The TTL in seconds\n */\n setTTL(ttl: number): void {\n this.#cacheTTL = ttl;\n }\n\n /**\n * Get the current TTL setting\n *\n * @returns The TTL in seconds\n */\n getTTL(): number {\n return this.#cacheTTL;\n }\n\n /**\n * Set the maximum cache size\n *\n * @param maxSize - The maximum cache size\n */\n setMaxSize(maxSize: number): void {\n this.#maxCacheSize = maxSize;\n this.#evictEntries();\n }\n\n /**\n * Get the current maximum cache size\n *\n * @returns The maximum cache size\n */\n getMaxSize(): number {\n return this.#maxCacheSize;\n }\n\n /**\n * Get the current cache size\n *\n * @returns The current number of entries in the cache\n */\n getSize(): number {\n return this.#cache.size;\n }\n\n /**\n * Clear the cache\n */\n clear(): void {\n this.#cache.clear();\n this.#persistCache();\n }\n\n /**\n * Get a cached result if it exists and is not expired\n *\n * @param key - The cache key\n * @returns The cached data or undefined if not found or expired\n */\n get(key: string): T | undefined {\n const cacheEntry = this.#cache.get(key);\n if (!cacheEntry) {\n return undefined;\n }\n\n // Check if the entry is expired\n const now = fetchTimeNow();\n if (now - cacheEntry.timestamp > this.#cacheTTL) {\n // Entry expired, remove it from cache\n this.#cache.delete(key);\n this.#persistCache();\n return undefined;\n }\n\n return cacheEntry.data;\n }\n\n /**\n * Add an entry to the cache, evicting oldest entries if necessary\n *\n * @param key - The cache key\n * @param data - The data to cache\n */\n set(key: string, data: T): void {\n this.#cache.set(key, {\n data,\n timestamp: fetchTimeNow(),\n });\n\n this.#evictEntries();\n this.#persistCache();\n }\n\n /**\n * Delete a specific entry from the cache\n *\n * @param key - The cache key\n * @returns True if an entry was deleted\n */\n delete(key: string): boolean {\n const result = this.#cache.delete(key);\n if (result) {\n this.#persistCache();\n }\n return result;\n }\n\n /**\n * Get all keys in the cache\n *\n * @returns Array of cache keys\n */\n keys(): string[] {\n return Array.from(this.#cache.keys());\n }\n\n /**\n * Get all entries in the cache (including expired ones)\n * Useful for debugging or persistence\n *\n * @returns Record of all cache entries\n */\n getAllEntries(): Record<string, CacheEntry<T>> {\n return Object.fromEntries(this.#cache);\n }\n\n /**\n * Persist the current cache state\n */\n #persistCache(): void {\n this.#updateState(Object.fromEntries(this.#cache));\n }\n\n /**\n * Evict oldest entries if cache exceeds max size\n */\n #evictEntries(): void {\n if (this.#cache.size <= this.#maxCacheSize) {\n return;\n }\n\n const entriesToRemove = this.#cache.size - this.#maxCacheSize;\n let count = 0;\n // Delete the oldest entries (Map maintains insertion order)\n for (const key of this.#cache.keys()) {\n if (count >= entriesToRemove) {\n break;\n }\n this.#cache.delete(key);\n count += 1;\n }\n }\n}\n"]}
@@ -43,4 +43,4 @@ export declare const convertListToTrie: (paths?: string[]) => PathTrie;
43
43
  * @returns A deep copy of the PathTrie.
44
44
  */
45
45
  export declare const deepCopyPathTrie: (original: PathTrie | undefined | null) => PathTrie;
46
- //# sourceMappingURL=PathTrie.d.cts.map
46
+ //# sourceMappingURL=PathTrie.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PathTrie.d.ts","sourceRoot":"","sources":["../src/PathTrie.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAAG;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,QAAQ,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAEhD,eAAO,MAAM,UAAU,SAAU,QAAQ,GAAG,SAAS,KAAG,OAKvD,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,QAAS,MAAM,YAAY,QAAQ,SA0C3D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,QAAS,MAAM,YAAY,QAAQ,SA+B7D,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,iBAAiB,QACvB,MAAM,YACD,QAAQ,KACjB,MAAM,GAAG,IAuBX,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,WAAW,MAAM,EAAE,KAAQ,QASxD,CAAC;AAkBF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,aACjB,QAAQ,GAAG,SAAS,GAAG,IAAI,KACpC,QAKF,CAAC"}
@@ -1,4 +1,4 @@
1
- import { getHostnameAndPathComponents } from "./utils.mjs";
1
+ import { getHostnameAndPathComponents } from './utils.js';
2
2
  export const isTerminal = (node) => {
3
3
  if (!node || typeof node !== 'object') {
4
4
  return false;
@@ -157,4 +157,4 @@ export const deepCopyPathTrie = (original) => {
157
157
  }
158
158
  return deepCopyPathNode(original);
159
159
  };
160
- //# sourceMappingURL=PathTrie.mjs.map
160
+ //# sourceMappingURL=PathTrie.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PathTrie.js","sourceRoot":"","sources":["../src/PathTrie.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAQ1D,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,IAA0B,EAAW,EAAE;IAChE,IAAI,CAAC,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;QACtC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC;AACxC,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,GAAW,EAAE,QAAkB,EAAE,EAAE;IAC9D,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,4BAA4B,CAAC,GAAG,CAAC,CAAC;IAEvE,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC7C,OAAO;IACT,CAAC;IAED,MAAM,aAAa,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IAC7C,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;QAC7B,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AAG,CAAC,QAAkB,EAAY,EAAE;IACxD,MAAM,IAAI,GAAa,EAAE,CAAC;IAE1B,KAAK,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxD,IAAI,CAAC,GAAG,CAAC,GAAG,gBAAgB,CAAC,SAAS,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,QAAqC,EAC3B,EAAE;IACZ,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,gBAAgB,CAAC,QAAQ,CAAa,CAAC;AAChD,CAAC,CAAC","sourcesContent":["import { getHostnameAndPathComponents } from './utils.js';\n\nexport type PathNode = {\n [key: string]: PathNode;\n};\n\nexport type PathTrie = Record<string, PathNode>;\n\nexport const isTerminal = (node: PathNode | undefined): boolean => {\n if (!node || typeof node !== 'object') {\n return false;\n }\n return Object.keys(node).length === 0;\n};\n\n/**\n * Insert a URL into the trie.\n *\n * @param url - The URL to insert into the trie.\n * @param pathTrie - The trie to insert the URL into.\n */\nexport const insertToTrie = (url: string, pathTrie: PathTrie) => {\n const { hostname, pathComponents } = getHostnameAndPathComponents(url);\n\n if (pathComponents.length === 0 || !hostname) {\n return;\n }\n\n const lowerHostname = hostname.toLowerCase();\n if (!pathTrie[lowerHostname]) {\n pathTrie[lowerHostname] = {} as PathNode;\n }\n\n let curr: PathNode = pathTrie[lowerHostname];\n for (let i = 0; i < pathComponents.length; i++) {\n const pathComponent = pathComponents[i];\n const isLast = i === pathComponents.length - 1;\n const exists = curr[pathComponent] !== undefined;\n\n if (exists) {\n if (!isLast && isTerminal(curr[pathComponent])) {\n return;\n }\n\n if (isLast) {\n // Prune descendants if the current path component is not terminal\n if (!isTerminal(curr[pathComponent])) {\n curr[pathComponent] = {};\n }\n return;\n }\n curr = curr[pathComponent];\n continue;\n }\n\n if (isLast) {\n curr[pathComponent] = {};\n return;\n }\n const next: PathNode = {};\n curr[pathComponent] = next;\n curr = next;\n }\n};\n\n/**\n * Delete a URL from the trie.\n *\n * @param url - The URL to delete from the trie.\n * @param pathTrie - The trie to delete the URL from.\n */\nexport const deleteFromTrie = (url: string, pathTrie: PathTrie) => {\n const { hostname, pathComponents } = getHostnameAndPathComponents(url);\n\n const lowerHostname = hostname.toLowerCase();\n if (pathComponents.length === 0 || !pathTrie[lowerHostname]) {\n return;\n }\n\n const pathToNode: { node: PathNode; key: string }[] = [\n { node: pathTrie, key: lowerHostname },\n ];\n let curr: PathNode = pathTrie[lowerHostname];\n for (const pathComponent of pathComponents) {\n if (!curr[pathComponent]) {\n return;\n }\n\n pathToNode.push({ node: curr, key: pathComponent });\n curr = curr[pathComponent];\n }\n\n const lastEntry = pathToNode[pathToNode.length - 1];\n delete lastEntry.node[lastEntry.key];\n for (let i = pathToNode.length - 2; i >= 0; i--) {\n const { node, key } = pathToNode[i];\n if (isTerminal(node[key])) {\n delete node[key];\n } else {\n break;\n }\n }\n};\n\n/**\n * Get the concatenated hostname and path components all the way down to the\n * terminal node in the trie that is prefixed in the passed URL. It will only\n * return a string if the terminal node in the trie is contained in the passed\n * URL.\n *\n * @param url - The URL to check.\n * @param pathTrie - The trie to check the URL in.\n * @returns The matched path prefix, or null if no match is found.\n */\nexport const matchedPathPrefix = (\n url: string,\n pathTrie: PathTrie,\n): string | null => {\n const { hostname, pathComponents } = getHostnameAndPathComponents(url);\n\n const lowerHostname = hostname.toLowerCase();\n if (pathComponents.length === 0 || !hostname || !pathTrie[lowerHostname]) {\n return null;\n }\n\n let matchedPath = `${hostname}/`;\n let curr: PathNode = pathTrie[lowerHostname];\n for (const pathComponent of pathComponents) {\n if (!curr[pathComponent]) {\n return null;\n }\n curr = curr[pathComponent];\n // If we've reached a terminal node, then we can return the matched path.\n if (isTerminal(curr)) {\n matchedPath += pathComponent;\n return matchedPath;\n }\n matchedPath += `${pathComponent}/`;\n }\n return null;\n};\n\n/**\n * Converts a list ofpaths into a PathTrie structure. This assumes that the\n * entries are only hostname+pathname format.\n *\n * @param paths - Array of hostname+pathname\n * @returns PathTrie structure for efficient path checking\n */\nexport const convertListToTrie = (paths: string[] = []): PathTrie => {\n const pathTrie: PathTrie = {};\n if (!paths || !Array.isArray(paths)) {\n return pathTrie;\n }\n for (const path of paths) {\n insertToTrie(path, pathTrie);\n }\n return pathTrie;\n};\n\n/**\n * Creates a deep copy of a PathNode structure.\n *\n * @param original - The original PathNode to copy.\n * @returns A deep copy of the PathNode.\n */\nconst deepCopyPathNode = (original: PathNode): PathNode => {\n const copy: PathNode = {};\n\n for (const [key, childNode] of Object.entries(original)) {\n copy[key] = deepCopyPathNode(childNode);\n }\n\n return copy;\n};\n\n/**\n * Creates a deep copy of a PathTrie structure.\n *\n * @param original - The original PathTrie to copy.\n * @returns A deep copy of the PathTrie.\n */\nexport const deepCopyPathTrie = (\n original: PathTrie | undefined | null,\n): PathTrie => {\n if (!original) {\n return {};\n }\n return deepCopyPathNode(original) as PathTrie;\n};\n"]}
@@ -2,7 +2,7 @@
2
2
  * This file is auto generated.
3
3
  * Do not edit manually.
4
4
  */
5
- import type { PhishingController } from "./PhishingController.cjs";
5
+ import type { PhishingController } from './PhishingController.js';
6
6
  /**
7
7
  * Finds known recipient addresses that look like an address poisoning match.
8
8
  *
@@ -120,4 +120,4 @@ export type PhishingControllerGetApprovalsAction = {
120
120
  * Union of all PhishingController action types.
121
121
  */
122
122
  export type PhishingControllerMethodActions = PhishingControllerCheckAddressPoisoningAction | PhishingControllerMaybeUpdateStateAction | PhishingControllerTestOriginAction | PhishingControllerIsBlockedRequestAction | PhishingControllerBypassAction | PhishingControllerScanUrlAction | PhishingControllerBulkScanUrlsAction | PhishingControllerScanAddressAction | PhishingControllerBulkScanTokensAction | PhishingControllerGetApprovalsAction;
123
- //# sourceMappingURL=PhishingController-method-action-types.d.cts.map
123
+ //# sourceMappingURL=PhishingController-method-action-types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PhishingController-method-action-types.d.ts","sourceRoot":"","sources":["../src/PhishingController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE;;;;;GAKG;AACH,MAAM,MAAM,6CAA6C,GAAG;IAC1D,IAAI,EAAE,0CAA0C,CAAC;IACjD,OAAO,EAAE,kBAAkB,CAAC,uBAAuB,CAAC,CAAC;CACtD,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,wCAAwC,GAAG;IACrD,IAAI,EAAE,qCAAqC,CAAC;IAC5C,OAAO,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,CAAC;CACjD,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,+BAA+B,CAAC;IACtC,OAAO,EAAE,kBAAkB,CAAC,YAAY,CAAC,CAAC;CAC3C,CAAC;AAEF;;;;;;;;;GASG;AACH,MAAM,MAAM,wCAAwC,GAAG;IACrD,IAAI,EAAE,qCAAqC,CAAC;IAC5C,OAAO,EAAE,kBAAkB,CAAC,kBAAkB,CAAC,CAAC;CACjD,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,8BAA8B,GAAG;IAC3C,IAAI,EAAE,2BAA2B,CAAC;IAClC,OAAO,EAAE,kBAAkB,CAAC,QAAQ,CAAC,CAAC;CACvC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,MAAM,+BAA+B,GAAG;IAC5C,IAAI,EAAE,4BAA4B,CAAC;IACnC,OAAO,EAAE,kBAAkB,CAAC,SAAS,CAAC,CAAC;CACxC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;CAC7C,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,mCAAmC,GAAG;IAChD,IAAI,EAAE,gCAAgC,CAAC;IACvC,OAAO,EAAE,kBAAkB,CAAC,aAAa,CAAC,CAAC;CAC5C,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,sCAAsC,GAAG;IACnD,IAAI,EAAE,mCAAmC,CAAC;IAC1C,OAAO,EAAE,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG;IACjD,IAAI,EAAE,iCAAiC,CAAC;IACxC,OAAO,EAAE,kBAAkB,CAAC,cAAc,CAAC,CAAC;CAC7C,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,+BAA+B,GACvC,6CAA6C,GAC7C,wCAAwC,GACxC,kCAAkC,GAClC,wCAAwC,GACxC,8BAA8B,GAC9B,+BAA+B,GAC/B,oCAAoC,GACpC,mCAAmC,GACnC,sCAAsC,GACtC,oCAAoC,CAAC"}
@@ -3,4 +3,4 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
  export {};
6
- //# sourceMappingURL=PhishingController-method-action-types.mjs.map
6
+ //# sourceMappingURL=PhishingController-method-action-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PhishingController-method-action-types.js","sourceRoot":"","sources":["../src/PhishingController-method-action-types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/**\n * This file is auto generated.\n * Do not edit manually.\n */\n\nimport type { PhishingController } from './PhishingController.js';\n\n/**\n * Finds known recipient addresses that look like an address poisoning match.\n *\n * @param candidate - The recipient address being checked.\n * @returns Similar known recipient matches sorted by score.\n */\nexport type PhishingControllerCheckAddressPoisoningAction = {\n type: `PhishingController:checkAddressPoisoning`;\n handler: PhishingController['checkAddressPoisoning'];\n};\n\n/**\n * Conditionally update the phishing configuration.\n *\n * If the stalelist configuration is out of date, this function will call `updateStalelist`\n * to update the configuration. This will automatically grab the hotlist,\n * so it isn't necessary to continue on to download the hotlist and the c2 domain blocklist.\n *\n */\nexport type PhishingControllerMaybeUpdateStateAction = {\n type: `PhishingController:maybeUpdateState`;\n handler: PhishingController['maybeUpdateState'];\n};\n\n/**\n * Determines if a given origin is unapproved.\n *\n * It is strongly recommended that you call {@link maybeUpdateState} before calling this,\n * to check whether the phishing configuration is up-to-date. It will be updated if necessary\n * by calling {@link updateStalelist} or {@link updateHotlist}.\n *\n * @param origin - Domain origin of a website.\n * @returns Whether the origin is an unapproved origin.\n */\nexport type PhishingControllerTestOriginAction = {\n type: `PhishingController:testOrigin`;\n handler: PhishingController['testOrigin'];\n};\n\n/**\n * Checks if a request URL's domain is blocked against the request blocklist.\n *\n * This method is used to determine if a specific request URL is associated with a malicious\n * command and control (C2) domain. The URL's hostname is hashed and checked against a configured\n * blocklist of known malicious domains.\n *\n * @param origin - The full request URL to be checked.\n * @returns An object indicating whether the URL's domain is blocked and relevant metadata.\n */\nexport type PhishingControllerIsBlockedRequestAction = {\n type: `PhishingController:isBlockedRequest`;\n handler: PhishingController['isBlockedRequest'];\n};\n\n/**\n * Temporarily marks a given origin as approved.\n *\n * @param origin - The origin to mark as approved.\n */\nexport type PhishingControllerBypassAction = {\n type: `PhishingController:bypass`;\n handler: PhishingController['bypass'];\n};\n\n/**\n * Scan a URL for phishing. For most hosts only the hostname is sent to the API; for known\n * shared gateways the pathname is included (see `PHISHING_DETECTION_PATH_BASED_ROOT_DOMAINS`).\n * Only supports web URLs (`http:` / `https:`).\n *\n * @param url - The URL to scan.\n * @returns The phishing detection scan result.\n */\nexport type PhishingControllerScanUrlAction = {\n type: `PhishingController:scanUrl`;\n handler: PhishingController['scanUrl'];\n};\n\n/**\n * Scan multiple URLs for phishing in bulk. It will only scan the hostnames of the URLs.\n * It also only supports web URLs.\n *\n * @param urls - The URLs to scan.\n * @returns A mapping of URLs to their phishing detection scan results and errors.\n */\nexport type PhishingControllerBulkScanUrlsAction = {\n type: `PhishingController:bulkScanUrls`;\n handler: PhishingController['bulkScanUrls'];\n};\n\n/**\n * Scan an address for security alerts.\n *\n * @param chainId - The chain ID in hex format (e.g., '0x1' for Ethereum).\n * @param address - The address to scan.\n * @returns The address scan result.\n */\nexport type PhishingControllerScanAddressAction = {\n type: `PhishingController:scanAddress`;\n handler: PhishingController['scanAddress'];\n};\n\n/**\n * Scan multiple tokens for malicious activity in bulk.\n *\n * @param request - The bulk scan request containing chainId and tokens.\n * @param request.chainId - The chain identifier. Accepts a hex chain ID for\n * EVM chains (e.g. `'0x1'` for Ethereum) or a chain name for non-EVM chains\n * (e.g. `'solana'`).\n * @param request.tokens - Array of token addresses to scan.\n * @returns A mapping of token addresses to their scan results. For EVM chains,\n * addresses are lowercased; for non-EVM chains, original casing is preserved.\n * Tokens that fail to scan are omitted.\n */\nexport type PhishingControllerBulkScanTokensAction = {\n type: `PhishingController:bulkScanTokens`;\n handler: PhishingController['bulkScanTokens'];\n};\n\nexport type PhishingControllerGetApprovalsAction = {\n type: `PhishingController:getApprovals`;\n handler: PhishingController['getApprovals'];\n};\n\n/**\n * Union of all PhishingController action types.\n */\nexport type PhishingControllerMethodActions =\n | PhishingControllerCheckAddressPoisoningAction\n | PhishingControllerMaybeUpdateStateAction\n | PhishingControllerTestOriginAction\n | PhishingControllerIsBlockedRequestAction\n | PhishingControllerBypassAction\n | PhishingControllerScanUrlAction\n | PhishingControllerBulkScanUrlsAction\n | PhishingControllerScanAddressAction\n | PhishingControllerBulkScanTokensAction\n | PhishingControllerGetApprovalsAction;\n"]}
@@ -1,12 +1,12 @@
1
- import type { AddressBookControllerGetStateAction, AddressBookControllerStateChangeEvent } from "@metamask/address-book-controller";
2
- import { BaseController } from "@metamask/base-controller";
3
- import type { ControllerGetStateAction, ControllerStateChangeEvent } from "@metamask/base-controller";
4
- import type { Messenger } from "@metamask/messenger";
5
- import type { TransactionControllerGetStateAction, TransactionControllerStateChangeEvent } from "@metamask/transaction-controller";
6
- import type { CacheEntry } from "./CacheManager.cjs";
7
- import type { PathTrie } from "./PathTrie.cjs";
8
- import type { PhishingControllerMaybeUpdateStateAction, PhishingControllerMethodActions, PhishingControllerTestOriginAction } from "./PhishingController-method-action-types.cjs";
9
- import type { PhishingDetectorResult, PhishingDetectionScanResult, TokenScanCacheData, BulkTokenScanResponse, BulkTokenScanRequest, AddressScanCacheData, AddressScanResult, SimilarAddressMatch, ApprovalsResponse } from "./types.cjs";
1
+ import type { AddressBookControllerGetStateAction, AddressBookControllerStateChangeEvent } from '@metamask/address-book-controller';
2
+ import { BaseController } from '@metamask/base-controller';
3
+ import type { ControllerGetStateAction, ControllerStateChangeEvent } from '@metamask/base-controller';
4
+ import type { Messenger } from '@metamask/messenger';
5
+ import type { TransactionControllerGetStateAction, TransactionControllerStateChangeEvent } from '@metamask/transaction-controller';
6
+ import type { CacheEntry } from './CacheManager.js';
7
+ import type { PathTrie } from './PathTrie.js';
8
+ import type { PhishingControllerMaybeUpdateStateAction, PhishingControllerMethodActions, PhishingControllerTestOriginAction } from './PhishingController-method-action-types.js';
9
+ import type { PhishingDetectorResult, PhishingDetectionScanResult, TokenScanCacheData, BulkTokenScanResponse, BulkTokenScanRequest, AddressScanCacheData, AddressScanResult, SimilarAddressMatch, ApprovalsResponse } from './types.js';
10
10
  export declare const PHISHING_CONFIG_BASE_URL = "https://phishing-detection.api.cx.metamask.io";
11
11
  export declare const METAMASK_STALELIST_FILE = "/v1/stalelist";
12
12
  export declare const METAMASK_HOTLIST_DIFF_FILE = "/v2/diffsSince";
@@ -422,4 +422,4 @@ export declare class PhishingController extends BaseController<typeof controller
422
422
  }
423
423
  export default PhishingController;
424
424
  export type { PhishingDetectorResult };
425
- //# sourceMappingURL=PhishingController.d.cts.map
425
+ //# sourceMappingURL=PhishingController.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PhishingController.d.ts","sourceRoot":"","sources":["../src/PhishingController.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mCAAmC,EAEnC,qC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