VXP docs · draft 0.1

JSON Schemas

JSON Schemas (2020-12) for every object of VXP 0.1, published under vxpprotocol.org/schemas/0.1/, checked against the reference implementation and usable to validate your own.

The schemas restate the specification as JSON Schema 2020-12, so a company or an agent can check its objects mechanically. Where a schema and the specification differ, the specification governs. They are versioned with the protocol: https://vxpprotocol.org/schemas/0.1/<name>.schema.json, each with that URL as its $id. common.schema.json holds the shared definitions (digests, states, authorization details, commitment).

The schemas#

SchemaObjectRules
vxp.schema.jsonGET /.well-known/vxp.jsonnative-discovery
issuer-metadata.schema.jsonvxp_proof and vxp_relationship in the issuer's RFC 8414 metadataissuer-anchoring, R1, R5
client-metadata.schema.jsonThe agent's Client ID Metadata Document, with its inboxnative-authorization, R2
token-response.schema.jsonThe token response: authorization_details granted and relationships[]native-authorization, R4
request-body.schema.jsonPOST {endpoint}/requests bodynative-endpoints
request.schema.jsonA request: state, projections, missing authority, proposal, effects, resultnative-endpoints, O2, O4
read-response.schema.jsonThe answer to a read capabilitynative-endpoints
accept-body.schema.json, counter-body.schema.jsonAccept and counter-proposal bodiesnative-endpoints
events.schema.jsonGET {endpoint}/requests/{id}/eventsnative-endpoints, E1
error.schema.jsonAn error answererrors
proof-package.schema.jsonGET {endpoint}/requests/{id}/proofproof
statement-header.schema.json, statement.schema.jsonEach statement's header, and its payload by kindproof, P1–P6
checkpoint.schema.jsonThe log checkpointissuer-anchoring
relationship.schema.json, relationship-agreement.schema.jsonA relationship and its signed agreementR4, R10, R11
company-request.schema.json, inbox-delivery.schema.jsonA company-initiated request and its deliveryR7, R8
reply-body.schema.json, reply-response.schema.json, reply-receipt.schema.jsonAnswering a closed question and its receiptR17

A schema checks shape. Signatures, digests and the order of a chain are the verifier's job (Guide for verifiers).

How they are checked#

  • node schemas/check.ts validates the objects of a real native run, every proof package kept in the repository, every statement in the test vectors and the personal agent's run, and requires each object in schemas/invalid.json (one per broken rule) to be rejected. With --run <dir> it also validates a fresh run of reference/scripts/recorrido-nativo.test.ts. CI runs both.
  • The conformance validator checks every object an implementation returns against the schemas, in check S1, including the messages that reach the validator's inbox. See Conformance.

Use them#

Validate one object with any JSON Schema 2020-12 validator, for examplesh
npx --yes ajv-cli@5 validate --spec=draft2020 -r "schemas/0.1/common.schema.json" \
  -s schemas/0.1/vxp.schema.json -d my-vxp.json

Or import them by URL: every $ref is relative, so a validator that resolves $id loads the rest by itself.