Modes

There are two modes of operation for the Threat Detector:

  • local: This mode uses a local database of scam URLs. Use this mode for offline threat detection and testing.
  • cloud: This mode uses ChainPatrol’s cloud service to detect scams.

Local Mode

To use the local mode, you need to instantiate the ThreatDetector class with the mode option set to local.

const detector = new ThreatDetector({
  mode: "local",
});

Cloud Mode

To use the cloud mode, you need to instantiate the ThreatDetector class with the mode option set to cloud and provide your API key.

const detector = new ThreatDetector({
  mode: "cloud",
  apiKey: "YOUR_API_KEY",
});

Parameters

options
object
required