use thiserror::Error;
use zks_wire::WireError;
pub type Result<T> = std::result::Result<T, SdkError>;
#[derive(Error, Debug)]
pub enum SdkError {
#[error("Invalid URL: {0}")]
InvalidUrl(String),
#[error("Connection failed: {0}")]
ConnectionFailed(String),
#[error("Handshake failed: {0}")]
HandshakeFailed(String),
#[error("Network error: {0}")]
NetworkError(String),
#[error("Protocol error: {0}")]
ProtocolError(#[from] zks_proto::ProtoError),
#[error("Cryptographic error: {0}")]
CryptoError(String),
#[error("Post-quantum crypto error: {0}")]
PqcError(#[from] zks_pqcrypto::PqcError),
#[error("IO error: {0}")]
IoError(#[from] std::io::Error),
#[error("Wire protocol error: {0}")]
WireError(#[from] WireError),
#[error("Serialization error: {0}")]
SerializationError(String),
#[error("Operation timed out")]
Timeout,
#[error("Not connected to peer")]
NotConnected,
#[error("Invalid connection state")]
InvalidState,
#[error("Not implemented")]
NotImplemented,
#[error("Invalid input: {0}")]
InvalidInput(String),
}