# PayPerByte Package Verdict Oracle

> PayPerByte Package Verdict Oracle is a paid API for AI agents from x402.payperbyte.io, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-15).

Returns a cryptographically attested ALLOW/WARN/BLOCK security verdict for an npm or PyPI package, with EIP-712 provenance signing.

## Facts

- Endpoint: POST https://x402.payperbyte.io/feeds/pkg-verdict
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/payperbyte-package-verdict-oracle-6a293bec
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_MdW2HQt9NgqIXfrPPM7Tt

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability payperbyte-package-verdict-oracle-6a293bec -d '<json body>'
```

Example prompt: Is the npm package 'event-stream' safe to use? Give me a signed security verdict — check if it's malicious, a typosquat, or flagged by any known-bad signals.

## When to prefer this

Use this endpoint when you need a cryptographically attested, tamper-evident security verdict for a specific npm or PyPI package before installation, publishing, or deployment — especially in agentic pipelines where you need an on-chain-anchored EIP-712 signature to prove provenance. Prefer this over generic vulnerability databases when you need a single ALLOW/WARN/BLOCK decision signal with signed accountability, or when screening for typosquats alongside CVE data. Not suited for bulk dependency audits (single package per call) or ecosystems beyond npm and PyPI.

## Known failure modes

- Package not found in the specified ecosystem — registry lookup fails
- Invalid or non-existent version string — version resolution fails
- Unsupported ecosystem value (only npm and pypi accepted)
- Package name exceeds 214-character limit
- Payment not received or x402 payment header invalid — 402 response returned
- Attestation signer address cannot be recovered — signature malformed
- Network timeout contacting upstream registries or OSV.dev

## How this service works

Signed ALLOW/WARN/BLOCK on installing a package@version: OSV.dev malicious-corpus + typosquat distance + registry signals. Verify before you install.

## Output

A JSON object containing: a verdict field (ALLOW, WARN, or BLOCK), a numeric security score (0-100), an array of reasons citing signals from OSV.dev, typosquat detection, registry metadata, and known-bad lists, a pinned resolved version, and an EIP-712 attestation object with the signer address, signature, payload hash, and BYTE Library domain info (Arbitrum Sepolia chainId 421614) proving who signed the exact answer bytes.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "package": {
   "type": "string",
   "maxLength": 214,
   "description": "Package name (npm scoped names like @scope/name allowed; PyPI names are PEP-503-normalized for matching)."
  },
  "version": {
   "type": "string",
   "maxLength": 64,
   "description": "Exact version to judge. Omitted => the registry's latest is resolved and pinned into answer.query.version."
  },
  "ecosystem": {
   "enum": [
    "npm",
    "pypi"
   ],
   "type": "string",
   "description": "Package ecosystem."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "_note": "Illustrative response shape — not a live answer. ALLOW/WARN/BLOCK is a screening signal. The embedded EIP-712 receipt (domain chainId 421614 = Arbitrum Sepolia, a frozen signing namespace, not a settlement rail) proves who signed the exact answer bytes — not that the verdict is correct.",
  "answer": {
   "v": "pkg-verdict/v1",
   "query": {
    "package": "left-pad",
    "version": null,
    "ecosystem": "npm",
    "version_requested": null
   },
   "score": 96,
   "reasons": [
    "illustrative — real answers cite the pv-v1 OSV.dev / typosquat / registry / known-bad signals judged"
   ],
   "verdict": "ALLOW",
   "methodology": "pv-v1"
  },
  "attestation": {
   "domain": {
    "name": "BYTE Library",
    "chainId": 421614,
    "version": "1"
   },
   "signer": "0x…",
   "signature": "0x…",
   "payloadHash": "0x…"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/payperbyte-package-verdict-oracle-6a293bec/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.payperbyte.io](https://www.zero.xyz/host/x402.payperbyte.io/llms.txt)
