1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//! CLASP Entity Registry
//!
//! Persistent identity for devices, users, services, and routers in the CLASP network.
//! Each entity has an Ed25519 keypair and a stable ID derived from its public key.
//!
//! # Entity ID Format
//! ```text
//! clasp:<base58-ed25519-pubkey-prefix>
//! ```
//!
//! # Token Format
//! ```text
//! ent_<base64url(msgpack(entity_id + timestamp + ed25519_signature))>
//! ```
//!
//! # Storage Backends
//! - `MemoryEntityStore` -- default, no deps, for dev/testing
//! - `SqliteEntityStore` -- feature-gated behind `sqlite`, single file, WAL mode
//!
//! # Integration
//!
//! `EntityValidator` implements `clasp_core::TokenValidator` and plugs into the existing
//! `ValidatorChain`. Existing `cpsk_` tokens continue working unchanged.
//!
//! ```rust,no_run
//! use std::sync::Arc;
//! use clasp_core::ValidatorChain;
//! use clasp_registry::{EntityValidator, MemoryEntityStore};
//!
//! let store = Arc::new(MemoryEntityStore::new());
//! let chain = ValidatorChain::new()
//! .with(clasp_core::CpskValidator::new())
//! .with(EntityValidator::new(store));
//! ```
pub use ;
pub use ;
pub use SqliteEntityStore;
pub use ;
pub use ;
pub use EntityValidator;