1use thiserror::Error;
4
5#[derive(Error, Debug)]
7pub enum Error {
8 #[error("IO error: {0}")]
10 Io(#[from] std::io::Error),
11
12 #[error("Invalid proof format: {0}")]
14 InvalidProof(String),
15
16 #[error("Hash mismatch: expected {expected}, got {actual}")]
18 HashMismatch { expected: String, actual: String },
19
20 #[error("Invalid hash format: {0}")]
22 InvalidHash(String),
23
24 #[error("Proof not yet confirmed")]
26 NotConfirmed,
27
28 #[error("Transaction not found: {0}")]
30 TxNotFound(String),
31
32 #[error("Network error: {0}")]
34 Network(String),
35}
36
37pub type Result<T> = std::result::Result<T, Error>;