Unlisted
Build

SDK

Load it

One ES module, served from /sdk/unlisted-sdk.mjs, built with viem. It decodes flags and scores offline and calls the API for the rest.

import { createClient, hookReport, flagsOf, lines, quote, buildSwapTx } from "https://<site>/sdk/unlisted-sdk.mjs";
const c = createClient("https://<site>");

Read hooks

const r = await hookReport(c, "0x8aa375f7186f86bbac7b13ab01db189ebe50c0c4");
if (r.score < 50 || r.lines.some((l) => l.level === "red")) console.log("read this first:", r.lines);

lines(flagsOf("0x8aa375f7186f86bbac7b13ab01db189ebe50c0c4"), {})  // offline, from the address

Swap from a script

const q = await quote(c, ETH, USDG, "0.1");
const { tx } = await buildSwapTx(c, { tokenIn: ETH, tokenOut: USDG, amount: "0.1" });
await wallet.sendTransaction(tx);   // your key, your wallet