gadget_sdk/keystore/
error.rsuse alloc::string::String;
#[derive(Debug, thiserror::Error)]
#[non_exhaustive]
pub enum Error {
#[error(transparent)]
#[cfg(feature = "std")]
Io(#[from] std::io::Error),
#[error("sr25519: {0}")]
Sr25519(String),
#[error("ecdsa: {0}")]
Ecdsa(String),
#[error("ed25519: {0}")]
Ed25519(String),
#[error("bls381: {0}")]
Bls(String),
#[error("bls_bn254: {0}")]
BlsBn254(String),
#[error("alloy_ecdsa: {0}")]
Alloy(String),
}
impl From<ed25519_zebra::Error> for Error {
fn from(v: ed25519_zebra::Error) -> Self {
Self::Ed25519(v.to_string())
}
}
impl From<schnorrkel::errors::SignatureError> for Error {
fn from(v: schnorrkel::errors::SignatureError) -> Self {
Self::Sr25519(v.to_string())
}
}