
Research
/Security News
737 Chrome VPN Extensions Linked to Brand Impersonation and Browser Traffic Redirection
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.
@countersign/ap2
Advanced tools
Govern AP2 (the Agent Payments Protocol) with Countersign — guard an agent's mandate against policy before it signs the PaymentMandate.
Govern AP2 (the Agent Payments Protocol) with Countersign — guard an agent's mandate against policy before it signs the PaymentMandate.
When an agent is about to commit to a merchant-signed Cart/Checkout Mandate — the moment a final amount and payee are known but funds have not moved — route it through Countersign's pre-flight spend guard: parse the mandate → evaluate against one unified policy (per-call caps + payee allowlist + daily metering, fail-closed) → only sign/send the PaymentMandate if allowed. Countersign decides; it never signs a mandate or moves funds.
import { parseAp2, withAp2Guard } from "@countersign/ap2";
import { CountersignClient } from "@countersign/sdk";
const cs = new CountersignClient({ baseUrl, apiKey });
// `mandate` is a merchant-signed AP2 Cart/Checkout Mandate (or a PaymentMandate).
const charge = parseAp2(mandate); // normalized: amount (minor units) + currency + payee
if (charge) {
// Only signs/sends if Countersign allows — a rogue or over-budget agent never pays.
await withAp2Guard(cs, agentId, charge, (c) => signAndSendPaymentMandate(c));
}
parseAp2(mandate) — normalize an AP2 mandate to a single charge. Handles both spec generations:
Gen-1 (W3C-PaymentRequest, float major units) and Gen-2/v0.2 (SD-JWT VC, int minor units); the
amount is always returned as an integer minor-unit string.guardAp2(api, agentId, charge) — ask Countersign: allow / deny / needs_approval.withAp2Guard(api, agentId, charge, pay) — evaluate, then run pay only on allow; throws Ap2Denied otherwise.AP2 has no official npm/TS SDK yet and the spec (v0.2) is still evolving — the mandate types here are
transcribed from the reference schemas. Pairs with @countersign/sdk, @countersign/mcp, and @countersign/x402.
Apache-2.0.
FAQs
Govern AP2 (the Agent Payments Protocol) with Countersign — guard an agent's mandate against policy before it signs the PaymentMandate.
The npm package @countersign/ap2 receives a total of 49 weekly downloads. As such, @countersign/ap2 popularity was classified as not popular.
We found that @countersign/ap2 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Research
/Security News
The campaign amassed more than 75,000 installs by targeting Russian-speaking users seeking access to blocked services.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.