use thiserror::Error;
pub type Result<T> = std::result::Result<T, ReceiptError>;
#[derive(Debug, Error)]
pub enum ReceiptError {
#[error("Signature verification failed")]
InvalidSignature,
#[error("Chain verification failed: {0}")]
InvalidChain(String),
#[error("Serialization error: {0}")]
Serialization(#[from] serde_json::Error),
#[error("Invalid receipt: {0}")]
InvalidReceipt(String),
#[error("Cryptographic error: {0}")]
Crypto(String),
#[error("Hash mismatch: expected {expected}, got {actual}")]
HashMismatch {
expected: String,
actual: String,
},
}