🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@semore/acp-adapter

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@semore/acp-adapter

ACP (Agentic Commerce Protocol) Shared Payment Token orchestrator adapter — verify + mint SPT, merchant ack helpers.

latest
Source
npmnpm
Version
0.0.2
Version published
Weekly downloads
5
400%
Maintainers
1
Weekly downloads
 
Created
Source

@semore/acp-adapter

CI License: Apache 2.0 npm status

Adapter helpers for the Agentic Commerce Protocol (ACP) Shared Payment Token (SPT) flow. Verify incoming SPTs, inspect merchant ACKs, and compose request envelopes in your own merchant backend or orchestrator.

Source of Truth: this directory in the Semore monorepo until repo split. The production verification path lives in the internal Semore API; this package exposes the stable, framework-agnostic contract for third-party merchants and agent orchestrators.

Install

npm install @semore/acp-adapter
# or
pnpm add @semore/acp-adapter

hono is an optional peer dependency — only required if you mount the provided route factory.

Usage

import { verifyAcpToken, type ACPToken } from "@semore/acp-adapter";

const result = await verifyAcpToken(token, {
  issuers: ["https://openai.com/acp"],
  publicKeys: myJwks,
  audience: "did:web:merchant.example",
  clockSkewSec: 30,
  maxAgeSec: 300, // reject any SPT whose `iat` is older than 5 minutes (replay defense)
});

if (!result.ok) {
  console.error("reject:", result.reason);
  return;
}

// result.token is a typed ACPToken

What this package provides

  • verifyAcpToken(token, opts) — header + signature + expiry + issuer validation.
  • opts.maxAgeSec — opt-in replay defense. Requires the token to carry iat and rejects with reason: "replayed" when (now - iat) > maxAgeSec + clockSkewSec. Pair with an idempotency cache keyed on token.id for full replay protection.
  • ACPToken / MerchantAck / VerifyResult — transport schema types (subset of the wire format).
  • buildMerchantAck(...) — helper to emit a protocol-compliant ACK.

What this package does not provide

  • Private key material or secret management (use Cloudflare Workers Secrets or a KMS).
  • Card PAN handling. ACP SPTs are PAN-free by design — if you are holding PAN, you are off-protocol.
  • Production Semore ACP orchestration (routing, fraud scoring, settlement). That lives behind api.semore.net and is not open-source.

Reference

License

Apache-2.0 — see LICENSE.

Copyright (c) Semore Founding Team.

Keywords

acp

FAQs

Package last updated on 08 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts