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

@proofsource/sdk

v0.1.1

Published

Typed JavaScript/TypeScript client for the ProofSource API — pay creators per citation in USDC on Arc.

Readme

@proofsource/sdk

Typed JavaScript/TypeScript client for ProofSource — the AI content licensing platform that pays creators in USDC on Arc every time their work is cited.

Install

npm install @proofsource/sdk

Quick start

import { ProofSource } from "@proofsource/sdk";

const ps = new ProofSource({
  baseUrl: "https://proofsource-mu.vercel.app",
  apiKey: "ps_live_...",          // from your operator account
});

const result = await ps.ask({
  question: "What are the key arguments around AI content licensing?",
});

console.log(result.answer);
console.log(result.sources);     // who was paid and their receipt IDs
console.log(result.spend);       // { totalUsdc: "0.030000" }

Get an API key

  1. Sign up at proofsource-mu.vercel.app as an operator
  2. Your ps_live_... API key is returned on registration and visible in Settings → API Key
  3. Or fetch it via REST: GET /v1/proofsource/auth/me with your JWT

API reference

new ProofSource(options)

| Option | Type | Description | |---|---|---| | baseUrl | string | Your ProofSource deployment URL | | apiKey | string | Operator API key (ps_live_...) — for agent calls | | token | string | JWT bearer token — for user-session calls (me, regenerateApiKey) |


ps.ask(input)AskResult

Runs the full paying research agent: discovers sources, scores them, buys the ones that pass the value threshold, settles USDC micropayments to creators on Arc, and returns a cited answer.

const result = await ps.ask({
  question: "What is per-use content licensing?",
  workspaceId: "ws_abc123",   // optional — defaults to your account's workspace
});

Returns:

{
  decision: {
    action: "BUY" | "REUSE" | "SKIP",
    reasoning: string,
    scores: Array<{ providerId, relevance, value, price }>
  },
  answer: string,              // cited answer
  sources: Array<{
    providerName?: string,
    receiptId?: string,        // verify at GET /v1/proofsource/receipts/:id
    deliveryHash?: string,
  }>,
  spend: { totalUsdc: string },
  trace: Array<{ step: string }>
}

ps.decide(input) → preview

Score sources and decide without spending anything. Useful for dry runs.

const preview = await ps.decide({
  workspaceId: "ws_abc123",
  question: "What is fair use in AI training?",
});

ps.traction()Traction

Live platform metrics — creators earning, total payout volume, payment count.

const stats = await ps.traction();
// { creatorsEarning: 12, totalPayoutUsdc: "4.320000", paymentCount: 144, ... }

ps.earnings(providerId) → creator earnings

Fetch a creator's citation receipts and total earned.

const data = await ps.earnings("prov_abc123");

ps.mandate(workspaceId) → operator mandate

Fetch the budget policy the agent obeys for a workspace.

const mandate = await ps.mandate("ws_abc123");
// { budgetUsdc, perTaskMaxUsdc, maxPricePerSourceUsdc, minRelevance, requireCitation }

ps.connectFeed(input) → list creator content

List a creator's work from an RSS/RSSHub feed (requires JWT auth).

const feed = await ps.connectFeed({
  feedUrl: "https://example.com/feed.xml",
  priceUsdc: "0.010000",
});

ps.regenerateApiKey(){ apiKey: string }

Issue a new ps_live_... key for the JWT-authenticated account.

const ps = new ProofSource({ baseUrl, token: "Bearer ..." });
const { apiKey } = await ps.regenerateApiKey();

Use with LangChain / custom agents

import { ProofSource } from "@proofsource/sdk";

const ps = new ProofSource({ baseUrl: process.env.PROOFSOURCE_URL!, apiKey: process.env.PROOFSOURCE_API_KEY! });

// As a LangChain tool
const proofSourceTool = {
  name: "proofsource_ask",
  description: "Research a question using paid, verified sources. Creators are paid in USDC per citation.",
  async call(question: string) {
    const r = await ps.ask({ question });
    return r.answer;
  },
};

REST API

The SDK wraps the ProofSource REST API. All endpoints are also accessible directly:

# Run the research agent
curl -X POST https://proofsource-mu.vercel.app/v1/proofsource/agent/run \
  -H "x-proofsource-key: ps_live_..." \
  -H "content-type: application/json" \
  -d '{"question": "What is per-use content licensing?"}'

# OpenAPI spec (for Codex / GPT Actions)
curl https://proofsource-mu.vercel.app/openapi.json

# Claude/OpenAI plugin manifest
curl https://proofsource-mu.vercel.app/.well-known/ai-plugin.json

Connect to Claude / Cursor via MCP

Install the MCP server to use ProofSource as a native tool in Claude Desktop or Cursor:

npm install -g @proofsource/mcp

Add to claude_desktop_config.json or .cursor/mcp.json:

{
  "mcpServers": {
    "proofsource": {
      "command": "npx",
      "args": ["-y", "@proofsource/mcp"],
      "env": {
        "PROOFSOURCE_BASE_URL": "https://proofsource-mu.vercel.app",
        "PROOFSOURCE_API_KEY": "ps_live_...",
        "PROOFSOURCE_WORKSPACE_ID": "ws_..."
      }
    }
  }
}

Or via Claude Code CLI:

claude mcp add proofsource -- npx -y @proofsource/mcp

License

MIT