npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tesseraid/sdk

v0.1.0

Published

Provider SDK for Tessera — cross-provider identity & co-usage graph for the x402/MPP agentic economy. One settle hook to attest, one call to enrich.

Readme

@tessera/sdk

Provider SDK for Tessera — the cross-provider identity & co-usage graph for the agentic x402 / MPP economy on Solana.

Install once, hook settle, and see the account behind the wallet — for your own paying wallets only. This is account-resolution, not network surveillance (ТЗ §6.6).

Install

npm install @tessera/sdk
# @solana/web3.js is an optional peer dependency (only for on-chain helpers)

Requires Node ≥ 18 (uses the global fetch).

Quickstart

import { Tessera, withTesseraAttest } from '@tessera/sdk';

const tessera = new Tessera({ apiKey: process.env.TESSERA_API_KEY! });

// One hook on your x402 / MPP settle pipeline (ТЗ §6.4)
const onSettle = withTesseraAttest(tessera);

// ...inside your settle handler:
await onSettle({
  payerId: payerWallet,      // raw wallet — hashed locally, never transmitted
  endpointClass: 'inference',
  amountUsdc: 0.02,
  txRef: settlementSignature,
});

// Enrichment for your own paying wallet
const enrichment = await tessera.enrich(payerWallet);

API (ТЗ §4.3)

| Method | Description | | --- | --- | | tessera.attest(settleEvent) | Emit a privacy-preserving attestation on settle. Returns the ingest receipt. | | tessera.enrich(wallet) | Enrichment (cluster, co-usage, churn-risk) for one of your own paying wallets. Free. | | tessera.query(spec) | Paid graph read over your wallets. Charges $TESS (burn / contributor pool / treasury split). | | tessera.stats() | Summary of your own slice: wallets, clusters, edges, contribution, $TESS earned, plus integrity/slash status and reward history. |

attest(settleEvent)

await tessera.attest({
  payerId,                 // required — raw payer wallet (base58)
  endpointClass: 'search', // default 'other'
  amountUsdc: 0.5,         // OR amountBucket: 'small'
  ts,                      // default now()
  txRef,                   // on-chain signature for reconciliation
});

The attestation is privacy-preserving: the SDK computes sha256("tessera-payer-commit-v1:" + payerId) locally and only submits the commit, endpoint class, amount bucket and timestamp — the raw wallet never leaves your process (ТЗ §3).

query(spec)

const { payment, results } = await tessera.query({
  wallets: [w1, w2],
  signalType: 'all',   // 'cluster' | 'co-usage' | 'churn' | 'all'
  window: '30d',       // '24h' | '7d' | '30d' | 'all'
});

Ownership guard

Every enrich / query is restricted to wallets that have paid you. A wallet you don't own returns 403:

import { TesseraApiError } from '@tessera/sdk';

try {
  await tessera.enrich(someWallet);
} catch (e) {
  if (e instanceof TesseraApiError && e.isForbidden) {
    // wallet has not paid you — enrichment denied
  }
  if (e instanceof TesseraApiError && e.isPaymentRequired) {
    // insufficient $TESS for a paid query
  }
}

On-chain transparency (ТЗ v1.1)

Payment is settled on-chain with a transparent split — burn / contributor pool / treasury (ТЗ §7.3). The payment object returned by query() reflects that split:

const { payment } = await tessera.query({ wallets });
// payment.burned      → SPL burn on the paid read
// payment.toContributors → on-chain reward pool (ТЗ §4.4 Reward Distribution)
// payment.toTreasury  → protocol treasury

Contributor rewards and stake slashing are on-chain in v1.1 (ТЗ §4.4 Slash Program / Reward Distribution) — no longer imitated. The SDK surface stays the four calls from ТЗ §4.3; integrity/stake and slash history are surfaced in the Stake UI with Solscan links (ТЗ §8.6).

Config

new Tessera({
  apiKey: 'tsk_...',              // required
  baseUrl: 'http://localhost:4000', // default
  timeoutMs: 15000,                 // default
  fetch: customFetch,               // optional (tests / edge runtimes)
});

Development

npm install
npm run typecheck
npm run build      # bundles ESM + CJS + d.ts into dist/
npm run example    # runs examples/quickstart.ts against a local backend

MIT · Part of the Tessera protocol. $TESS is a utility token (Token-2022, 6 decimals) with on-chain burn, contributor rewards and slashable stake (ТЗ v1.1 §7).