blueprint-runner 0.2.0-alpha.2

Runner for the Blueprint SDK
//! Errors that can occur within the Tangle protocol runner

/// Errors that can occur within the Tangle protocol runner
#[derive(Debug, thiserror::Error)]
pub enum TangleError {
    /// Attempted registration despite not being an active operator
    #[error("Not an active operator")]
    NotActiveOperator,

    /// Transport/RPC error
    #[error("Transport error: {0}")]
    Transport(String),

    /// Contract interaction error
    #[error("Contract error: {0}")]
    Contract(String),

    /// Unable to open/interact with the provided [`Keystore`](blueprint_keystore::Keystore)
    #[error("Keystore error: {0}")]
    Keystore(String),

    /// Unable to open/interact with the provided [`Keystore`](blueprint_keystore::Keystore)
    #[error("Keystore error: {0}")]
    KeystoreError(#[from] blueprint_keystore::Error),

    /// Unable to decompress the provided ECDSA key
    #[error("Unable to convert compressed ECDSA key to uncompressed key")]
    DecompressEcdsaKey,

    /// Not configured for Tangle
    #[error("Not configured for Tangle")]
    NotTangle,

    /// Missing required configuration
    #[error("Missing configuration: {0}")]
    MissingConfig(String),

    /// Transaction failed
    #[error("Transaction error: {0}")]
    Transaction(String),
}