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

agentcommercekit

v0.10.0

Published

**Agent Commerce Kit (ACK)** provides vendor-neutral protocols, patterns, and open source components that enable AI agents to participate in commerce.

Readme

Agent Commerce Kit (ACK) TypeScript SDK

Agent Commerce Kit (ACK) provides vendor-neutral protocols, patterns, and open source components that enable AI agents to participate in commerce.

Built on open W3C Web Standards, ACK enables AI Agents to manage their own identities, operate their own accounts and wallets, access paid services through standardized paywalls, compensate humans for data contributions, and optimize costs across complex service chains.

To learn more about the Agent Commerce Kit, check out the documentation.

Installation

We recommend installing the agentcommercekit package, which is tree-shakeable and contains everything you need to build for the ACK protocol, even if you choose to only target ACK-ID or ACK-Pay. This is the simplest way to get started, prevent version conflicts or duplication, and makes it easy to manage updates.

npm i agentcommercekit
# or
pnpm add agentcommercekit

Alternatively, you can install each sub-package individually. These are:

When installing separately, we recommend updating all Agent Commerce Kit packages together to prevent duplication of shared dependencies.

Usage

ACK-ID methods

Creating Controller Credentials

import { createControllerCredential, createDidWebUri } from "agentcommercekit"

// Create DID URIs for agent and controller.
// These DID documents should be hosted at `<domain>/.well-known/did.json`
const controllerDid = createDidWebUri("https://controller.example.com")
const agentDid = createDidWebUri("https://agent.example.com")

// Create a credential establishing the controller relationship
const credential = createControllerCredential({
  subject: agentDid,
  controller: controllerDid,
  // Optional id and issuer can be provided
  id: "urn:uuid:123e4567-e89b-12d3-a456-426614174000",
  issuer: controllerDid // Defaults to controller if not provided
})

Verifying a controller credential

import {
  getControllerClaimVerifier,
  getDidResolver,
  verifyParsedCredential
} from "agentcommercekit"

// Get the claim verifier for controller credentials
const verifier = getControllerClaimVerifier()
const resolver = getDidResolver()

// Verify the credential using verification logic from vc package.
try {
  await verifyParsedCredential(controllerCredential, {
    resolver,
    verifiers: [verifier],
    trustedIssuers: [controllerDid] // Optional: list of trusted issuers
  })
  console.log("Credential verified successfully")
} catch (error) {
  console.error("Verification failed:", error)
}

Type Guards for Credential Validation

import { isControllerCredential, isControllerClaim } from "agentcommercekit"

// Check if a credential is specifically a controller credential
isControllerCredential(credential)

// Check if a credential subject has the controller claim structure
isControllerClaim(credential.credentialSubject)

A2A Methods

Additionally, the ACK-ID package exposes methods to allow for identity exchange over A2A. See the A2A section of the ACK-ID README for more information.

These methods are exported from agentcommercekit/a2a. For example:

import { createA2AHandshakeMessage } from "agentcommercekit/a2a"

// ...

ACK-Pay methods

Creating a Payment Request

import {
  createSignedPaymentRequest,
  createDidWebUri,
  createJwtSigner,
  curveToJwtAlgorithm,
  generateKeypair
} from "agentcommercekit"

// Create a payment request
const paymentRequest = {
  id: "payment-123",
  description: "Access to premium content",
  paymentOptions: [
    {
      id: "option-1",
      amount: BigInt(100_000_000).toString(), // 100 USDC
      decimals: 6,
      currency: "USDC",
      recipient: "did:web:payment.example.com",
      paymentService: "https://pay.example.com"
    }
  ]
}

const keypair = await generateKeypair("secp256k1")

// Create a payment request body with a signed token
const paymentRequestBody = await createSignedPaymentRequest(paymentRequest, {
  issuer: createDidWebUri("https://server.example.com"),
  signer: createJwtSigner(keypair),
  algorithm: curveToJwtAlgorithm(keypair.curve)
})

// Create a 402 Payment Required response
// Create a 402 Payment Required response
const response = new Response(JSON.stringify(paymentRequestBody, {
  status: 402,
  contentType: "application/json"
})

Creating a Payment Receipt

import { createPaymentReceipt } from "agentcommercekit"

const receipt = createPaymentReceipt({
  paymentRequestToken: "<payment-request-token>",
  paymentOptionId: "<payment-option-id-from-request>",
  issuer: "did:web:receipt-service.example.com",
  payerDid: "did:web:customer.example.com"
})

Verifying a Payment Receipt

import { verifyPaymentReceipt, getDidResolver } from "agentcommercekit"

const verified = await verifyPaymentReceipt(receipt, {
  resolver: getDidResolver(),
  trustedIssuers: ["did:web:merchant.example.com"]
})

Type Guards for Validation

import {
  isPaymentRequest,
  isPaymentReceiptCredential,
  isPaymentReceiptClaim
} from "agentcommercekit"

// Check if a value is a valid payment request
isPaymentRequest(unknownObject)

// Check if a credential is specifically a payment receipt credential
isPaymentReceiptCredential(credential)

// Check if a credential subject has the payment receipt claim structure
isPaymentReceiptClaim(credential.credentialSubject)

Agent Commerce Kit Version

This SDK supports Agent Commerce Kit version 2025-05-04.

See the ACK Versioning documentation for more information.

License (MIT)

Copyright (c) 2025 Catena Labs, Inc.