@metamask-previews/phishing-controller 18.2.1-preview-d0145b59e → 18.2.1-preview-896e0b6

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
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
  ### Added
11
11
 
12
12
  - Add support for Node.js 26 ([#10981](https://github.com/MetaMask/core/pull/10981))
13
+ - Enable Arc (`0x13b2`) token scanning now that the Security Alerts API supports Arc token verdicts ([#11144](https://github.com/MetaMask/core/pull/11144))
13
14
 
14
15
  ### Changed
15
16
 
package/dist/types.d.ts CHANGED
@@ -282,7 +282,7 @@ export type SimilarityOptions = {
282
282
  };
283
283
  export declare const APPROVAL_SUPPORTED_CHAINS: readonly ['ethereum', 'polygon', 'bsc', 'avalanche', 'arbitrum', 'base', 'linea', 'optimism'];
284
284
  export type ApprovalSupportedChain = (typeof APPROVAL_SUPPORTED_CHAINS)[number];
285
- export declare const TOKEN_SCAN_SUPPORTED_CHAINS: readonly ['arbitrum', 'avalanche', 'base', 'bsc', 'ethereum', 'optimism', 'polygon', 'zora', 'solana', 'starknet', 'starknet-sepolia', 'stellar', 'linea', 'degen', 'zksync', 'scroll', 'blast', 'soneium-minato', 'base-sepolia', 'bitcoin', 'abstract', 'soneium', 'ink', 'berachain', 'unichain', 'ronin', 'sui', 'hedera', 'hyperevm', 'xlayer', 'monad', 'megaeth', 'tempo', 'sei', 'kaia', 'tron', 'robinhood'];
285
+ export declare const TOKEN_SCAN_SUPPORTED_CHAINS: readonly ['arbitrum', 'avalanche', 'base', 'bsc', 'ethereum', 'optimism', 'polygon', 'zora', 'solana', 'starknet', 'starknet-sepolia', 'stellar', 'linea', 'degen', 'zksync', 'scroll', 'blast', 'soneium-minato', 'base-sepolia', 'bitcoin', 'abstract', 'arc', 'soneium', 'ink', 'berachain', 'unichain', 'ronin', 'sui', 'hedera', 'hyperevm', 'xlayer', 'monad', 'megaeth', 'tempo', 'sei', 'kaia', 'tron', 'robinhood'];
286
286
  export type TokenScanSupportedChain = (typeof TOKEN_SCAN_SUPPORTED_CHAINS)[number];
287
287
  export declare const ADDRESS_SCAN_SUPPORTED_CHAINS: readonly ['arbitrum', 'avalanche', 'base', 'base-sepolia', 'bsc', 'ethereum', 'optimism', 'polygon', 'zksync', 'zksync-sepolia', 'zora', 'linea', 'blast', 'scroll', 'ethereum-sepolia', 'degen', 'avalanche-fuji', 'gnosis', 'worldchain', 'soneium-minato', 'ronin', 'apechain', 'berachain', 'berachain-bartio', 'ink', 'ink-sepolia', 'abstract', 'abstract-testnet', 'soneium', 'unichain', 'sei', 'flow-evm', 'hyperevm', 'megaeth', 'katana', 'plume', 'xlayer', 'monad', 'monad-testnet', 'tempo', 'tempo-testnet', 'kite-ai', 'kaia', 'plasma', 'mantle', 'robinhood', 'arc'];
288
288
  export type AddressScanSupportedChain = (typeof ADDRESS_SCAN_SUPPORTED_CHAINS)[number];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;;;OAWG;IACH,IAAI,EAAE,0BAA0B,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,oBAAY,0BAA0B;IAIpC,GAAG,QAAQ;IAIX,KAAK,UAAU;IAIf,SAAS,cAAc;IAIvB,SAAS,cAAc;IAKvB,SAAS,cAAc;IAKvB,SAAS,cAAc;IAIvB,iBAAiB,sBAAsB;CACxC;AAED;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;OAEG;IACH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AAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,QAAQ,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,kBAAkB,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,QAAQ,EAAE,CAAC;CACvB,CAAC"}
package/dist/types.js CHANGED
@@ -181,6 +181,7 @@ export const TOKEN_SCAN_SUPPORTED_CHAINS = [
181
181
  'base-sepolia',
182
182
  'bitcoin',
183
183
  'abstract',
184
+ 'arc',
184
185
  'soneium',
185
186
  'ink',
186
187
  'berachain',
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAuCA;;GAEG;AACH,MAAM,CAAN,IAAY,0BA+BX;AA/BD,WAAY,0BAA0B;IACpC;;OAEG;IACH,yCAAW,CAAA;IACX;;OAEG;IACH,6CAAe,CAAA;IACf;;OAEG;IACH,qDAAuB,CAAA;IACvB;;OAEG;IACH,qDAAuB,CAAA;IACvB;;;OAGG;IACH,qDAAuB,CAAA;IACvB;;;OAGG;IACH,qDAAuB,CAAA;IACvB;;OAEG;IACH,qEAAuC,CAAA;AACzC,CAAC,EA/BW,0BAA0B,KAA1B,0BAA0B,QA+BrC;AA8BD;;GAE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ALW,mBAAmB,KAAnB,mBAAmB,QAK9B","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\n/**\n * Represents the result of checking a domain.\n */\nexport type PhishingDetectorResult = {\n /**\n * The name of the configuration object in which the domain was found within\n * an allowlist, blocklist, or fuzzylist.\n */\n name?: string;\n /**\n * The version associated with the configuration object in which the domain\n * was found within an allowlist, blocklist, or fuzzylist.\n */\n version?: string;\n /**\n * Whether the domain is regarded as allowed (true) or not (false).\n */\n result: boolean;\n /**\n * A normalized version of the domain, which is only constructed if the domain\n * is found within a list.\n */\n match?: string;\n /**\n * Which type of list in which the domain was found.\n *\n * - \"allowlist\" means that the domain was found in the allowlist.\n * - \"blocklist\" means that the domain was found in the blocklist.\n * - \"fuzzy\" means that the domain was found in the fuzzylist.\n * - \"blacklist\" means that the domain was found in a blacklist of a legacy\n * configuration object.\n * - \"whitelist\" means that the domain was found in a whitelist of a legacy\n * configuration object.\n * - \"all\" means that the domain was not found in any list.\n */\n type: PhishingDetectorResultType;\n};\n\n/**\n * The type of list in which the domain was found.\n */\nexport enum PhishingDetectorResultType {\n /*\n * \"all\" means that the domain was not found in any list.\n */\n All = 'all',\n /*\n * \"fuzzy\" means that the domain was found in the fuzzylist.\n */\n Fuzzy = 'fuzzy',\n /*\n * \"blocklist\" means that the domain was found in the blocklist.\n */\n Blocklist = 'blocklist',\n /*\n * \"allowlist\" means that the domain was found in the allowlist.\n */\n Allowlist = 'allowlist',\n /*\n * \"blacklist\" means that the domain was found in a blacklist of a legacy\n * configuration object.\n */\n Blacklist = 'blacklist',\n /*\n * \"whitelist\" means that the domain was found in a whitelist of a legacy\n * configuration object.\n */\n Whitelist = 'whitelist',\n /*\n * \"c2DomainBlocklist\" means that the domain was found in the C2 domain blocklist.\n */\n C2DomainBlocklist = 'c2DomainBlocklist',\n}\n\n/**\n * PhishingDetectionScanResult represents the result of a phishing detection scan.\n */\nexport type PhishingDetectionScanResult = {\n /**\n * The hostname that was scanned.\n */\n hostname: string;\n /**\n * Indicates the warning level based on risk factors.\n *\n * - \"NONE\" means it is most likely safe.\n * - \"WARN\" means there is some risk.\n * - \"BLOCK\" means it is highly likely to be malicious.\n * - \"VERIFIED\" means it has been associated as an official domain of a\n * company or organization and/or a top Web3 domain.\n */\n recommendedAction: RecommendedAction;\n /**\n * An optional error message that exists if:\n * - The link requested is not a valid web URL.\n * - Failed to fetch the result from the phishing detector.\n *\n * Consumers can use the existence of this field to retry.\n */\n fetchError?: string;\n};\n\n/**\n * Indicates the warning level based on risk factors\n */\nexport enum RecommendedAction {\n /**\n * None means it is most likely safe\n */\n None = 'NONE',\n /**\n * Warn means there is some risk\n */\n Warn = 'WARN',\n /**\n * Block means it is highly likely to be malicious\n */\n Block = 'BLOCK',\n /**\n * Verified means it has been associated as an official domain of a\n * company or organization and/or a top Web3 domain.\n */\n Verified = 'VERIFIED',\n}\n\n/**\n * Request for bulk token scan\n */\nexport type BulkTokenScanRequest = {\n chainId: string;\n tokens: string[];\n};\n\n/**\n * Result type of a token scan\n */\nexport enum TokenScanResultType {\n Benign = 'Benign',\n Warning = 'Warning',\n Malicious = 'Malicious',\n Spam = 'Spam',\n}\n\n/**\n * Result of a token scan\n */\nexport type TokenScanResult = {\n result_type: TokenScanResultType;\n chain: string;\n address: string;\n};\n\n/**\n * Response for bulk token scan requests\n */\nexport type BulkTokenScanResponse = Record<string, TokenScanResult>;\n\n/**\n * Token data stored in cache (excludes chain and address which are in the key)\n * For now, we only cache the result type, but we could add more data if needed in the future\n */\nexport type TokenScanCacheData = Omit<TokenScanResult, 'chain' | 'address'>;\n\n/**\n * API response from the bulk token scanning endpoint\n */\nexport type TokenScanApiResponse = {\n results: Record<\n string,\n {\n result_type: TokenScanResultType;\n chain?: string;\n address?: string;\n }\n >;\n};\n\nexport const DEFAULT_CHAIN_ID_TO_NAME = {\n '0x1': 'ethereum',\n '0x89': 'polygon',\n '0x38': 'bsc',\n '0xa4b1': 'arbitrum',\n '0xa86a': 'avalanche',\n '0x2105': 'base',\n '0xa': 'optimism',\n '0x76adf1': 'zora',\n '0xe708': 'linea',\n '0x27bc86aa': 'degen',\n '0x144': 'zksync',\n '0x82750': 'scroll',\n '0x13e31': 'blast',\n '0x74c': 'soneium',\n '0x79a': 'soneium-minato',\n '0x14a34': 'base-sepolia',\n '0xab5': 'abstract',\n '0x849ea': 'zero-network',\n '0x138de': 'berachain',\n '0x82': 'unichain',\n '0x7e4': 'ronin',\n '0x127': 'hedera',\n '0x12c': 'zksync-sepolia',\n '0xaa36a7': 'ethereum-sepolia',\n '0xa869': 'avalanche-fuji',\n '0x343b': 'immutable-zkevm',\n '0x34a1': 'immutable-zkevm-testnet',\n '0x64': 'gnosis',\n '0x1e0': 'worldchain',\n '0x8173': 'apechain',\n '0x138c5': 'berachain-bartio',\n '0xdef1': 'ink',\n '0xba5ed': 'ink-sepolia',\n '0x2b74': 'abstract-testnet',\n '0x531': 'sei',\n '0x2eb': 'flow-evm',\n '0x8f': 'monad',\n '0x3e7': 'hyperevm',\n '0xc4': 'xlayer',\n '0x10e6': 'megaeth',\n '0x1079': 'tempo',\n '0xa5bf': 'tempo-testnet',\n '0x2019': 'kaia',\n '0x1237': 'robinhood',\n '0x13b2': 'arc',\n '0x2611': 'plasma',\n '0x1388': 'mantle',\n '0xb67d2': 'katana',\n '0x18232': 'plume',\n '0x93e': 'kite-ai',\n '0x279f': 'monad-testnet',\n solana: 'solana',\n starknet: 'starknet',\n 'starknet-sepolia': 'starknet-sepolia',\n stellar: 'stellar',\n bitcoin: 'bitcoin',\n sui: 'sui',\n tron: 'tron',\n} as const;\n\nexport type ChainIdToNameMap = typeof DEFAULT_CHAIN_ID_TO_NAME;\n\n/**\n * Result type of an address scan\n */\nexport enum AddressScanResultType {\n /**\n * Address is benign/safe\n */\n Benign = 'Benign',\n /**\n * Address has warning indicators\n */\n Warning = 'Warning',\n /**\n * Address is malicious\n */\n Malicious = 'Malicious',\n /**\n * Error occurred during scan\n */\n ErrorResult = 'ErrorResult',\n}\n\n/**\n * Result of an address security scan\n */\nexport type AddressScanResult = {\n /**\n * The result type indicating the security assessment\n */\n result_type: AddressScanResultType;\n /**\n * Additional label or description for the result\n */\n label: string;\n};\n\n/**\n * Address data stored in cache (minimal data needed)\n */\nexport type AddressScanCacheData = {\n result_type: AddressScanResultType;\n label: string;\n};\n\n/**\n * Similar address match metadata for address poisoning detection.\n */\nexport type SimilarAddressMatch = {\n /**\n * The known recipient address that resembles the candidate address.\n */\n knownAddress: string;\n /**\n * Number of matching characters at the start of the address body.\n */\n prefixMatchLength: number;\n /**\n * Number of matching characters at the end of the address body.\n */\n suffixMatchLength: number;\n /**\n * Combined similarity score used to rank matches.\n */\n poisoningScore: number;\n /**\n * Character positions where the candidate and known addresses differ.\n * Indices are based on the full hex string, including the `0x` prefix.\n */\n diffIndices: number[];\n};\n\n/**\n * Thresholds for address poisoning similarity detection.\n */\nexport type SimilarityOptions = {\n /**\n * Minimum required prefix match length.\n */\n prefixLen?: number;\n /**\n * Minimum required suffix match length.\n */\n suffixLen?: number;\n};\n\nexport const APPROVAL_SUPPORTED_CHAINS = [\n 'ethereum',\n 'polygon',\n 'bsc',\n 'avalanche',\n 'arbitrum',\n 'base',\n 'linea',\n 'optimism',\n] as const;\n\nexport type ApprovalSupportedChain = (typeof APPROVAL_SUPPORTED_CHAINS)[number];\n\nexport const TOKEN_SCAN_SUPPORTED_CHAINS = [\n 'arbitrum',\n 'avalanche',\n 'base',\n 'bsc',\n 'ethereum',\n 'optimism',\n 'polygon',\n 'zora',\n 'solana',\n 'starknet',\n 'starknet-sepolia',\n 'stellar',\n 'linea',\n 'degen',\n 'zksync',\n 'scroll',\n 'blast',\n 'soneium-minato',\n 'base-sepolia',\n 'bitcoin',\n 'abstract',\n 'soneium',\n 'ink',\n 'berachain',\n 'unichain',\n 'ronin',\n 'sui',\n 'hedera',\n 'hyperevm',\n 'xlayer',\n 'monad',\n 'megaeth',\n 'tempo',\n 'sei',\n 'kaia',\n 'tron',\n 'robinhood',\n] as const;\n\nexport type TokenScanSupportedChain =\n (typeof TOKEN_SCAN_SUPPORTED_CHAINS)[number];\n\nexport const ADDRESS_SCAN_SUPPORTED_CHAINS = [\n 'arbitrum',\n 'avalanche',\n 'base',\n 'base-sepolia',\n 'bsc',\n 'ethereum',\n 'optimism',\n 'polygon',\n 'zksync',\n 'zksync-sepolia',\n 'zora',\n 'linea',\n 'blast',\n 'scroll',\n 'ethereum-sepolia',\n 'degen',\n 'avalanche-fuji',\n 'gnosis',\n 'worldchain',\n 'soneium-minato',\n 'ronin',\n 'apechain',\n 'berachain',\n 'berachain-bartio',\n 'ink',\n 'ink-sepolia',\n 'abstract',\n 'abstract-testnet',\n 'soneium',\n 'unichain',\n 'sei',\n 'flow-evm',\n 'hyperevm',\n 'megaeth',\n 'katana',\n 'plume',\n 'xlayer',\n 'monad',\n 'monad-testnet',\n 'tempo',\n 'tempo-testnet',\n 'kite-ai',\n 'kaia',\n 'plasma',\n 'mantle',\n 'robinhood',\n 'arc',\n] as const;\n\nexport type AddressScanSupportedChain =\n (typeof ADDRESS_SCAN_SUPPORTED_CHAINS)[number];\n\nexport enum ApprovalResultType {\n Malicious = 'Malicious',\n Warning = 'Warning',\n Benign = 'Benign',\n ErrorResult = 'Error',\n}\n\nexport enum ApprovalFeatureType {\n Malicious = 'Malicious',\n Warning = 'Warning',\n Benign = 'Benign',\n Info = 'Info',\n}\n\nexport type ApprovalFeature = {\n feature_id: string;\n type: ApprovalFeatureType;\n description: string;\n};\n\nexport type Allowance = {\n value?: string;\n usd_price?: string;\n};\n\nexport type ApprovalAsset = {\n address: string;\n symbol: string;\n name: string;\n decimals: number;\n logo_url?: string;\n type?: string;\n};\n\nexport type Exposure = {\n usd_price?: string;\n value: string;\n raw_value: string;\n};\n\nexport type Spender = {\n address: string;\n label?: string;\n features?: ApprovalFeature[];\n};\n\nexport type Approval = {\n allowance: Allowance;\n asset: ApprovalAsset;\n exposure: Exposure;\n spender: Spender;\n verdict: ApprovalResultType;\n};\n\nexport type ApprovalsResponse = {\n approvals: Approval[];\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAuCA;;GAEG;AACH,MAAM,CAAN,IAAY,0BA+BX;AA/BD,WAAY,0BAA0B;IACpC;;OAEG;IACH,yCAAW,CAAA;IACX;;OAEG;IACH,6CAAe,CAAA;IACf;;OAEG;IACH,qDAAuB,CAAA;IACvB;;OAEG;IACH,qDAAuB,CAAA;IACvB;;;OAGG;IACH,qDAAuB,CAAA;IACvB;;;OAGG;IACH,qDAAuB,CAAA;IACvB;;OAEG;IACH,qEAAuC,CAAA;AACzC,CAAC,EA/BW,0BAA0B,KAA1B,0BAA0B,QA+BrC;AA8BD;;GAEG;AACH,MAAM,CAAN,IAAY,iBAkBX;AAlBD,WAAY,iBAAiB;IAC3B;;OAEG;IACH,kCAAa,CAAA;IACb;;OAEG;IACH,kCAAa,CAAA;IACb;;OAEG;IACH,oCAAe,CAAA;IACf;;;OAGG;IACH,0CAAqB,CAAA;AACvB,CAAC,EAlBW,iBAAiB,KAAjB,iBAAiB,QAkB5B;AAUD;;GAEG;AACH,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,wCAAiB,CAAA;IACjB,0CAAmB,CAAA;IACnB,8CAAuB,CAAA;IACvB,oCAAa,CAAA;AACf,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B;AAoCD,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,KAAK,EAAE,UAAU;IACjB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,KAAK;IACb,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,WAAW;IACrB,QAAQ,EAAE,MAAM;IAChB,KAAK,EAAE,UAAU;IACjB,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,OAAO;IACjB,YAAY,EAAE,OAAO;IACrB,OAAO,EAAE,QAAQ;IACjB,SAAS,EAAE,QAAQ;IACnB,SAAS,EAAE,OAAO;IACl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ACP,QAAQ;IACR,OAAO;IACP,eAAe;IACf,OAAO;IACP,eAAe;IACf,SAAS;IACT,MAAM;IACN,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,KAAK;CACG,CAAC;AAKX,MAAM,CAAN,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,6CAAuB,CAAA;IACvB,yCAAmB,CAAA;IACnB,uCAAiB,CAAA;IACjB,2CAAqB,CAAA;AACvB,CAAC,EALW,kBAAkB,KAAlB,kBAAkB,QAK7B;AAED,MAAM,CAAN,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC7B,8CAAuB,CAAA;IACvB,0CAAmB,CAAA;IACnB,wCAAiB,CAAA;IACjB,oCAAa,CAAA;AACf,CAAC,EALW,mBAAmB,KAAnB,mBAAmB,QAK9B","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\n/**\n * Represents the result of checking a domain.\n */\nexport type PhishingDetectorResult = {\n /**\n * The name of the configuration object in which the domain was found within\n * an allowlist, blocklist, or fuzzylist.\n */\n name?: string;\n /**\n * The version associated with the configuration object in which the domain\n * was found within an allowlist, blocklist, or fuzzylist.\n */\n version?: string;\n /**\n * Whether the domain is regarded as allowed (true) or not (false).\n */\n result: boolean;\n /**\n * A normalized version of the domain, which is only constructed if the domain\n * is found within a list.\n */\n match?: string;\n /**\n * Which type of list in which the domain was found.\n *\n * - \"allowlist\" means that the domain was found in the allowlist.\n * - \"blocklist\" means that the domain was found in the blocklist.\n * - \"fuzzy\" means that the domain was found in the fuzzylist.\n * - \"blacklist\" means that the domain was found in a blacklist of a legacy\n * configuration object.\n * - \"whitelist\" means that the domain was found in a whitelist of a legacy\n * configuration object.\n * - \"all\" means that the domain was not found in any list.\n */\n type: PhishingDetectorResultType;\n};\n\n/**\n * The type of list in which the domain was found.\n */\nexport enum PhishingDetectorResultType {\n /*\n * \"all\" means that the domain was not found in any list.\n */\n All = 'all',\n /*\n * \"fuzzy\" means that the domain was found in the fuzzylist.\n */\n Fuzzy = 'fuzzy',\n /*\n * \"blocklist\" means that the domain was found in the blocklist.\n */\n Blocklist = 'blocklist',\n /*\n * \"allowlist\" means that the domain was found in the allowlist.\n */\n Allowlist = 'allowlist',\n /*\n * \"blacklist\" means that the domain was found in a blacklist of a legacy\n * configuration object.\n */\n Blacklist = 'blacklist',\n /*\n * \"whitelist\" means that the domain was found in a whitelist of a legacy\n * configuration object.\n */\n Whitelist = 'whitelist',\n /*\n * \"c2DomainBlocklist\" means that the domain was found in the C2 domain blocklist.\n */\n C2DomainBlocklist = 'c2DomainBlocklist',\n}\n\n/**\n * PhishingDetectionScanResult represents the result of a phishing detection scan.\n */\nexport type PhishingDetectionScanResult = {\n /**\n * The hostname that was scanned.\n */\n hostname: string;\n /**\n * Indicates the warning level based on risk factors.\n *\n * - \"NONE\" means it is most likely safe.\n * - \"WARN\" means there is some risk.\n * - \"BLOCK\" means it is highly likely to be malicious.\n * - \"VERIFIED\" means it has been associated as an official domain of a\n * company or organization and/or a top Web3 domain.\n */\n recommendedAction: RecommendedAction;\n /**\n * An optional error message that exists if:\n * - The link requested is not a valid web URL.\n * - Failed to fetch the result from the phishing detector.\n *\n * Consumers can use the existence of this field to retry.\n */\n fetchError?: string;\n};\n\n/**\n * Indicates the warning level based on risk factors\n */\nexport enum RecommendedAction {\n /**\n * None means it is most likely safe\n */\n None = 'NONE',\n /**\n * Warn means there is some risk\n */\n Warn = 'WARN',\n /**\n * Block means it is highly likely to be malicious\n */\n Block = 'BLOCK',\n /**\n * Verified means it has been associated as an official domain of a\n * company or organization and/or a top Web3 domain.\n */\n Verified = 'VERIFIED',\n}\n\n/**\n * Request for bulk token scan\n */\nexport type BulkTokenScanRequest = {\n chainId: string;\n tokens: string[];\n};\n\n/**\n * Result type of a token scan\n */\nexport enum TokenScanResultType {\n Benign = 'Benign',\n Warning = 'Warning',\n Malicious = 'Malicious',\n Spam = 'Spam',\n}\n\n/**\n * Result of a token scan\n */\nexport type TokenScanResult = {\n result_type: TokenScanResultType;\n chain: string;\n address: string;\n};\n\n/**\n * Response for bulk token scan requests\n */\nexport type BulkTokenScanResponse = Record<string, TokenScanResult>;\n\n/**\n * Token data stored in cache (excludes chain and address which are in the key)\n * For now, we only cache the result type, but we could add more data if needed in the future\n */\nexport type TokenScanCacheData = Omit<TokenScanResult, 'chain' | 'address'>;\n\n/**\n * API response from the bulk token scanning endpoint\n */\nexport type TokenScanApiResponse = {\n results: Record<\n string,\n {\n result_type: TokenScanResultType;\n chain?: string;\n address?: string;\n }\n >;\n};\n\nexport const DEFAULT_CHAIN_ID_TO_NAME = {\n '0x1': 'ethereum',\n '0x89': 'polygon',\n '0x38': 'bsc',\n '0xa4b1': 'arbitrum',\n '0xa86a': 'avalanche',\n '0x2105': 'base',\n '0xa': 'optimism',\n '0x76adf1': 'zora',\n '0xe708': 'linea',\n '0x27bc86aa': 'degen',\n '0x144': 'zksync',\n '0x82750': 'scroll',\n '0x13e31': 'blast',\n '0x74c': 'soneium',\n '0x79a': 'soneium-minato',\n '0x14a34': 'base-sepolia',\n '0xab5': 'abstract',\n '0x849ea': 'zero-network',\n '0x138de': 'berachain',\n '0x82': 'unichain',\n '0x7e4': 'ronin',\n '0x127': 'hedera',\n '0x12c': 'zksync-sepolia',\n '0xaa36a7': 'ethereum-sepolia',\n '0xa869': 'avalanche-fuji',\n '0x343b': 'immutable-zkevm',\n '0x34a1': 'immutable-zkevm-testnet',\n '0x64': 'gnosis',\n '0x1e0': 'worldchain',\n '0x8173': 'apechain',\n '0x138c5': 'berachain-bartio',\n '0xdef1': 'ink',\n '0xba5ed': 'ink-sepolia',\n '0x2b74': 'abstract-testnet',\n '0x531': 'sei',\n '0x2eb': 'flow-evm',\n '0x8f': 'monad',\n '0x3e7': 'hyperevm',\n '0xc4': 'xlayer',\n '0x10e6': 'megaeth',\n '0x1079': 'tempo',\n '0xa5bf': 'tempo-testnet',\n '0x2019': 'kaia',\n '0x1237': 'robinhood',\n '0x13b2': 'arc',\n '0x2611': 'plasma',\n '0x1388': 'mantle',\n '0xb67d2': 'katana',\n '0x18232': 'plume',\n '0x93e': 'kite-ai',\n '0x279f': 'monad-testnet',\n solana: 'solana',\n starknet: 'starknet',\n 'starknet-sepolia': 'starknet-sepolia',\n stellar: 'stellar',\n bitcoin: 'bitcoin',\n sui: 'sui',\n tron: 'tron',\n} as const;\n\nexport type ChainIdToNameMap = typeof DEFAULT_CHAIN_ID_TO_NAME;\n\n/**\n * Result type of an address scan\n */\nexport enum AddressScanResultType {\n /**\n * Address is benign/safe\n */\n Benign = 'Benign',\n /**\n * Address has warning indicators\n */\n Warning = 'Warning',\n /**\n * Address is malicious\n */\n Malicious = 'Malicious',\n /**\n * Error occurred during scan\n */\n ErrorResult = 'ErrorResult',\n}\n\n/**\n * Result of an address security scan\n */\nexport type AddressScanResult = {\n /**\n * The result type indicating the security assessment\n */\n result_type: AddressScanResultType;\n /**\n * Additional label or description for the result\n */\n label: string;\n};\n\n/**\n * Address data stored in cache (minimal data needed)\n */\nexport type AddressScanCacheData = {\n result_type: AddressScanResultType;\n label: string;\n};\n\n/**\n * Similar address match metadata for address poisoning detection.\n */\nexport type SimilarAddressMatch = {\n /**\n * The known recipient address that resembles the candidate address.\n */\n knownAddress: string;\n /**\n * Number of matching characters at the start of the address body.\n */\n prefixMatchLength: number;\n /**\n * Number of matching characters at the end of the address body.\n */\n suffixMatchLength: number;\n /**\n * Combined similarity score used to rank matches.\n */\n poisoningScore: number;\n /**\n * Character positions where the candidate and known addresses differ.\n * Indices are based on the full hex string, including the `0x` prefix.\n */\n diffIndices: number[];\n};\n\n/**\n * Thresholds for address poisoning similarity detection.\n */\nexport type SimilarityOptions = {\n /**\n * Minimum required prefix match length.\n */\n prefixLen?: number;\n /**\n * Minimum required suffix match length.\n */\n suffixLen?: number;\n};\n\nexport const APPROVAL_SUPPORTED_CHAINS = [\n 'ethereum',\n 'polygon',\n 'bsc',\n 'avalanche',\n 'arbitrum',\n 'base',\n 'linea',\n 'optimism',\n] as const;\n\nexport type ApprovalSupportedChain = (typeof APPROVAL_SUPPORTED_CHAINS)[number];\n\nexport const TOKEN_SCAN_SUPPORTED_CHAINS = [\n 'arbitrum',\n 'avalanche',\n 'base',\n 'bsc',\n 'ethereum',\n 'optimism',\n 'polygon',\n 'zora',\n 'solana',\n 'starknet',\n 'starknet-sepolia',\n 'stellar',\n 'linea',\n 'degen',\n 'zksync',\n 'scroll',\n 'blast',\n 'soneium-minato',\n 'base-sepolia',\n 'bitcoin',\n 'abstract',\n 'arc',\n 'soneium',\n 'ink',\n 'berachain',\n 'unichain',\n 'ronin',\n 'sui',\n 'hedera',\n 'hyperevm',\n 'xlayer',\n 'monad',\n 'megaeth',\n 'tempo',\n 'sei',\n 'kaia',\n 'tron',\n 'robinhood',\n] as const;\n\nexport type TokenScanSupportedChain =\n (typeof TOKEN_SCAN_SUPPORTED_CHAINS)[number];\n\nexport const ADDRESS_SCAN_SUPPORTED_CHAINS = [\n 'arbitrum',\n 'avalanche',\n 'base',\n 'base-sepolia',\n 'bsc',\n 'ethereum',\n 'optimism',\n 'polygon',\n 'zksync',\n 'zksync-sepolia',\n 'zora',\n 'linea',\n 'blast',\n 'scroll',\n 'ethereum-sepolia',\n 'degen',\n 'avalanche-fuji',\n 'gnosis',\n 'worldchain',\n 'soneium-minato',\n 'ronin',\n 'apechain',\n 'berachain',\n 'berachain-bartio',\n 'ink',\n 'ink-sepolia',\n 'abstract',\n 'abstract-testnet',\n 'soneium',\n 'unichain',\n 'sei',\n 'flow-evm',\n 'hyperevm',\n 'megaeth',\n 'katana',\n 'plume',\n 'xlayer',\n 'monad',\n 'monad-testnet',\n 'tempo',\n 'tempo-testnet',\n 'kite-ai',\n 'kaia',\n 'plasma',\n 'mantle',\n 'robinhood',\n 'arc',\n] as const;\n\nexport type AddressScanSupportedChain =\n (typeof ADDRESS_SCAN_SUPPORTED_CHAINS)[number];\n\nexport enum ApprovalResultType {\n Malicious = 'Malicious',\n Warning = 'Warning',\n Benign = 'Benign',\n ErrorResult = 'Error',\n}\n\nexport enum ApprovalFeatureType {\n Malicious = 'Malicious',\n Warning = 'Warning',\n Benign = 'Benign',\n Info = 'Info',\n}\n\nexport type ApprovalFeature = {\n feature_id: string;\n type: ApprovalFeatureType;\n description: string;\n};\n\nexport type Allowance = {\n value?: string;\n usd_price?: string;\n};\n\nexport type ApprovalAsset = {\n address: string;\n symbol: string;\n name: string;\n decimals: number;\n logo_url?: string;\n type?: string;\n};\n\nexport type Exposure = {\n usd_price?: string;\n value: string;\n raw_value: string;\n};\n\nexport type Spender = {\n address: string;\n label?: string;\n features?: ApprovalFeature[];\n};\n\nexport type Approval = {\n allowance: Allowance;\n asset: ApprovalAsset;\n exposure: Exposure;\n spender: Spender;\n verdict: ApprovalResultType;\n};\n\nexport type ApprovalsResponse = {\n approvals: Approval[];\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@metamask-previews/phishing-controller",
3
- "version": "18.2.1-preview-d0145b59e",
3
+ "version": "18.2.1-preview-896e0b6",
4
4
  "description": "Maintains a periodically updated list of approved and unapproved website origins",
5
5
  "keywords": [
6
6
  "Ethereum",