trustless-protocol 0.2.3

Protocol utilities for trustless
Documentation
//! Protocol types, codec, handler trait, and client for the Trustless key provider protocol.
//!
//! This crate implements the communication protocol between the Trustless proxy and
//! key provider processes. Key providers hold TLS private keys and perform signing
//! operations on behalf of the proxy, communicating over stdin/stdout with
//! length-delimited JSON messages.
//!
//! # For key provider implementors
//!
//! Implement the [`handler::Handler`] trait and call [`handler::run`] to start
//! the event loop. See `trustless-provider-filesystem` for a complete example.
//!
//! # For proxy internals
//!
//! Use [`client::ProviderClient`] to communicate with a spawned provider process.

/// Base64-serializable byte types for use with [`secrecy::SecretBox`].
pub mod base64;
/// Async client for communicating with a key provider process.
pub mod client;
/// Length-delimited codec for framing and serializing messages.
pub mod codec;
/// Error types for protocol operations.
pub mod error;
/// Handler trait and event loop for implementing key providers.
pub mod handler;
/// Protocol message types (requests, responses, parameters, results).
pub mod message;
/// Signature scheme name parsing and algorithm mapping.
pub mod scheme;

/// Shared helpers for key provider implementations (cert loading, SAN extraction, signing).
///
/// Gated behind the `provider-helpers` feature flag.
#[cfg(feature = "provider-helpers")]
pub mod provider_helpers;