alloy_signer_local/
error.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use alloy_primitives::hex;
use k256::ecdsa;
use thiserror::Error;

/// Error thrown by [`LocalSigner`](crate::LocalSigner).
#[derive(Debug, Error)]
pub enum LocalSignerError {
    /// [`ecdsa`] error.
    #[error(transparent)]
    EcdsaError(#[from] ecdsa::Error),
    /// [`hex`](mod@hex) error.
    #[error(transparent)]
    HexError(#[from] hex::FromHexError),
    /// [`std::io`] error.
    #[error(transparent)]
    IoError(#[from] std::io::Error),

    /// [`coins_bip32`] error.
    #[error(transparent)]
    #[cfg(feature = "mnemonic")]
    Bip32Error(#[from] coins_bip32::Bip32Error),
    /// [`coins_bip39`] error.
    #[error(transparent)]
    #[cfg(feature = "mnemonic")]
    Bip39Error(#[from] coins_bip39::MnemonicError),
    /// [`MnemonicBuilder`](super::mnemonic::MnemonicBuilder) error.
    #[error(transparent)]
    #[cfg(feature = "mnemonic")]
    MnemonicBuilderError(#[from] super::mnemonic::MnemonicBuilderError),

    /// [`eth_keystore`] error.
    #[cfg(feature = "keystore")]
    #[error(transparent)]
    EthKeystoreError(#[from] eth_keystore::KeystoreError),
}