use thiserror::Error;
#[derive(Debug, Clone, PartialEq, Eq, Error)]
pub enum EvidenceError {
#[error("chain read failed: {0}")]
Chain(String),
#[error("launcher coin (store_id) not found on chain")]
LauncherNotFound,
#[error("coin at store_id is not a singleton launcher")]
NotALauncher,
#[error("no singleton lineage for store_id")]
NoLineage,
#[error("generation root is not committed by any coin in the store lineage")]
RootNotCommitted,
#[error("store lineage walk exceeded the maximum depth")]
LineageTooDeep,
#[error("merkle inclusion proof does not fold to the claimed root")]
ProofDoesNotFold,
#[error("range-inclusion root and chain-anchored root disagree")]
RootMismatch,
}
pub type EvidenceResult<T> = Result<T, EvidenceError>;