Phishing and scam URLs are a huge problem in Web3. To make it easier for wallet and dApp builders to protect their users from these threats, we’ve built a JavaScript SDK that you can use to interact with our threat detection APIs.

import { ThreatDetector } from "@chainpatrol/sdk";

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

const result = await detector.url("https://scam-site.com");

Installation

npm install --save @chainpatrol/sdk

Features

TypeScript support

Written in TypeScript with full type definitions

Cross-platform

Works in all modern browsers, Node.js, and browser extensions

Lightweight

Minimal dependencies

Built for scale

Designed with caching and rate-limiting built-in

Exports

NameDescription
ThreatDetectorA simple interface for detecting phishing URLs
StorageStorage cache implementation for ThreatDetector
RelayA message relay for sharing events between browser extension contexts
ChainPatrolClientUsed to create a client that connects to the ChainPatrol API