Catalog npm
PACKAGE EXPLORERView in registry

@0x402/auditor

npm

The Agent B side, as one Express route: an x402-paid audit that answers with a signed seal, plus the free agent card a caller reads before paying.

agentauditexpresssealx402
Versions collected3
Direct dependencies10From release 0.1.2
Last observed20 Oct, 22:35 UTC

README

Current package documentation

@0x402/auditor

The Agent B side, as one Express route: an x402-paid audit that answers with a signed seal.

npm i @0x402/auditor express
import express from "express";
import { sealedAuditRoute } from "@0x402/auditor";

const app = express();
app.use(express.json({ limit: "1mb" }));

sealedAuditRoute(app, {
  sealAccount,               // your key, in your process
  agentId: "2",
  priceUsd: "$0.01",
  payToAddress,
  network: "eip155:84532",
  facilitatorUrl,
  sealTtlSeconds: 86_400,
  og: { network: "testnet", apiKey, model: undefined, skipAttestation: false },
});

app.listen(4021);

It mounts two routes:

  • GET /agent — free, and readable from any page (it sets Access-Control-Allow-Origin). The card says who a caller would be hiring: agent id, seal signer, payee, price, network, model, trust mode. Anyone can read it before paying.
  • POST /audit — x402-paid (protocol v2), and the reason this package exists.

What makes you an Agent B

Taking money is not enough. A plain x402 API takes the same cent and answers with prose, and the agent that paid has nothing it can embed, show, or be held to. What makes you a B is issuing a seal: a signed statement binding your verdict to the exact request, the model, and the TEE attestation the inference came back with.

The 502 rule

The payment settles on a 2xx. So if the inference fails, or the seal cannot be issued, this route answers 502 rather than a cheerful body — because a 2xx here would take the money for a seal that was never issued.


Repository · Site · MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 3

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.2Registry latest8 Sept 202610
0.1.18 Sept 202610
0.1.07 Sept 202610

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
wayneal/0g

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:35 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:e0498834f060d813f47570ce286a1e69c4adddd304196ea89dfa68f7137db855