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

@sip402/client

v0.1.1

Published

sip402 buyer side — open ERC-7710 payment sessions, redelegate (A2A), create batch-settlement commitments, and revoke.

Readme

@sip402/client

npm · repo · SPEC

The buyer side of sip402. A buyer opens one capped, periodic payment session, then — for each paid request — issues a commitment, which is an ERC-7710 redelegation to the seller. The seller batches and redeems those commitments (see @sip402/server). The payment is the delegation.

npm i @sip402/client

The buyer lifecycle

| Function | What it does | |---|---| | openSession() | Grant the root periodic delegation: treasury smart account → agent key, capped per period (ERC20PeriodTransferEnforcer). | | redelegateSession() | A2A: narrow a scoped sub-budget to a fresh specialist agent — one more hop on the delegation chain. | | createCommitment() | The x402 payment: a redelegation agent → seller for exactly this request's amount. Off-chain to mint; redeemed on-chain by the seller. | | revokeSession() | Disable the root delegation on-chain — cancels every chain derived from it. |

Usage

import { openSession, createCommitment, revokeSession } from "@sip402/client";
import { toUsdcAtoms } from "@sip402/core";

// 1. Open a standing session: up to $1.00 / day, drawn by the agent key.
const session = await openSession({
  ownerPrivateKey: OWNER_KEY,
  capUsd: 1,
  periodSeconds: 86_400,
});

// 2. For each paid request, mint a commitment (a redelegation → the seller).
const commitment = await createCommitment({
  session,
  sellerAddress: SELLER,
  amountAtoms: toUsdcAtoms("0.04"),
});
// → hand `commitment` to the seller as the x402 payment; it serves, then batch-redeems.

// 3. Cancel everything, on-chain, at any time.
await revokeSession({ session, ownerPrivateKey: OWNER_KEY });

A Commitment is a signed voucher; nothing moves until the seller redeems it. Because each commitment is a redelegation, agent-to-agent delegation is the payment primitive — the same object expresses authority and value.

Related

  • @sip402/core — settlement + chain config (the seller half).
  • @sip402/server — verify, accumulate, batch-redeem + x402 middleware.

License

MIT