Initializing
    developers

    Developer Quickstart: Read Trust Scores in 20 Lines

    TL;DR

    Install @trustlayer/sdk, call `client.getTrustScore(address)`, and gate any feature on the returned 0–1000 score. Total code: under 20 lines.

    Key Facts
    • TypeScript SDK, ESM + CJS.
    • Zero-dep read path (viem under the hood).
    • REST fallback for non-JS runtimes.
    • On Base by default; multi-chain optional.
    • MIT licensed.
    Last updated

    Install

    `npm i @trustlayer/sdk viem`

    Read a Trust Score

    import { createTrustLayerClient } from "@trustlayer/sdk"; const client = createTrustLayerClient({ chain: "base" }); const score = await client.getTrustScore("0xabc…");

    Gate a route

    Return early if score < 300. That is it. No KYC, no user data collection.

    Frequently asked questions

    Related guides