herolib_sid/
lib.rs

1//! SmartID (SID) - Distributed, Human-Readable Identifiers
2//!
3//! SmartID provides short, human-readable identifiers for distributed systems.
4//! This module is used internally by the Context module for ID generation.
5//!
6//! # Design Targets
7//!
8//! - Human-friendly (chat, voice, memory)
9//! - Deterministic & auditable
10//! - Collision-free
11//! - Offline-capable
12//! - Scalable (up to 999 contributors)
13//!
14//! # Alphabet
15//!
16//! Base-36: `0123456789abcdefghijklmnopqrstuvwxyz`
17//!
18//! # Formula
19//!
20//! ```text
21//! global_id = local_counter * num_contributors + contributor_id + 1
22//! ```
23
24pub mod base36;
25mod contributor;
26mod error;
27mod smartid;
28
29pub use contributor::MAX_CONTRIBUTORS;
30pub use error::{Result, SidError};
31pub use smartid::SmartId;