Instance methods
asset.check()
The asset.check()
method checks the status of an asset.
Example
Parameters
options
object
requiredtype
enum<string>
requiredThe type
property specifies what type of asset you are querying for.
The following types are supported: URL
, PAGE
, ADDRESS
.
content
string
requiredThe content
property contains the actual asset you are querying for.
- In the case of a
URL
orPAGE
asset, this is the URL of the asset. - In the case of an
ADDRESS
asset, this is the wallet or contract address of the asset.
Return Value
The asset.check()
method returns a Promise
that resolves to an object with the following properties:
result
object
requiredstatus
enum<string>
requiredThe status
property contains the status of the asset.
The following statuses are supported: UNKNOWN
, ALLOWED
, BLOCKED
.
reason
string
If the asset is allowed or blocked, this will be the reason why. ChainPatrol aggregates data from multiple sources, so this will tell you which source blocked or allowed the asset.
eth-phishing-detect
- the asset is on MetaMask’s blocklistreported
- the asset is on ChainPatrol’s blocklist because it was reported by a user
Was this page helpful?