Expand description
KERI protocol types, SAID computation, and CESR translation for Auths.
The default feature set provides pure KERI types and SAID utilities with no heavy dependencies — suitable for WASM and FFI embedding.
Enable the cesr feature for bidirectional conversion between Auths’
internal JSON event representation and spec-compliant CESR streams
(Trust over IP KERI v0.9).
Usage (default, no CESR):
ⓘ
use auths_keri::{Prefix, Said, compute_said};
let said = compute_said(&event_json)?;Usage (with CESR feature):
ⓘ
use auths_keri::{CesrV1Codec, export_kel_as_cesr};
let codec = CesrV1Codec::new();
let cesr_stream = export_kel_as_cesr(&codec, &events)?;Re-exports§
pub use acdc::ACDC_KERIPY_REVISION;pub use acdc::ACDC_VERSION_PREFIX;pub use acdc::Acdc;pub use acdc::AcdcError;pub use acdc::Attributes;pub use acdc::CAPABILITY_SCHEMA;pub use acdc::compute_capability_schema_said;pub use acdc::compute_schema_said;pub use capability::Capability;pub use capability::CapabilityError;pub use capability::MANAGE_MEMBERS;pub use capability::ROTATE_KEYS;pub use capability::SIGN_COMMIT;pub use capability::SIGN_RELEASE;pub use capability::UsageCap;pub use did_webs::DidWebsDocument;pub use did_webs::PublicKeyJwk;pub use did_webs::VerificationMethod;pub use ipex::IpexAdmit;pub use ipex::IpexError;pub use ipex::IpexGrant;pub use ksn::KERI_KEY_STATE_VERSION;pub use ksn::KSN_TYPE;pub use ksn::KSN_VERSION;pub use ksn::KeyStateNotice;pub use ksn::KeyStateRecord;pub use ksn::KsnError;pub use ksn::LatestEstablishmentEvent;pub use ksn::SignedKsn;pub use oobi::EndRoleReply;pub use oobi::LocSchemeReply;pub use oobi::Oobi;pub use oobi::OobiEndpoint;pub use oobi::OobiError;pub use oobi::OobiResolution;pub use oobi::Role;pub use oobi::ingest_oobi_stream;pub use tel::Iss;pub use tel::Rev;pub use tel::TEL_KERIPY_REVISION;pub use tel::TRAIT_NO_BACKERS;pub use tel::TelAnchorSeal;pub use tel::TelEvent;pub use tel::TelState;pub use tel::Vcp;pub use tel::encode_nonce as encode_tel_nonce;pub use tel::to_wire_bytes as tel_to_wire_bytes;pub use tel::validate_tel;pub use tls_cert::AUTHS_KERI_BINDING_OID;pub use tls_cert::AuthsKeriBinding;pub use tls_cert::DID_KERI_SCHEME;pub use tls_cert::TlsCertError;pub use tls_cert::TlsKeyAuthorization;pub use tls_cert::TlsKeyAuthorizer;
Modules§
- acdc
- ACDC (Authentic Chained Data Container) credential type, SAID-ification, and the pinned v1 capability schema. ACDC (Authentic Chained Data Container) credential type for Auths.
- capability
- Validated capability identifiers — the atomic unit of authorization in Auths. Validated capability identifiers — the atomic unit of authorization in Auths.
- did_
webs did:websDID-document projection of a resolved KERI key-state.did:websDID-document projection of a resolved KERI key-state.- ipex
- IPEX — the Issuance & Presentation EXchange grant/admit
exnhandshake for handing over an ACDC credential between KERI controllers. IPEX — the Issuance & Presentation EXchange protocol. - kel_io
- KEL storage port traits for reading and writing Key Event Logs.
- ksn
- Key-State Notice (KSN) — signed snapshot of current key-state for thin clients. Key-State Notice (KSN) — a signed snapshot of an identity’s current key-state.
- messages
- Routed KERI message types (qry, rpy, pro, bar, xip, exn). Routed KERI message types: Query, Reply, Prod, Bare, Exchange Inception, Exchange.
- oobi
- Out-Of-Band Introduction (OOBI) — KERI discovery: resolve/serve AID endpoints. Out-Of-Band Introduction (OOBI) — KERI discovery.
- tel
- Backerless TEL (Transaction Event Log) credential-status events:
vcp/iss/rev. Backerless TEL (Transaction Event Log) events for Auths credential status. - tls_
cert - KEL-rooted X.509 leaf certificates — composing a KERI identity with TLS (did:keri SAN + KEL key-state binding extension, verified by replay). KEL-rooted X.509 leaf certificates — composing a KERI identity with TLS.
- witness
- Witness protocol types: receipts, providers, and error reporting for split-view defense.
Structs§
- Agent
Scope - Delegator-anchored scope/expiry for a delegated agent (Epic E.7).
- CesrKey
- A CESR-encoded public key (e.g.,
D+ base64url Ed25519,1AAI+ base64url P-256). - DipEvent
- Unified event enum for processing any KERI event type.
- DipEvent
Init - Parameter struct for
DipEvent::new. - DrtEvent
- Delegated rotation event — rotates keys for a delegated identity.
- DrtEvent
Init - Parameter struct for
DrtEvent::new. - Fraction
- Exact rational number for weighted threshold arithmetic.
- IcpEvent
- Inception event — creates a new KERI identity.
- IcpEvent
Init - Parameter struct for
IcpEvent::new. Mirrors the existing field set 1-for-1 so call-site migration is a mechanical prefix/ suffix wrap. Future wire-format additions land onIcpEventvia awith_*method, not by widening thisInitstruct — that’s what makes the pattern future-proof. - Indexed
Signature - A single indexed controller signature.
- IxnEvent
- Interaction event — anchors data without key rotation.
- KelPolicy
- Configurable policy for time-aware KEL validation. Defaults match the plan text: 24h minimum rotation interval, 60s clock-skew tolerance, no emergency-override identifier.
- KelSeal
Index - A precomputed index of a delegator KEL’s anchoring seals.
- Keri
Sequence - A KERI sequence number, stored internally as u64 and serialized as a hex string.
- Keri
Type Error - Error when constructing KERI newtypes with invalid values.
- KeyState
- Current key state derived from replaying a KEL.
- Prefix
- Strongly-typed KERI identifier prefix (e.g.,
"ETest123...","DKey456..."). - RotEvent
- Rotation event — rotates to pre-committed key.
- RotEvent
Init - Parameter struct for
RotEvent::new. SeeIcpEventInitfor the pattern rationale. - Said
- KERI Self-Addressing Identifier (SAID).
- Signed
Event - An event paired with its detached signature(s).
- Source
Seal - A delegate-side source seal — the parsed form of a CESR
-GSealSourceCouple. - Trusted
Kel - A KEL the caller asserts comes from a trusted source — the local identity
registry / a self-owned store, or a chain already authenticated via
validate_signed_kel. - Version
String - KERI v1.x version string:
KERI10JSON{hhhhhh}_(17 chars). - Wire
Signed Dip - A device-signed delegated inception serialized for a single wire field.
- Wire
Signed Rot - Single-string wire form of a signed rotation: base64url-no-pad of the
JSON
{event, attachment_b64}pair.
Enums§
- Anchor
Status - Three-state anchor verification result.
- Config
Trait - KERI configuration trait codes.
- Event
- Unified event enum for processing any KERI event type.
- Fraction
Error - Error when parsing a
Fractionfrom a string. - Keri
Decode Error - Errors from decoding a KERI-encoded public key.
- Keri
Public Key - A validated KERI public key supporting Ed25519 and P-256.
- Keri
Translation Error - Errors during translation between Auths events and CESR streams.
- Protocol
- The 17-character protocol/version tag families used by SAID-ification.
- Seal
- KERI seal — anchors external data in an event’s
afield. - TelError
- Errors raised while constructing, SAID-ifying, or validating a backerless TEL.
- Threshold
- KERI signing/backer threshold.
- Validation
Error - Errors specific to KEL validation.
- Witnessed
Replay - The outcome of replaying a KEL through the witness-receipt gate.
Constants§
- KERI_
VERSION_ PREFIX - KERI protocol version prefix string.
- SAID_
PLACEHOLDER - The 44-character
#placeholder injected into thedfield (andifield for inception events) before hashing. Matches the length of a CESR-qualified Blake3-256 digest (E+ 43 chars base64url = 44 chars).
Traits§
- Delegator
KelLookup - Validate a KEL and return the resulting KeyState.
Functions§
- compute_
event_ said - Compute the SAID for an event.
- compute_
next_ commitment - Compute the next-key commitment digest for pre-rotation.
- compute_
said - Computes a spec-compliant SAID for a KERI event (
KERI10JSONprotocol tag). - compute_
said_ with_ protocol - Computes a spec-compliant SAID for a SAID’d JSON object under a chosen protocol.
- compute_
section_ said - Computes the SAID of a nested SAID’d section that carries no version string.
- decode_
agent_ scope - Decode an agent-scope seal value into
(agent_prefix, AgentScope), orNoneif the value is not anagentscope:marker or any capability fails validation. Inverse ofencode_agent_scope. - decode_
signed_ dip - Decode a single-string wire form back into the dip and its attachment bytes.
Inverse of
encode_signed_dip. - decode_
signed_ rot - Decode a single-string wire form back into the rot and its attachment bytes.
Inverse of
encode_signed_rot. - encode_
agent_ scope - Encode an agent-scope seal value:
agentscope:{prefix}:{expires_or_0}:{caps_csv}. - encode_
signed_ dip - Encode a device-signed dip into its single-string wire form.
- encode_
signed_ rot - Encode a signed rot into its single-string wire form.
- finalize_
dip_ event - Create a delegated inception (
dip) event with a properly computed SAID. - finalize_
drt_ event - Create a delegated rotation (
drt) event with a properly computed SAID. - finalize_
icp_ event - Create an inception event with a properly computed SAID.
- finalize_
ixn_ event - Create an interaction event with a properly computed SAID.
- finalize_
rot_ event - Create a rotation event with a properly computed SAID.
- find_
seal_ in_ kel - Search for a seal with the given digest in any IXN event in the KEL.
- pair_
kel_ attachments - Pair an ordered KEL with its per-event CESR signature attachments,
producing the
SignedEvents an authenticated replay (validate_signed_kel) consumes. - parse_
attachment - Parse a CESR
-A##indexed-signature group into the constituentIndexedSignatures. - parse_
delegated_ attachment - Parse a delegated event’s combined attachment — the controller signature group
(
-A) followed by an optional source-seal group (-G). - parse_
kel_ json - Parse a KEL from a JSON string.
- parse_
source_ seal_ couples - Parse a CESR
-G##SealSourceCouplesgroup intoSourceSeals. - serialize_
attachment - Serialize a list of externalized signatures to CESR text-domain
-A##<siger1><siger2>…indexed-signature group bytes. - serialize_
for_ signing - Serialize a finalized event for signing.
- serialize_
source_ seal_ couples - Serialize source seals to a CESR text-domain
-G##<Seqner><Saider>…SealSourceCouplesgroup, byte-aligned with keripy 1.3.4. - state_
after_ event - Compute the key state after applying
eventon top ofcurrent_state. - validate_
delegation - Validate a delegated event against the delegator’s KEL.
- validate_
for_ append - Validate a single event for appending to a KEL with known state.
- validate_
signed_ event - Validate a signed event’s crypto (signatures + commitments) against key state.
- validate_
signed_ kel - Replay a KEL of signed events, verifying each event’s signature against the
key-state that authorizes it — the authenticated counterpart to the
structural-only [
validate_kel] (RT-002). - verify_
commitment - Verify that a public key satisfies a commitment.
- verify_
event_ crypto - Validate the cryptographic integrity of a single event against the current key state.
- verify_
event_ said - Verify an event’s SAID matches its content hash.
- verify_
said - Verifies that an event’s
dfield matches the spec-compliant SAID.