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

@maximprotocol/sdk

v0.1.0

Published

The official TypeScript SDK for Maxim Protocol, cohesive payment infrastructure for AI agents

Readme

@maximprotocol/sdk

The official TypeScript SDK for Maxim Protocol — unified payment infrastructure for AI agents.

One API. Any protocol (x402 + MPP). Every transaction on Solana.

Install

npm install @maximprotocol/sdk

Requires Node.js 18+.

Quick start

import { MaximProtocol } from "@maximprotocol/sdk";

const maxim = new MaximProtocol({
  agentId: "my-agent",
  apiKey: process.env.MAXIM_API_KEY!,
});

// Pay for a resource — protocol detected automatically
const result = await maxim.pay({
  endpoint: "https://api.service.com/resource",
  method: "POST",
  body: { query: "..." },
});

console.log(result.txHash);      // Solana transaction hash
console.log(result.amountPaid);  // { usdc: 0.002 }
console.log(result.protocol);   // "x402" | "mpp"
console.log(result.data);        // the actual API response

Wallet

// Get wallet address and balance
const wallet = await maxim.wallet.get();
console.log(wallet.address);         // 7xKXtg...mQfJL
console.log(wallet.balance.usdc);    // 42.50

// Just the balance
const { usdc } = await maxim.wallet.balance();

// Fund the wallet
await maxim.wallet.fund({ usdc: 50 });

Transactions

// List recent transactions
const { transactions, total } = await maxim.transactions.list({ limit: 50 });

// Filter by protocol or date range
const x402Only = await maxim.transactions.list({
  protocol: "x402",
  from: "2026-01-01T00:00:00Z",
  to: "2026-01-31T23:59:59Z",
});

// Get a single transaction
const tx = await maxim.transactions.get("5xKXtg...");
console.log(tx.solanaTxLink);

Spend policies

await maxim.policies.set({
  dailyBudget: { usdc: 100 },
  perCallLimit: { usdc: 1.00 },
  allowedDomains: ["api.dune.com", "api.browserbase.com", "fal.ai"],
  rateLimit: { calls: 500, window: "1h" },
});

const current = await maxim.policies.get();

ZK Privacy Mode

const result = await maxim.pay({
  endpoint: "https://api.service.com/resource",
  method: "POST",
  body: { query: "..." },
  privacy: {
    mode: "full",                           // "transparent" | "confidential_amount" | "full"
    disclosureKey: complianceOfficerPubKey, // optional — auditor can decrypt
  },
});

console.log(result.txHash);          // nullifier hash — no identity on-chain
console.log(result.privateNote);     // encrypted note for your records
console.log(result.disclosureProof); // openable only by disclosureKey holder

Error handling

import {
  MaximProtocol,
  InsufficientFundsError,
  PolicyViolationError,
  RateLimitError,
  AuthenticationError,
} from "@maximprotocol/sdk";

try {
  const result = await maxim.pay({ endpoint: "https://api.service.com/resource" });
} catch (err) {
  if (err instanceof InsufficientFundsError) {
    // top up the wallet
  } else if (err instanceof PolicyViolationError) {
    // payment blocked by spend policy
  } else if (err instanceof RateLimitError) {
    // slow down
  }
}

API reference

new MaximProtocol(config)

| Option | Type | Required | Description | |--------|------|----------|-------------| | agentId | string | Yes | Unique identifier for this agent | | apiKey | string | Yes | Your Maxim Protocol API key | | baseUrl | string | No | Override the API base URL (default: https://api.maximprotocol.com) |

maxim.pay(options)

Routes a payment through x402 or MPP — detected automatically.

| Option | Type | Default | Description | |--------|------|---------|-------------| | endpoint | string | — | The service URL to call | | method | string | "GET" | HTTP method | | body | unknown | — | Request body | | headers | Record<string, string> | — | Additional request headers | | privacy | PrivacyOptions | — | Enable ZK privacy mode | | idempotencyKey | string | — | Prevent duplicate payments |


Docs · Dashboard · maximprotocol.com