Example

Parameters

options
object
required
type
enum<string>
required

The type property specifies what type of asset you are querying for.

The following types are supported: URL, PAGE, ADDRESS.

content
string
required

The content property contains the actual asset you are querying for.

  • In the case of a URL or PAGE 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
required
status
enum<string>
required

The 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 blocklist
  • reported - the asset is on ChainPatrol’s blocklist because it was reported by a user