{"_id":"@0x402/auditor","_rev":"3-48959399bb497b9810f28576480d573c","name":"@0x402/auditor","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@0x402/auditor","version":"0.1.0","keywords":["x402","express","agent","audit","seal"],"author":{"name":"Wayne Kuo"},"license":"MIT","_id":"@0x402/auditor@0.1.0","maintainers":[{"name":"waynekuo","email":"wayne.k@typuslab.com"}],"homepage":"https://wayneal.github.io/0G","bugs":{"url":"https://github.com/WayneAl/0G/issues"},"dist":{"shasum":"57984778551ccaf97e799ab483d8c2d6349c4e85","tarball":"https://registry.npmjs.org/@0x402/auditor/-/auditor-0.1.0.tgz","fileCount":13,"integrity":"sha512-SLlTUYbzF0VRXuWCwjdikVZx+DFvHhstojP3aeNbUEZghsu0eX7ILXX3EPR3dv833eHJ5dWoBhzQGu6yzn35DA==","signatures":[{"sig":"MEUCIG7mTynYM9b4AKQ+vCOI8Yjce0kh9vx1cw1eXvqk2sUDAiEAs500UiXpGxHEV43vXDu0UrN2vmPcmHNXh5mF18Kc/5k=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15968},"main":"./dist/index.js","type":"module","_from":"file:0x402-auditor-0.1.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"waynekuo","email":"wayne.k@typuslab.com"},"_resolved":"/private/var/folders/v9/gfr09p7j5nj2hsj_v0h5cq480000gn/T/08aa49b9ffebffb15ce3b71de365fa18/0x402-auditor-0.1.0.tgz","_integrity":"sha512-SLlTUYbzF0VRXuWCwjdikVZx+DFvHhstojP3aeNbUEZghsu0eX7ILXX3EPR3dv833eHJ5dWoBhzQGu6yzn35DA==","repository":{"url":"git+https://github.com/WayneAl/0G.git","type":"git","directory":"packages/auditor"},"_npmVersion":"11.11.0","description":"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.","directories":{},"_nodeVersion":"24.14.1","dependencies":{"zod":"^3.24.2","viem":"^2.23.2","@0x402/og":"0.1.0","@x402/evm":"^2.24.0","@x402/core":"^2.24.0","@0x402/seal":"0.1.0","@x402/express":"^2.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.5","express":"^4.21.2","@types/express":"^4.17.21"},"peerDependencies":{"express":"^4.21"},"_npmOperationalInternal":{"tmp":"tmp/auditor_0.1.0_1788793228653_0.599773522388086","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@0x402/auditor","version":"0.1.1","keywords":["x402","express","agent","audit","seal"],"author":{"name":"Wayne Kuo"},"license":"MIT","_id":"@0x402/auditor@0.1.1","maintainers":[{"name":"waynekuo","email":"wayne.k@typuslab.com"}],"homepage":"https://wayneal.github.io/0G","bugs":{"url":"https://github.com/WayneAl/0G/issues"},"dist":{"shasum":"1a511a36306b9f6b099c1189f2950325c7ac2f5e","tarball":"https://registry.npmjs.org/@0x402/auditor/-/auditor-0.1.1.tgz","fileCount":13,"integrity":"sha512-n3Cegl5CkF/rmzEEWesJCnF3ed0cz+M46rCrBDB6F0/Q0esvwE3YROgv26VF3m4eyslSS3XKZLJ/nNdCzye60g==","signatures":[{"sig":"MEUCIH5aB9mQCh72ymWxNWbsZ6NqZaxb5g6lwi03v3LPkB2XAiEAoMZxZPKKVKh8NKaMap9VuAzLapmJ6ZcKiRpEuxHnUhQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":15968},"main":"./dist/index.js","type":"module","_from":"file:0x402-auditor-0.1.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsc -p tsconfig.build.json","typecheck":"tsc --noEmit"},"_npmUser":{"name":"waynekuo","email":"wayne.k@typuslab.com"},"_resolved":"/private/var/folders/v9/gfr09p7j5nj2hsj_v0h5cq480000gn/T/5517bf767b6a9619b31939fea6dead1a/0x402-auditor-0.1.1.tgz","_integrity":"sha512-n3Cegl5CkF/rmzEEWesJCnF3ed0cz+M46rCrBDB6F0/Q0esvwE3YROgv26VF3m4eyslSS3XKZLJ/nNdCzye60g==","repository":{"url":"git+https://github.com/WayneAl/0G.git","type":"git","directory":"packages/auditor"},"_npmVersion":"11.11.0","description":"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.","directories":{},"_nodeVersion":"24.14.1","dependencies":{"zod":"^3.24.2","viem":"^2.23.2","@0x402/og":"0.1.1","@x402/evm":"^2.24.0","@x402/core":"^2.24.0","@0x402/seal":"0.1.1","@x402/express":"^2.24.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.0.5","express":"^4.21.2","@types/express":"^4.17.21"},"peerDependencies":{"express":"^4.21"},"_npmOperationalInternal":{"tmp":"tmp/auditor_0.1.1_1788838316837_0.7827283097401614","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@0x402/auditor","version":"0.1.2","description":"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.","license":"MIT","author":{"name":"Wayne Kuo"},"homepage":"https://wayneal.github.io/0G","repository":{"type":"git","url":"git+https://github.com/WayneAl/0G.git","directory":"packages/auditor"},"bugs":{"url":"https://github.com/WayneAl/0G/issues"},"keywords":["x402","express","agent","audit","seal"],"type":"module","main":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"publishConfig":{"access":"public"},"dependencies":{"@x402/core":"^2.24.0","@x402/evm":"^2.24.0","@x402/express":"^2.24.0","viem":"^2.23.2","zod":"^3.24.2","@0x402/seal":"0.1.2","@0x402/og":"0.1.2"},"peerDependencies":{"express":"^4.21"},"devDependencies":{"@types/express":"^4.17.21","express":"^4.21.2","vitest":"^3.0.5"},"scripts":{"build":"tsc -p tsconfig.build.json","test":"vitest run","typecheck":"tsc --noEmit"},"types":"./dist/index.d.ts","_id":"@0x402/auditor@0.1.2","_integrity":"sha512-TQmojHSq+6qlJSe7XG2daG2c+YOTwSuvcbX0cfH+UH4bLk9im7NvGE/vOz717q0dWKVAGCDPjx2DTtrajj5ikw==","_resolved":"/private/var/folders/v9/gfr09p7j5nj2hsj_v0h5cq480000gn/T/019cb5aa83b00c035ced43f2537ecc92/0x402-auditor-0.1.2.tgz","_from":"file:0x402-auditor-0.1.2.tgz","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-TQmojHSq+6qlJSe7XG2daG2c+YOTwSuvcbX0cfH+UH4bLk9im7NvGE/vOz717q0dWKVAGCDPjx2DTtrajj5ikw==","shasum":"4498f2ba10dd2b731d705e4c72afdc0746fdff2d","tarball":"https://registry.npmjs.org/@0x402/auditor/-/auditor-0.1.2.tgz","fileCount":13,"unpackedSize":15968,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDHCsjENVBGpII4n43VtsIuuA+X592y7DG3rzdKhvQxrAIhAMLoHkD2E4+5gzA0Wi66M37JQXdIUiz4uSb1eiUpDGjX"}]},"_npmUser":{"name":"waynekuo","email":"wayne.k@typuslab.com"},"directories":{},"maintainers":[{"name":"waynekuo","email":"wayne.k@typuslab.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/auditor_0.1.2_1788845354159_0.5010652595474592"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-07T15:00:28.440Z","modified":"2026-09-08T05:29:14.531Z","0.1.0":"2026-09-07T15:00:28.777Z","0.1.1":"2026-09-08T03:31:56.984Z","0.1.2":"2026-09-08T05:29:14.280Z"},"bugs":{"url":"https://github.com/WayneAl/0G/issues"},"author":{"name":"Wayne Kuo"},"license":"MIT","homepage":"https://wayneal.github.io/0G","keywords":["x402","express","agent","audit","seal"],"repository":{"type":"git","url":"git+https://github.com/WayneAl/0G.git","directory":"packages/auditor"},"description":"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.","maintainers":[{"name":"waynekuo","email":"wayne.k@typuslab.com"}],"readme":"# @0x402/auditor\n\nThe Agent B side, as one Express route: an x402-paid audit that answers with a signed\nseal.\n\n```bash\nnpm i @0x402/auditor express\n```\n\n```ts\nimport express from \"express\";\nimport { sealedAuditRoute } from \"@0x402/auditor\";\n\nconst app = express();\napp.use(express.json({ limit: \"1mb\" }));\n\nsealedAuditRoute(app, {\n  sealAccount,               // your key, in your process\n  agentId: \"2\",\n  priceUsd: \"$0.01\",\n  payToAddress,\n  network: \"eip155:84532\",\n  facilitatorUrl,\n  sealTtlSeconds: 86_400,\n  og: { network: \"testnet\", apiKey, model: undefined, skipAttestation: false },\n});\n\napp.listen(4021);\n```\n\nIt mounts two routes:\n\n- `GET /agent` — free, and readable from any page (it sets `Access-Control-Allow-Origin`).\n  The card says who a caller would be hiring: agent id, seal signer, payee, price,\n  network, model, trust mode. Anyone can read it before paying.\n- `POST /audit` — x402-paid (protocol **v2**), and the reason this package exists.\n\n## What makes you an Agent B\n\nTaking money is not enough. A plain x402 API takes the same cent and answers with\nprose, and the agent that paid has nothing it can embed, show, or be held to. What\nmakes you a B is issuing a seal: a signed statement binding your verdict to the exact\nrequest, the model, and the TEE attestation the inference came back with.\n\n## The 502 rule\n\nThe payment settles on a 2xx. So if the inference fails, or the seal cannot be\nissued, this route answers **502** rather than a cheerful body — because a 2xx here\nwould take the money for a seal that was never issued.\n\n---\n\n[Repository](https://github.com/WayneAl/0G) · [Site](https://wayneal.github.io/0G) · MIT\n","readmeFilename":"README.md"}