auths_sdk/lib.rs
1// crate-level allow during curve-agnostic refactor.
2#![allow(clippy::disallowed_methods)]
3#![warn(clippy::too_many_lines, clippy::cognitive_complexity)]
4#![warn(missing_docs)]
5//! # auths-sdk
6//!
7//! Application services layer for Auths identity operations.
8//!
9//! This crate provides high-level orchestration functions for identity management,
10//! device linking, platform verification, and registry operations. It sits between
11//! the CLI (I/O adapter) and the domain crates (`auths-core`, `auths-id`).
12//!
13//! ## Architecture
14//!
15//! ```text
16//! auths-cli → auths-sdk → auths-core + auths-id
17//! (I/O adapter) (orchestration) (domain)
18//! ```
19//!
20//! SDK functions accept typed configs and return structured `Result` types.
21//! They never prompt for input, print to stdout, or call `process::exit()`.
22
23// ── Re-export modules: types from auths-core, auths-id, auths-storage ──
24// These allow CLI and API consumers to import through auths-sdk instead of
25// depending on lower-layer crates directly.
26
27/// Re-exports of agent process types from `auths-core`.
28pub mod agent_core;
29/// Re-exports of attestation operations from `auths-id`.
30pub mod attestation;
31/// Re-exports of configuration types from `auths-core`.
32pub mod core_config;
33/// Re-exports of cryptographic utilities from `auths-core`.
34pub mod crypto;
35/// Re-exports of FFI types from `auths-core`.
36pub mod ffi;
37/// Re-exports of freeze types from `auths-id`.
38pub mod freeze;
39/// Re-exports of identity types and operations from `auths-id`.
40pub mod identity;
41/// Re-exports of KERI cache module from `auths-id`.
42pub mod keri;
43/// Re-exports of keychain and key storage types from `auths-core`.
44pub mod keychain;
45/// Re-exports of path utilities from `auths-core`.
46pub mod paths;
47/// Re-exports of Git storage backend types from `auths-storage`.
48pub mod storage;
49/// Re-exports of storage layout types from `auths-id`.
50pub mod storage_layout;
51/// Re-exports of trust and pinned identity types from `auths-core`.
52pub mod trust;
53/// Re-exports of verification helpers from `auths-verifier`.
54pub mod verify;
55/// Re-exports of witness server and config types.
56pub mod witness;
57
58// ── SDK modules ──
59
60/// Audit event emission convenience for SDK operations.
61pub mod audit;
62/// Runtime dependency container (`AuthsContext`) for injecting infrastructure adapters.
63pub mod context;
64/// Device linking, revocation, and authorization extension operations.
65pub mod device;
66/// Domain services for specialized business logic.
67pub mod domains;
68/// Domain error types for all SDK operations.
69pub mod error;
70/// Key import and management operations.
71pub mod keys;
72/// Namespace verifier adapter registry mapping ecosystems to implementations.
73pub mod namespace_registry;
74/// OIDC JWT ID (jti) registry for token replay detection.
75pub mod oidc_jti_registry;
76/// Device pairing orchestration over ephemeral ECDH sessions.
77pub mod pairing;
78/// Platform identity claim creation and verification.
79pub mod platform;
80/// Port traits for external I/O adapters (artifact, git, diagnostics).
81pub mod ports;
82/// HTML and structured report rendering.
83pub mod presentation;
84/// Remote registry publication for public DID discovery.
85pub mod registration;
86/// Return types for SDK workflow functions.
87pub mod result;
88/// Identity provisioning for developer, CI, and agent environments.
89pub mod setup;
90/// Artifact signing pipeline and attestation creation.
91pub mod signing;
92/// Plain-old-data config structs for all SDK workflows.
93pub mod types;
94/// Higher-level identity workflows (rotation, provisioning, auditing).
95pub mod workflows;
96
97/// Test utilities for auths-sdk consumers (behind `test-utils` feature).
98#[cfg(any(test, feature = "test-utils"))]
99pub mod testing;
100
101pub use context::AuthsContext;
102pub use context::EventSink;
103
104// Re-export types and errors from domains for ease of access
105pub use domains::auth::error::*;
106pub use domains::compliance::error::*;
107pub use domains::device::error::*;
108pub use domains::device::types::*;
109pub use domains::diagnostics::types::*;
110pub use domains::identity::error::*;
111pub use domains::identity::types::*;
112pub use domains::org::error::*;
113pub use domains::signing::types::*;