JSON Schemas

EEP defines 24 JSON Schemas under schemas/v0.1/ (JSON Schema Draft-07). The canonical tree is in the eep-dev/EEP repository; filenames below match it exactly.

Events, subscriptions & transport

Schema fileRole
event.envelope.jsonCloudEvents v1.0.2 envelope with EEP extension attributes (primary event schema)
subscription.request.jsonSubscription creation request body
delivery.payload.jsonWebhook / delivery payload wrapper
ws-message.jsonWebSocket frame format (Layer 3)
eep-pulse-message-schema.jsonNetwork pulse message envelope

Discovery & registry

Schema fileRole
eep-manifest.json/.well-known/eep.json manifest
eep-registry.jsonRegistry document
registry.search-result.jsonRegistry search hit shape

Gates, sessions & HTTP error bodies

Schema fileRole
gate.config.jsonGate configuration (tiers, requirements)
gate.proof.jsonProof payloads submitted to gates
session.token.jsonGate session token
delegation.proof.jsonDelegation / VC-style proofs
gate.402-response.jsonHTTP 402 access restriction body
gate.403-response.jsonHTTP 403 body
gate.429-response.jsonHTTP 429 body
gate.451-response.jsonHTTP 451 body

Commerce, operator & compliance

Schema fileRole
commerce.negotiation.jsonCommerce negotiation envelope
service.listing.jsonMarketplace / service listing
agent.wallet.jsonAgent wallet structure
operator.privacy-policy.jsonOperator privacy policy profile
operator.spending-policy.jsonSpending limits / policy
data.withdrawal.jsonData withdrawal / erasure flows
conformance.credential.jsonConformance credential (tier claims)
audit-log.jsonAudit log entry

Validate an event envelope

Schema Validation
import Ajv from 'ajv';
import addFormats from 'ajv-formats';
import schema from './schemas/v0.1/event.envelope.json';
const ajv = new Ajv({ allErrors: true });
addFormats(ajv);
const validate = ajv.compile(schema);
const event = {
specversion: '1.0',
id: '01HN3QK7GX-1708123456000',
source: 'did:web:example.com:u:acme-corp',
type: 'com.example.entity.updated',
time: '2026-02-22T14:30:00Z',
datacontenttype: 'application/json',
eep_version: '0.1',
data: { field: 'bio', current: 'New bio' },
};
if (!validate(event)) {
console.error(validate.errors);
}

Validate a Manifest

Manifest Validation
import { validateManifest } from '@eep-dev/discovery';
const result = validateManifest({
did: 'did:web:api.example.com',
eep_version: '0.1',
layers: { layer1: 'https://api.example.com/eep' },
supported_content_types: ['application/json'],
pqc_ready: false,
x402_enabled: true,
});
console.log(result.valid); // true

Validate Gate Config

Gate Config Validation
import { parseGateConfig } from '@eep-dev/gates';
const config = parseGateConfig({
default_tier: 'public',
tiers: {
public: {
requirements: [],
access: ['profile.summary'],
},
premium: {
label: 'Premium Access',
requirements: [
{ type: 'payment', amount: 10, currency: 'usd', per: 'month' },
],
access: ['*'],
rate_limit: { requests_per_minute: 100 },
},
},
fallback_behavior: 'default',
});
// Throws if invalid