2025-08-12 22:35:07 -03:00
|
|
|
use std::io;
|
|
|
|
|
|
2025-08-09 19:49:07 -03:00
|
|
|
use thiserror::Error;
|
|
|
|
|
|
|
|
|
|
#[derive(Error, Debug)]
|
|
|
|
|
pub enum NssaError {
|
|
|
|
|
#[error("Invalid input: {0}")]
|
|
|
|
|
InvalidInput(String),
|
|
|
|
|
|
|
|
|
|
#[error("Risc0 error: {0}")]
|
|
|
|
|
ProgramExecutionFailed(String),
|
|
|
|
|
|
|
|
|
|
#[error("Program violated execution rules")]
|
|
|
|
|
InvalidProgramBehavior,
|
2025-08-10 18:51:55 -03:00
|
|
|
|
|
|
|
|
#[error("Serialization error: {0}")]
|
2025-08-11 12:07:30 -03:00
|
|
|
InstructionSerializationError(String),
|
2025-08-11 19:14:12 -03:00
|
|
|
|
|
|
|
|
#[error("Invalid private key")]
|
|
|
|
|
InvalidPrivateKey,
|
2025-08-12 22:35:07 -03:00
|
|
|
|
|
|
|
|
#[error("IO error: {0}")]
|
|
|
|
|
Io(#[from] io::Error),
|
2025-08-13 01:33:11 -03:00
|
|
|
|
|
|
|
|
#[error("Invalid Public Key")]
|
|
|
|
|
InvalidPublicKey,
|
2025-08-09 19:49:07 -03:00
|
|
|
}
|