Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 169 GitHub source documents. All source documents are searchable here.
Last updated: October 7, 2025
This content is meant to be consumed by AI agents via MCP. Click here to get the MCP configuration.
Note: In rare cases it may contain LLM hallucinations.
For authoritative documentation, please consult the official GLEIF vLEI trainings and the ToIP Glossary.
A schema in KERI/ACDC is a JSON Schema document that defines the structure, validation rules, and required fields for Authentic Chained Data Containers (ACDCs), identified by its SAID (Self-Addressing Identifier) to ensure immutability and cryptographic verifiability of credential structures.
In the KERI/ACDC ecosystem, a schema is fundamentally a JSON Schema document that serves as the structural blueprint for Authentic Chained Data Containers (ACDCs). Unlike traditional credential systems where schemas are mutable references, KERI schemas are SAIDified - meaning each schema is identified by its own Self-Addressing Identifier (SAID), which is a cryptographic digest of the schema's canonical content.
The schema serves three critical functions:
A key architectural principle is type-is-schema - rather than having separate type fields, the schema SAID itself serves as the type identifier. This approach ensures that any reference to a schema SAID unambiguously identifies both the structure and the exact version of that structure, as any modification to the schema produces a different SAID.
ACDC schemas mandate insertion-ordered field maps rather than lexicographic (alphabetical) ordering. This requirement is critical for cryptographic verifiability:
Recursive Processing: SAIDification MUST proceed from innermost blocks outward. Attempting to compute the top-level SAID before nested section SAIDs will produce incorrect results because parent SAIDs cryptographically commit to child SAIDs.
Canonical Serialization: When computing SAIDs, use compact JSON serialization with NO whitespace. The serialization format must be consistent across all implementations to ensure SAID reproducibility.
Placeholder Length: The placeholder string for SAID fields must be exactly 44 characters (matching CESR-encoded Blake3-256 digest length). Using incorrect placeholder length will produce wrong SAIDs.
Insertion Order Preservation: Implementations MUST preserve field insertion order as defined in the schema. Using languages or libraries that don't maintain insertion order (e.g., older Python dict implementations) will break SAID computation and verification.
Schema-Defined Order: The canonical field order is defined by the sequence of properties in the schema's properties object, NOT alphabetical order. Implementations that sort fields alphabetically will fail validation.
oneOf Validation: When schemas use oneOf for compact/expanded variants, validators must correctly handle both forms. The compact form (SAID string) and expanded form (full object) are both valid and must validate against the schema.
additionalProperties: ACDC schemas typically set additionalProperties: false to prevent schema extensions. This is a security feature - implementations must respect this constraint.
OOBI Integration: Schema resolution should use OOBI protocol for discovery. Implementations should support multiple resolution mechanisms (HTTP, IPFS, etc.) for resilience.
Caching Strategy: Schema resolution can be expensive. Implement caching with appropriate invalidation strategies. Since schemas are immutable (identified by SAID), cached schemas never need revalidation.
Resolution Timeout: Implement reasonable timeouts for schema resolution to prevent hanging on unavailable schema servers.
Schema Compilation: JSON Schema validators often support compilation for faster validation. Compile schemas once and reuse the compiled validator for multiple ACDC instances.
This ordering requirement is "non-existent in much of the Javascript world and many other credential formats" but is essential for KERI's security model. Modern programming languages support ordered dictionaries/hash tables that maintain insertion order, making this requirement implementable.
ACDC schemas leverage JSON Schema composition operators (oneOf, allOf, anyOf) to support multiple variants of the same credential type:
This composition approach enables graduated disclosure - the ability to progressively reveal credential information while maintaining cryptographic integrity across all disclosure levels.
All vLEI credential schemas MUST be compliant with JSON Schema 2020-12, the official specification maintained by the JSON Schema organization. This ensures:
A complete ACDC schema document contains several key components:
Top-Level Metadata:
$id: The schema's SAID, computed through the SAIDification process$schema: Reference to JSON Schema specification version ("https://json-schema.org/draft/2020-12/schema")title: Human-readable schema namedescription: Schema purpose and usage documentationtype: Always "object" for ACDC schemascredentialType: Specific credential type identifier (e.g., "LegalEntityvLEICredential")Required Fields Array: Specifies which top-level fields are mandatory for a valid ACDC instance. Typically includes:
v (version string)d (credential SAID)i (issuer AID)ri (registry identifier)s (schema SAID)Properties Object: Defines each field's structure, type, and constraints. For ACDC schemas, this includes:
v): String type with specific format requirementsd, s): String type representing cryptographic digestsi, ri): String type for AIDs and registry referencesa, e, r): Complex objects or SAID references using oneOf compositionNested Section Schemas: Each major ACDC section (attributes, edges, rules) has its own nested schema definition with:
$id (SAID)additionalProperties: false)The schema SAIDification process is recursive, proceeding from innermost blocks outward:
$id fields ("") at all levelsThis recursive approach ensures that:
The schema document itself defines the canonical field ordering through the sequence in which properties are declared in the properties object. When serializing an ACDC instance:
Creating a new ACDC schema involves several steps:
1. Schema Design:
2. JSON Schema Authoring:
additionalProperties: false to prevent schema extensions3. SAIDification Execution:
$id fields4. Validation and Testing:
When processing an ACDC, verifiers must resolve and verify the schema:
Schema Resolution:
s fieldSchema Verification:
s field valueInstance Validation:
ACDC schemas follow Semantic Versioning 2.0.0 principles:
Version Numbering:
Backward Compatibility:
Schema Evolution Strategy:
Schemas are managed through registries that provide:
Schema Publication:
Schema Lookup:
Schema Governance:
Schemas are central to the ACDC issuance workflow:
Issuer Perspective:
s fieldHolder Perspective:
Verifier Perspective:
The vLEI ecosystem demonstrates production schema usage:
Official vLEI Schemas (all version 1.0.0):
EBfdlu8R27Fbx-ehrqwImnK-8Cm79sqbAQ4MmvEAYqao)ENPXp1vQzRF6JwIuS-mp2U8Uf1MoADoP_GqQ62VsDZWY)EKA57bKBKxr_kN7iN5i7lMUxpMG-s19dRcmov1iDxz-E)EBNaNu-M9P5cgrnfl2Fvymy4E_jvxxyjb70PRtiANlJy)EH6ekLjSr8V32WyFbGe1zXjTzFs9PkTYmupJ9H65O14g)EEy9PkikFcANV1l7EHukCeXqrzT1hNZjGlUk7wuMO5jw)Schema Hosting:
GLEIF-IT/vLEI-schema repositorySchema Governance:
Schemas play a crucial role in IPEX (Issuance and Presentation Exchange) protocol:
Schema-Based Negotiation:
Graduated Disclosure:
Contractually Protected Disclosure:
ACDC schemas support credential chaining through edge definitions:
Edge Schema Requirements:
Chain Validation:
Immutability:
Verifiability:
Minimize Breaking Changes:
Clear Field Semantics:
Graduated Disclosure Support:
Edge Relationship Clarity:
SAIDification Tools:
Validation Tools:
Schema Servers:
Schema Caching:
Lazy Schema Resolution:
Validation Optimization:
Lazy Validation: For large ACDC graphs, consider lazy validation strategies where schemas are validated only when needed rather than eagerly validating entire graphs.
SAID Verification: ALWAYS verify schema SAID before using a schema. Accepting schemas without SAID verification opens attack vectors where malicious schemas could be substituted.
Schema Source Trust: Only accept schemas from trusted sources. In vLEI ecosystem, official schemas come from GLEIF-controlled repositories. Implement schema source validation.
Version Pinning: When building applications, pin to specific schema versions (SAIDs) rather than accepting any version. This prevents unexpected behavior from schema updates.
JSON Schema 2020-12: Ensure validators support JSON Schema 2020-12 specification. Older validators may not support composition operators correctly.
CESR Encoding: Schema SAIDs use CESR encoding with specific prefixes (e.g., 'E' for Blake3-256). Implementations must correctly encode/decode CESR primitives.
Cross-Language Consistency: When implementing in multiple languages, ensure SAID computation produces identical results. Test cross-language compatibility with reference test vectors.