
The TrustLayer SDK wraps the REST API, on-chain reads, and signature helpers into a single ergonomic client for Node and the browser.
npm install @trustlayer/sdk
import { TrustLayer } from "@trustlayer/sdk";const client = new TrustLayer({ apiKey: process.env.TRUSTLAYER_KEY });
const result = await client.verify({ trustId, signature, nonce }); if (result.verified && result.trustScore >= 500) { // grant access } ```
const score = await client.onchain.trustScoreOf(wallet);
const hasBlue = await client.onchain.hasBadge(wallet, "verified_human");