ubl_id/
lib.rs

1#![forbid(unsafe_code)]
2//! # ubl-id — Universal Business Ledger Identity Primitives
3//!
4//! The identity kernel for the UBL ecosystem. Provides:
5//! - **DIDs** (`did:ubl:*`, `did:key:*`) for entities (users, orgs, agents, apps, wallets)
6//! - **CIDs** (`cid:blake3:*`) for content-addressed data (chips, blueprints, proofs)
7//! - **Wallets** for ephemeral session keys with PoP (Proof-of-Possession) headers
8//!
9//! ## LLM-First Design
10//!
11//! Uses [`json_atomic`] for canonical JSON serialization, ensuring deterministic
12//! hashing across all platforms. When an LLM generates JSON, the server gets
13//! identical bytes → identical hash → zero-trust verification works.
14
15pub mod did;
16pub mod cid;
17pub mod wallet;
18pub mod pop;
19pub mod ident;
20
21#[cfg(feature = "resolve")]
22pub mod resolve;
23
24// Re-exports for convenience
25pub use did::{Did, DidMethod, DidType};
26pub use cid::Cid;
27pub use wallet::Wallet;
28pub use pop::{Pop, PopPayloadV1, PopError, build_pop_header, verify_pop};
29pub use ident::Ident;
30
31/// Re-export json_atomic for downstream canonical serialization
32pub use json_atomic;