Initializing
    TrustLayer

    TrustLayer SDK Quickstart

    The TrustLayer SDK wraps the REST API, on-chain reads, and signature helpers into a single ergonomic client for Node and the browser.

    Install

    npm install @trustlayer/sdk
    

    Verify a Trust ID

    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 } ```

    Read on-chain reputation

    const score = await client.onchain.trustScoreOf(wallet);
    const hasBlue = await client.onchain.hasBadge(wallet, "verified_human");
    

    Frequently asked questions

    More in For Developers

    Explore TrustLayer for