core_identity/
error.rs

1use thiserror::Error;
2
3/// Specific errors for cryptographic identity operations
4#[derive(Error, Debug)]
5pub enum IdentityError {
6    #[error("Error generating identity: {0}")]
7    Generation(String),
8
9    #[error("Invalid signature")]
10    InvalidSignature,
11
12    #[error("Invalid public key")]
13    InvalidPublicKey,
14
15    #[error("Invalid key: {0}")]
16    InvalidKey(String),
17}
18/// Specific Result type for identity operations
19pub type Result<T> = std::result::Result<T, IdentityError>;