PhishingDetector
Defined in: phishing.ts:28
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PhishingDetector(
list):PhishingDetector
Defined in: phishing.ts:34
Parameters
Section titled “Parameters”Returns
Section titled “Returns”PhishingDetector
Accessors
Section titled “Accessors”Get Signature
Section titled “Get Signature”get size():
number
Defined in: phishing.ts:41
Returns
Section titled “Returns”number
Methods
Section titled “Methods”brandInLabel()
Section titled “brandInLabel()”brandInLabel(
host): {known:string;label:string; } |null
Defined in: phishing.ts:74
metamask.io-login.com, app-uniswap.com, uniswap.org.evil.net: a known site’s name used as (part of) a label
of a host that is not that site. Names shorter than 5 characters are skipped (too many honest matches).
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”{ known: string; label: string; } | null
check()
Section titled “check()”check(
hostOrOrigin):HostCheck
Defined in: phishing.ts:45
Parameters
Section titled “Parameters”hostOrOrigin
Section titled “hostOrOrigin”string
Returns
Section titled “Returns”lookalike()
Section titled “lookalike()”lookalike(
host):string|null
Defined in: phishing.ts:87
eth-phishing-detect’s fuzzy check: the host (minus the TLD and a www.) within tolerance edits of a known one.
Parameters
Section titled “Parameters”string
Returns
Section titled “Returns”string | null
refusal()
Section titled “refusal()”refusal(
hostOrOrigin):string|null
Defined in: phishing.ts:66
Why hostOrOrigin must be refused outright, or null: a host on the blocklist (or under a
listed domain) and not on the allowlist. Lookalikes and punycode only warn (check).
Wire it as ApprovalQueueOptions.refuse and RouterDeps.refuse.
Parameters
Section titled “Parameters”hostOrOrigin
Section titled “hostOrOrigin”string
Returns
Section titled “Returns”string | null