INTEGRATION

JavaScript SDK

JavaScript SDK

Use the ChainPatrol SDK to check links, submit reports and add scam protection to your app or browser extension.

Use the ChainPatrol SDK to check links, submit reports and add scam protection to your app or browser extension.

At a glance
Package
@chainpatrol/sdk
License
MIT, public on npm
Runs in
Node.js, browsers and extensions

OVERVIEW

What the SDK does

Check assets

Find out whether a URL, domain or address is allowed, blocked or unknown.

Submit and report

Submit up to 100 assets at once, or create reports with evidence for the review queue.

List assets

Fetch the assets ChainPatrol has reviewed.

Scam detection helper

ThreatDetector adds local and cloud checks with caching and your own allow, block and ignore lists. It also helps pass warning events between browser extension contexts.

SETUP

How to set it up

Install it in four steps
Setup
1
Install
Run npm install @chainpatrol/sdk. The zod package is a required peer dependency.
2
Get an API key
Create one in your dashboard, or contact [email protected].
3
Create a client
Pass your key to ChainPatrolClient, or to ThreatDetector.
4
Run a check
Call client.asset.check or threatDetector.url.

GOOD TO KNOW

What to know

Scope

The SDK checks assets, submits and creates reports and lists reviewed assets. It does not manage takedowns or organization settings.

Open source

The package is public on npm under the MIT license.

Frequently asked questions

In Node.js, modern browsers and browser extensions.

Yes. @chainpatrol/sdk is public on npm under the MIT license.

See the SDK docs.

See it on your brand

See it on your brand

Book a 30-minute demo to see how we find, block and take down impersonation targeting your brand.

Book a 30-minute demo to see how we find, block and take down impersonation targeting your brand.