kobe_evm/error.rs
1//! Error types for Ethereum wallet operations.
2
3#[cfg(feature = "alloc")]
4use alloc::string::String;
5
6/// Errors that can occur during Ethereum wallet operations.
7#[derive(Debug, Clone, PartialEq, Eq, thiserror::Error)]
8#[non_exhaustive]
9pub enum Error {
10 /// Invalid private key format or value.
11 #[error("invalid private key")]
12 InvalidPrivateKey,
13
14 /// Invalid hex string format.
15 #[error("invalid hex string")]
16 InvalidHex,
17
18 /// Key derivation error with details.
19 #[cfg(feature = "alloc")]
20 #[error("key derivation error: {0}")]
21 Derivation(String),
22
23 /// Invalid derivation path.
24 #[cfg(feature = "alloc")]
25 #[error("invalid derivation path: {0}")]
26 InvalidPath(String),
27}