v1 API · partner integrations

Plug the protocol into anything.

Public read-only HTTP API, outbound HMAC-signed webhooks, and a zero-dependency TypeScript SDK. Rate-limited per IP (60 req/min); partner API keys lift the cap 5×, enterprise 20×.

QuickstartTypeScript

// fetch the SDK source once
curl https://nslevelup.vercel.app/api/v1/sdk -o ns-levelup.ts

// then in your project
import { nsLevelUp } from "./ns-levelup";

const today  = await nsLevelUp.today({ wallet });
const hunter = await nsLevelUp.hunter(wallet);
const stats  = await nsLevelUp.stats();
const feed   = await nsLevelUp.activity({ limit: 50 });

Endpoints

  • GET
    /api/v1/todayToday's personalised System dispatch.
  • GET
    /api/v1/hunter/{wallet}Stats, rank, streak, gates, days active.
  • GET
    /api/v1/cohort/{slug}Cohort snapshot — pool, members, schedule.
  • GET
    /api/v1/leaderboardTop hunters by yield/streak/verified.
  • GET
    /api/v1/activityRecent verified quests across the system.
  • GET
    /api/v1/statsProtocol-wide aggregates.
  • GET
    /api/v1/sdkZero-dep TypeScript SDK source.
  • POST
    /api/v1/webhooksRegister a webhook subscription.
  • DELETE
    /api/v1/webhooks/{id}Deactivate a webhook (Bearer secret).

Webhook events

Each delivery includes X-NSLevelUp-Signature: t=<unix>,v1=<hex> — recompute hmac_sha256(secret, t + "." + rawBody) and constant-time compare. Identical to the Stripe verifier.

  • A Hunter's quest cleared on-chain. Payload: wallet, questId, confidence, rank, txSig.quest.verified
  • A Hunter crossed one of the ten Gates. Payload: wallet, gate, gateLabel, daysActive.gate.cleared
  • Cohort window closed and survivors decided. Payload: slug, qualifiedCount, payoutPerSurvivor.cohort.resolved
  • A new member entered the cohort. Payload: slug, wallet, handle.cohort.member_joined

Reference