use thiserror::Error;
#[derive(Error, Debug)]
pub enum ProverError {
#[error("Failed to generate witness: {0}")]
WitnessGeneration(String),
#[error("Failed to generate proof: {0}")]
ProofGeneration(String),
#[error("Proof verification failed: {0}")]
ProofVerification(String),
#[error("Invalid input: {0}")]
InvalidInput(String),
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("Serialization error: {0}")]
Serialization(#[from] serde_json::Error),
#[error("Circuit not found: {0}")]
CircuitNotFound(String),
#[error("Command execution failed: {0}")]
CommandFailed(String),
#[error("Insufficient balance: have {have}, need {need}")]
InsufficientBalance { have: u128, need: u128 },
#[error("Invalid Merkle proof")]
InvalidMerkleProof,
#[error("Circuit needs to be compiled first. Run: cd circuits && nargo compile")]
CircuitNotCompiled,
}