Expand description
CESR + KERI primitives for Rust as a single feature-gated crate.
§Architecture: one wire message, three modules
A KERI key event message is a serialized event body followed by CESR-framed attachments:
{"v":"KERI10JSON000189_","t":"icp","d":"EAgi…",…} -VAt -AAC AADB_mVj…88ch ABAN5tRO…88ch
└──────────────────── body ─────────────────────┘└─────────── attachments ────────────┘
│ │ └ two indexed Ed25519 sigs
│ └ `-A` ControllerIdxSigs, count 2
└ `-V` attachment frame, size in quadletsEach module owns one verb over that message:
- [
stream] finds it — cold-start detection and version-string framing slice the body span; counters delimit the attachment groups. - [
keri] names it — the typed domain: events, identifiers, seals, thresholds. Pure data, no serialization of its own. corespells it — the CESR primitive alphabet (Matter, indexers, counters) that every layer above composes;b64is its Base64 codec, [crypto] its digests, keypairs, and verifiers.
The body codec — the strict canonical JSON parser with in-place SAID
verification, the builders that write keripy’s exact bytes back, and the
end-to-end read and write spines over them — lives in the keri-codec
crate, which composes this crate’s stream framing with keri’s typed
domain.
§Features
Each former separate crate is now a module gated by a cargo feature:
b64, core, crypto, stream, keri, reachable as
cesr::core::*, cesr::crypto::*, etc. (The former utils module — the
CESR Base64 codec — is now b64.)
The crate is no_std-capable: std (on by default) gives the std-backed
surface; build --no-default-features --features alloc,… for embedded/wasm.
Modules§
- b64
b64 - CESR Base64 codec.
- core
core - CESR (Composable Event Streaming Representation) core primitives and codes.
- prelude
- The common imports for working with
cesr.
Structs§
- Dater
core - ISO-8601
DateTimeencoded as CESR Matter. Code is alwaysMatterCode::DateTime(1AAG). - Matter
core - A CESR-encoded primitive with typed code
C, a raw payload, and an optional soft field. - Number
core - An unsigned integer with an automatically selected CESR number code.
- Seqner
core - CESR sequence number, wrapping a
Numberfor event ordering. - Siger
core - An indexed signature primitive.
Enums§
- Cesr
Version core - CESR protocol version for code table selection.
Type Aliases§
- Cigar
core - Non-indexed signature
- Diger
core - Digest — holds a hash value
- Labeler
core - Label primitive — field name or tag
- Noncer
core - Nonce/UUID primitive — salt, digest, or empty
- Prefixer
core - AID prefix — a verification key used as an autonomic identifier
- Saider
core - Self-addressing identifier (SAID) — a digest used as a content identifier
- Signer
core - Signing key seed — can produce signatures (actual crypto in cesr-crypto)
- Texter
core - Text primitive — variable-length byte string
- Verfer
core - Verification key — can verify signatures
- Verser
core - Version primitive — encodes protocol/genus version info