Loading vLEI.wiki
Fetching knowledge base...
Fetching knowledge base...
This comprehensive explanation has been generated from 54 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 field-map is the fundamental data structure unit in KERI (Key Event Receipt Infrastructure) and ACDC (Authentic Chained Data Container) specifications, representing what is traditionally called a "key-value pair" in standard programming terminology. The deliberate renaming from "key-value pair" to "field-map" prevents semantic confusion between data structure mappings and cryptographic keys, which are pervasive throughout KERI's security architecture.
A field-map consists of two components:
These can be represented as two-tuples in the form (label, value).
The terminology components are precisely defined:
Field-maps form the ordered nested structure that defines ACDCs. The ACDC specification mandates insertion-ordered field maps for canonical serialization, meaning fields must maintain their creation order rather than being sorted lexicographically. This ordering requirement is critical for:
Implementations MUST preserve insertion-order of field-maps during serialization/deserialization. Modern programming languages support ordered dictionaries (Python 3.7+, JavaScript ES2015+) that maintain insertion order natively.
Always use "field-map" terminology in KERI/ACDC contexts rather than "key-value pair" to maintain clear distinction from cryptographic keys. Use "field label" and "field value" for the components.
When processing nested field-maps:
Implementations should support multiple serialization formats (JSON, CBOR, MGPK) while maintaining consistent field-map ordering across all formats for cryptographic verifiability.
Most modern programming languages support ordered dictionaries or hash tables that preserve insertion order, enabling this reproducibility without reordering.
In block-delimited serializations like JSON, each field-map is represented by an object block with delimiters such as {}. These blocks create clear structural boundaries within the serialization. The block-delimited nature is significant because:
The ACDC specification explicitly references these "block-delimited" serializations when discussing how field-maps are represented in JSON, CBOR, and MGPK formats.
Field-maps in KERI/ACDC support self-describing properties, meaning the data structure includes metadata about its own contents. When combined with CESR encoding, field-maps participate in self-framing, where textual or binary encodings include type, size, and value information that allows parsers to extract elements from streams without additional delimiters.
The self-framing property is essential for:
Field-maps can be nested, where a field value itself references another field-map, creating hierarchical data structures. This nesting enables:
For example, in an ACDC credential structure:
{
"v": "ACDC10JSON000197_",
"d": "EBdXt3gIXOf2BBWNHdSXCJnFJL5OuQPyM5K0neuniccM",
"i": "did:keri:EmkPreYpZfFk66jpf3uFv7vklXKhzBrAqjsKAn2EDIPM",
"s": "E46jrVPTzlSkUPqGGeIZ8a8FWS7a6s4reAXRZOkogZ2A",
"a": {
"d": "EgveY4-9XgOcLxUderzwLIr9Bf7V_NHwY1lkFrn9y2PY",
"i": "did:keri:EpZfFk66jpf3uFv7vklXKhzBrAqjsKAn2EDIPmkPreYpZ",
"dt": "2021-06-27T21:26:21.233257+00:00",
"LEI": "254900OPPU84GM83MG36"
}
}
Here, the top-level field-map contains a nested field-map at the "a" (attributes) field, which itself contains multiple field-maps representing individual attributes.
ACDCs define strict ordering for top-level field-maps: [v, d, u, i, rd, s, a, A, e, r], where each letter represents a specific field label:
v: Version string - The first field in any top-level KERI field-map, enabling self-framing for JSON, CBOR, and MGPK serializationsd: SAID of the ACDC - Self-addressing identifier providing content-addressable verificationu: UUID - One-time use nonce for replay attack protectioni: Issuer AID - Autonomic identifier of the credential issuerrd: Registry SAID - Reference to credential status registry for revocation checkings: Schema SAID - Identifier for the credential schemaa: Attributes - Field-map or SAID containing credential claimsA: Attribute aggregates - Additional attribute structurese: Edges - Field-map or SAID defining connections to other ACDCsr: Rules - Field-map or SAID containing Ricardian contract termsEach of these top-level fields may contain nested field-maps, creating the hierarchical structure that enables graduated disclosure and cryptographic verification.
Field-maps are fundamental to SAID (Self-Addressing Identifier) computation. A SAID is a cryptographic digest that is embedded within the content it identifies, creating a self-referential but content-addressable identifier. The SAID computation process for field-maps works as follows:
"d") is replaced with a dummy value of appropriate lengthThis mechanism provides several critical properties:
When field-maps are encoded using CESR (Composable Event Streaming Representation), 24-bit alignment becomes critical. CESR achieves text-binary composability through careful management of bit boundaries:
Field-maps must align on 24-bit boundaries (3 bytes, 4 Base64 characters) to enable lossless conversion between text and binary domains. This alignment ensures:
= pad characterThe CESR specification uses pre-padding and lead bytes rather than post-padding to maintain this alignment while preserving the self-framing property.
A powerful property of field-map SAIDs in ACDCs is cross-variant Issuer commitment verifiability. When an issuer signs an ACDC, they commit to the top-level field-map structure. This commitment remains valid across different variants:
The issuer's signature verifies against any variant because all variants share the same top-level field-map SAIDs, even when nested content is represented differently.
Field-maps in KERI/ACDC support multiple serialization formats, each optimized for different use cases:
JSON (JavaScript Object Notation):
{} delimitersCBOR (Concise Binary Object Representation):
MGPK (MessagePack):
CESR (Composable Event Streaming Representation):
All serialization formats must preserve the canonical insertion-order of field-maps to maintain cryptographic integrity. The order in which fields were originally created must be maintained across all format transformations.
CESR supports interleaved serialization, where field-maps from different formats can be mixed within a single stream. Special count codes enable CESR streams to incorporate:
This interleaving capability is particularly important for:
A CESR stream containing field-maps is sniffable when it begins with recognizable markers:
The Parside parser leverages sniffability to detect field-map types:
This cold start problem solution enables parsers to begin processing field-maps from any point in a stream without prior context or framing information.
Field-maps are central to ACDC's graduated disclosure mechanisms, which enable progressive revelation of credential information. The framework operates through strategic manipulation of field-map representations:
Compact Disclosure:
Partial Disclosure:
Selective Disclosure:
Full Disclosure:
Field-maps enable contractually protected disclosure through the rules section (r field). This top-level field-map can embed:
The rules field-map is both human-readable and machine-processable, enabling automated enforcement of disclosure terms while maintaining legal validity.
The edges top-level field-map (e) transforms ACDCs into nodes within a directed acyclic graph (DAG). Each edge field-map can contain:
This creates a labeled property graph (LPG) where:
The operator field-map within edge sections enables expression of edge logic:
These operators transform static edge field-maps into dynamic graph processing instructions, enabling sophisticated credential chain verification and authorization propagation.
The version string field-map (v) serves as a workaround mechanism to enable self-framing in JSON, CBOR, and MGPK serializations. As the first field in any top-level KERI field-map, it:
The version code "tells you which set of tables to load, it tells the table state."
Field-maps interact with JSON Schema validation through the schema field (s). The schema SAID references a formal specification defining:
This integration provides:
The attributes field-map (a) is specifically designed for credential claims. It can be provided as:
Attribute field-maps support:
Field-maps can be signed using SAD (Self-Addressed Data) path notation, enabling:
However, the practical use of pathing in credential signing remains limited, with its primary application being message forwarding in KERI protocols.
The registry field-map (rd) connects to Transaction Event Logs (TELs) for credential status tracking. This field-map:
Advanced parsers (like Parside) support dynamic code table loading based on version strings in field-maps. This enables:
Field-maps are deeply integrated with core KERI primitives:
The consistent use of field-map terminology throughout KERI specifications prevents confusion between data structures and cryptographic keys, enabling clearer reasoning about protocol security properties.
Field-maps represent the fundamental data structure abstraction throughout the KERI/ACDC ecosystem. Their carefully designed properties—insertion ordering, self-addressing, format-agnostic serialization, and graduated disclosure support—enable the construction of verifiable, privacy-preserving, and cryptographically secure credential systems. Understanding field-maps is essential for implementing KERI protocols, as they form the foundation upon which all higher-level constructs are built.
The deliberate renaming from "key-value pairs" to "field-maps" exemplifies the KERI design philosophy: precise terminology prevents semantic confusion in security-critical systems where clarity is paramount. By consistently using field-map terminology, developers can reason about data structures without conflating them with the cryptographic keys that provide security properties. This linguistic precision, combined with the robust technical properties of field-maps themselves, creates a solid foundation for building the next generation of decentralized identity and verifiable credential infrastructure.