1pub mod agent;
57pub mod agent_card;
58pub mod constants;
59pub mod ed25519_agent;
60pub mod registration;
61pub mod registration_flow;
62pub mod verifier;
63
64#[cfg(feature = "axum")]
65pub mod middleware;
66
67pub use agent::{AgentInfo, SelfAgent, SelfAgentConfig};
69pub use agent_card::{
70 AgentSkill, CardCredentials, SelfProtocolExtension, TrustModel,
71 AgentInterface, A2ACapabilities, A2AProvider,
72 SecurityScheme, JwsSignature, AgentExtension,
73 Erc8004Service, Erc8004Registration, Erc8004AgentDocument,
74 A2AOptions, GenerateRegistrationJsonOptions,
75 get_provider_label, get_strength_color, generate_registration_json,
76};
77
78pub use constants::{headers, NetworkName};
79pub use ed25519_agent::{Ed25519Agent, Ed25519AgentConfig};
80pub use registration::{
81 RegistrationDisclosures, SignatureParts, SignedRegistrationChallenge,
82 build_advanced_deregister_user_data_ascii, build_advanced_register_user_data_ascii,
83 build_simple_deregister_user_data_ascii, build_simple_register_user_data_ascii,
84 build_wallet_free_register_user_data_ascii, compute_registration_challenge_hash,
85 get_registration_config_index, sign_registration_challenge,
86};
87pub use registration_flow::{
88 DeregistrationRequest, DeregistrationSession, ProofRefreshRequest, ProofRefreshResult,
89 RefreshSession, RegistrationError, RegistrationRequest, RegistrationResult,
90 RegistrationSession, request_proof_refresh,
91};
92pub use verifier::{
93 AgentCredentials, RateLimitConfig, SelfAgentVerifier, VerificationResult, VerifierBuilder,
94 VerifierConfig, VerifierFromConfig,
95};
96
97#[cfg(feature = "axum")]
98pub use middleware::{self_agent_auth, VerifiedAgent};
99
100#[derive(Debug, thiserror::Error)]
102pub enum Error {
103 #[error("invalid private key")]
104 InvalidPrivateKey,
105 #[error("invalid RPC URL")]
106 InvalidRpcUrl,
107 #[error("invalid signature")]
108 InvalidSignature,
109 #[error("signing error: {0}")]
110 SigningError(String),
111 #[error("RPC error: {0}")]
112 RpcError(String),
113 #[error("HTTP error: {0}")]
114 HttpError(String),
115}