veilocity_prover/
error.rs1use thiserror::Error;
4
5#[derive(Error, Debug)]
7pub enum ProverError {
8 #[error("Failed to generate witness: {0}")]
10 WitnessGeneration(String),
11
12 #[error("Failed to generate proof: {0}")]
14 ProofGeneration(String),
15
16 #[error("Proof verification failed: {0}")]
18 ProofVerification(String),
19
20 #[error("Invalid input: {0}")]
22 InvalidInput(String),
23
24 #[error("IO error: {0}")]
26 Io(#[from] std::io::Error),
27
28 #[error("Serialization error: {0}")]
30 Serialization(#[from] serde_json::Error),
31
32 #[error("Circuit not found: {0}")]
34 CircuitNotFound(String),
35
36 #[error("Command execution failed: {0}")]
38 CommandFailed(String),
39
40 #[error("Insufficient balance: have {have}, need {need}")]
42 InsufficientBalance { have: u128, need: u128 },
43
44 #[error("Invalid Merkle proof")]
46 InvalidMerkleProof,
47
48 #[error("Circuit needs to be compiled first. Run: cd circuits && nargo compile")]
50 CircuitNotCompiled,
51}