#[derive(Debug, thiserror::Error)]
pub enum Error {
#[error("error inserting key")]
KeyInsertionError,
#[error("key type unsupported")]
UnsupportedKeyType,
#[error("key type wrong")]
WrongKeyType,
#[error("key size incorrect")]
WrongKeyLength,
#[error("key not found")]
KeyNotFound,
#[error("incorrect content type")]
ContentTypeIncorrect,
#[error("content with id {0} not found in the wallet")]
ContentNotFound(String),
#[error("Box is to small")]
BoxToSmall,
#[error("failed to add Key Pair")]
KeyPairAddFailed,
#[error("cryptography failure in aead: {0}")]
AeadCryptoError(aead::Error),
#[error(transparent)]
EcdsaCryptoError(#[from] k256::ecdsa::Error),
#[error("cryptography failure in ed25519: {0}")]
EdCryptoError(ed25519_dalek::ed25519::Error),
#[error("cryptography failure in BBS/BLS module: {0}")]
BlsCryptoError(String),
#[error(transparent)]
Serde(#[from] serde_json::error::Error),
#[error(transparent)]
Utf8(#[from] std::str::Utf8Error),
#[error(transparent)]
Base64DecodeError(#[from] base64::DecodeError),
#[error(transparent)]
Other(#[from] Box<dyn std::error::Error>),
#[cfg(feature = "didcomm")]
#[error(transparent)]
DidcommError(#[from] didcomm_rs::Error),
}