use thiserror::Error;
#[derive(Debug, Error)]
pub enum ImportError {
#[error("Invalid format: {0}")]
InvalidFormat(String),
#[error("Invalid checksum")]
InvalidChecksum,
#[error("Invalid WIF: {0}")]
InvalidWif(String),
#[error("Invalid hex: {0}")]
InvalidHex(String),
#[error("Invalid mnemonic: {0}")]
InvalidMnemonic(String),
#[error("Invalid mini key: {0}")]
InvalidMiniKey(String),
#[error("Invalid BIP38: {0}")]
InvalidBip38(String),
#[error("Wrong password")]
WrongPassword,
#[error("Decryption failed: {0}")]
DecryptionFailed(String),
#[error("Key derivation failed: {0}")]
KeyDerivationFailed(String),
#[error("Unsupported format: {0}")]
UnsupportedFormat(String),
#[error("Private key out of range")]
KeyOutOfRange,
}
pub type Result<T> = std::result::Result<T, ImportError>;