Skip to main content

keria_types/
lib.rs

1//! Shared, serialization-oriented protocol and KERIA API data types.
2//!
3//! This crate is data-only. It holds the request and response records the KERIA agent exchanges
4//! with an edge signer, curated from the pinned reference's generated
5//! `src/types/keria-api-schema.ts` and its hand-written `src/keri/core/keyState.ts` wrapper. It
6//! performs no cryptography, builds no KERI events, and knows nothing about HTTP or endpoint
7//! paths: those belong to the crates that use it, such as `keri-cesr` and signify-rs.
8//!
9//! Everything lives under [`api`].
10//!
11//! # Relationship to the protocol crates
12//!
13//! A record here is the *decoded shape of a document a KERIA agent sent*, not the authoritative
14//! protocol artifact. In particular, re-serializing a [`api::KeyEvent`] reproduces the schema's
15//! field order but is **not** guaranteed to reproduce the exact bytes the agent transmitted, so a
16//! SAID must be verified against received bytes with `signify-keri`, never against a record that
17//! has made a round trip through this crate. See [`api`] for the full rule.
18
19#![forbid(unsafe_code)]
20
21pub mod api;