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

@authproof/sdk

v0.1.1

Published

AuthProof SDK — cryptographic request signing for AI agents using ERC-8128

Readme

@authproof/sdk

Replace API keys with signed, non-replayable requests. Each agent gets its own cryptographic identity — no shared secrets on the wire.

Install

npm install @authproof/sdk

Quick start — sign requests in 3 lines

import { createAuthProofClient, privateKeyToWallet } from "@authproof/sdk";

const client = createAuthProofClient({
  wallet: privateKeyToWallet(process.env.AGENT_PRIVATE_KEY, 84532)
});

// Every request is signed, nonce-protected, and attributable
const res = await client.signedFetch("https://api.example.com/orders", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({ sku: "hoodie-001" })
});

No API key transmitted. The private key never leaves the agent's environment.

Agent self-registration

Agents can generate their own wallet and register with an API — no human in the loop:

import { bootstrap } from "@authproof/sdk";

const { client, privateKey, walletAddress } = await bootstrap({
  server: "https://api.example.com",
  projectId: "proj_abc123",
  name: "research-agent"
});

// Save privateKey for future runs — it's shown once
await client.signedFetch("https://api.example.com/data", { method: "GET" });

Auto-pay for 402 responses

When credits run out, the SDK can automatically pay with on-chain USDC and retry:

import { createAuthProofClient, privateKeyToWallet, createAutoPayment } from "@authproof/sdk";

const client = createAuthProofClient({
  wallet: privateKeyToWallet(process.env.AGENT_PRIVATE_KEY, 84532),
  payment: {
    handler: createAutoPayment(process.env.AGENT_PRIVATE_KEY, "https://mainnet.base.org"),
    onPayment: (result) => console.log(`Paid ${result.amount} — tx: ${result.txHash}`)
  }
});

// If the server returns 402, the SDK pays and retries automatically
const res = await client.signedFetch("https://api.example.com/paid-endpoint", {
  method: "POST"
});

How it works

  1. Agent has a wallet (private key) — generated locally or via bootstrap()
  2. signedFetch signs each request per ERC-8128 (IETF RFC 9421 HTTP Message Signatures)
  3. Server verifies the signature against the agent's known public address
  4. Each signature includes a random nonce and 60-second expiry — replays are rejected
  5. If the server returns 401 with accept-signature, the SDK auto-retries with the server's preferred options

API

createAuthProofClient(options)

Creates a signing client.

createAuthProofClient({
  wallet: AuthProofWallet,     // from privateKeyToWallet() or walletClientToSigner()
  fetch?: typeof fetch,        // custom fetch (for testing)
  nonceManager?: NonceManager, // custom nonce generation
  payment?: {                  // optional auto-pay for 402 responses
    handler: PaymentHandler,
    onPayment?: (result: PaymentResult) => void
  }
})

Returns { signedFetch, signRequest }.

privateKeyToWallet(privateKey, chainId)

Create a wallet from a hex-encoded private key. Simplest path for agents.

const wallet = privateKeyToWallet("0xabc...", 84532);

walletClientToSigner(viemWalletClient)

Adapt a Viem WalletClient for use with the SDK. For browser/MetaMask flows.

bootstrap(options)

Agent self-provisioning — generates a wallet, registers with a project, returns a ready-to-use client.

const result = await bootstrap({
  server: string,       // AuthProof server URL
  projectId?: string,   // target project (or discovers via well-known)
  inviteCode?: string,  // invite code (if using invite-based registration)
  name?: string,        // agent display name
  privateKey?: string,  // use existing key instead of generating
  chainId?: number      // default: 84532 (Base Sepolia)
});
// result: { client, privateKey, walletAddress, projectId, projectName }

createAutoPayment(privateKey, rpcUrl)

Creates a payment handler for automatic 402 handling. Sends ERC-20 USDC transfers on-chain.

signedFetch(url, init)

Drop-in replacement for fetch. Fetches /.well-known/erc8128 from the target origin (cached), generates a nonce, signs the request, and sends it.

signRequest(url, init)

Same as signedFetch but returns the signed Request without sending. Useful for capturing headers (e.g., demo panels).

MCP server

For MCP-compatible agents (Claude, Cursor, Windsurf), use @authproof/mcp-server instead — it wraps this SDK with MCP tools.

Links