Machine-readable contract
Response schemas
Every JSON response on this site is self-describing. Each one carries a three-field envelope whose $schema pointer resolves to the JSON Schema document for that shape, so an agent can validate a response before it influences a decision.
The envelope
Three top-level fields appear on every JSON response:
Response signatures
JCS + SHA-256 + Ed25519Every response whose schema references signature.schema.json carries a top-level signature object: a provider signature proving the body was assembled by x402-trust and not modified afterwards. Hashing a response yourself only proves you saw it; this proves we attested it. Two schema types are deliberately unsigned: watch and watch-view carry capability secrets that must never be forwarded as evidence.
Trust anchor: pin, do not follow. The publicKeys field is a discovery hint, never a trust source. A verifier that fetches the key URL from the response it is checking verifies against a key chosen by the sender, which proves nothing: a forged response would simply carry the attacker's own key URL and still verify. Hardcode the trust anchor in your verifier: either the public key itself (strongest, works fully offline; add new keys on rotation) or the pinned URL https://x402-trust.com/.well-known/x402-trust-keys.json, fetched over HTTPS at bootstrap and cached (rotation-friendly; retired keys stay published, so cached copies keep verifying).
To verify a response:
1. Remove the whole signature object (it is excluded from the canonical input, digest included).
2. Canonicalize the rest with JCS (RFC 8785): object keys sorted by UTF-16 code unit order, no whitespace, numbers per ECMAScript rules.
3. SHA-256 the canonical UTF-8 bytes. The hex must equal signature.digest, a short stable reference you can keep in your own evidence records.
4. Verify signature.value (base64url, no padding) against the public key that signature.keyId resolves to in your pinned copy of the key document.
Keys rotate; retired public keys stay published forever, so a response you froze as evidence remains verifiable. Two live calls never produce identical signatures because generatedAt is part of the signed content: freeze a concrete signed response, not the abstract query. A complete worked example (signed response, canonical bytes, digest, test-only key) is published at /schemas/signature-test-vector.json so you can test your verifier without asking us.
Reference verifier (Node 20+, no dependencies). The pinned key map below is the live content of the key document as of this page render:
Compatibility rules
same version Additive fields
A new optional field is backward compatible and does not change the version.
major bump Remove / rename / resemantize
Removing or renaming a field, or changing what it means, is a new major version.
documented New enum value
A new recommendation or grade value is a documented version change, because strict buyers may reject unknown values.
Two closed enums are worth pinning: recommendation is one of proceed, caution, avoid, parameterize, unverified, not-payable, free (a resource that answers plain requests with data and never presented a payment challenge; no payment flow to grade). grade is one of A, B, C, D, F, or ? for unmeasured.
Data & scoring
11 schemas-
x402-trustFull trust report for one endpoint: score, grade, recommendation, component breakdown, advertised price, and 30-day on-chain settlement stats. -
x402-trust-bulkBatch trust scores for up to 500 endpoints in a single paid call. -
x402-trust-previewFree sample reports for three fixed endpoints, showing the full paid shape across the quality range. -
x402-historyRaw observation time-series for one endpoint: list/delist events, price and payTo changes, and per-probe results. -
similarThe endpoints whose advertised purpose matches a URL and currently out-score it. -
semantic-searchFree-text semantic search over the catalog: the closest endpoints by meaning (similarity bucketed to whole percentage points, then trust score, 0.5 similarity floor), with similarity, score, grade, and description. Discovery only, no verdicts. -
statsAggregate ecosystem snapshot: listings, reachability, and 30-day settlement volume. -
leaderboardThe top trust-scored endpoints, free. -
reportThe full State of x402 report, the JSON behind /trust/report. -
facilitatorsPer-facilitator settlement volume leaderboard. -
facilitatorDetail for one facilitator, with per-chain volume and 90-day history.