use thiserror::Error;
#[derive(Error, Debug)]
pub enum Error {
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("Invalid proof format: {0}")]
InvalidProof(String),
#[error("Hash mismatch: expected {expected}, got {actual}")]
HashMismatch { expected: String, actual: String },
#[error("Invalid hash format: {0}")]
InvalidHash(String),
#[error("Proof not yet confirmed")]
NotConfirmed,
#[error("Transaction not found: {0}")]
TxNotFound(String),
#[error("Network error: {0}")]
Network(String),
}
pub type Result<T> = std::result::Result<T, Error>;