Skip to content

UltraInstinct0x/panel-sdk-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@panel/sdk

thin server SDK for the panel HTTP api. node 18+, esm + cjs.

pnpm add @panel/sdk
import { PanelClient } from '@panel/sdk';

const panel = new PanelClient({
  baseUrl: 'https://panel.example.com',
  siteKey: process.env.PANEL_SITE_KEY!,
  siteSecret: process.env.PANEL_SITE_SECRET!,
  scrubberSecret: process.env.SCRUBBER_JWT_SECRET, // omit for first-party keys
});

// verify a widget token server-side
const v = await panel.verifyToken(req.body.panel_token);
if (!v.ok || v.trust < 0.5) return res.status(403).end();

// ingest an agent trace for splitting
await panel.ingestTrace({
  traceId: `tr_${crypto.randomUUID()}`,
  sourceAgent: 'myapp',
  blob: { messages: [...] },
});

methods: ingestUnit, ingestTrace, verifyToken, fetchUnit, fetchTrace. auth: HMAC-SHA256 over body (x-panel-ingest-sig) + optional scrubber JWT attestation.

About

thin node sdk for panel — proof-of-humanity infra

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors