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
51
52
53
54
55
56
57
58
//! Guardian Client
//!
//! A gRPC client library for interacting with the Guardian server,
//! providing secure off-chain state management for Miden accounts.
//!
//! # Overview
//!
//! This crate provides:
//! - [`GuardianClient`] - The main client for communicating with GUARDIAN servers
//! - [`Auth`] - Scheme-aware authentication providers for request signing
//! - [`keystore::Signer`] - The signing boundary for authenticated requests
//! - [`FalconKeyStore`] - The default in-memory Falcon signer
//! - [`EcdsaKeyStore`] - The default in-memory ECDSA signer
//! - Error types for handling GUARDIAN-related failures
//!
//! # Quick Start
//!
//! ```rust,no_run
//! use std::sync::Arc;
//!
//! use guardian_client::{FalconKeyStore, GuardianClient};
//! use miden_protocol::crypto::dsa::falcon512_poseidon2::SecretKey;
//!
//! #[tokio::main]
//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
//! // Connect to GUARDIAN server
//! let mut client = GuardianClient::connect("http://localhost:50051").await?;
//!
//! // Configure request signing
//! let secret_key = SecretKey::new();
//! let signer = Arc::new(FalconKeyStore::new(secret_key));
//! let client = client.with_signer(signer);
//!
//! Ok(())
//! }
//! ```
pub use ;
pub use ;
pub use ;
pub use GuardianClient;
pub use ;
pub use ;
pub use *;
pub use ;