#[derive(Clone, PartialEq, Debug)]
#[cfg_attr(feature = "thiserror", derive(thiserror::Error))]
#[repr(u8)]
pub enum Error {
#[cfg_attr(feature = "thiserror", error("Invalid argument length"))]
InvalidLength = 0x00,
#[cfg_attr(feature = "thiserror", error("Unexpected event"))]
UnexpectedEvent = 0x01,
#[cfg_attr(feature = "thiserror", error("Too many ring entries"))]
RingFull = 0x02,
#[cfg_attr(feature = "thiserror", error("Signing error"))]
SignError = 0x03,
#[cfg_attr(feature = "thiserror", error("blinding values missing"))]
MissingBlindings = 0x04,
#[cfg_attr(feature = "thiserror", error("invalid ristretto key"))]
InvalidKey = 0x05,
#[cfg_attr(feature = "thiserror", error("onetime_private_key missing"))]
MissingOnetimePrivateKey = 0x06,
#[cfg_attr(feature = "thiserror", error("failed to recover onetime_private_key"))]
OnetimeKeyRecoveryFailed = 0x07,
#[cfg_attr(feature = "thiserror", error("failed to start ring signing"))]
RingInitFailed = 0x08,
#[cfg_attr(feature = "thiserror", error("failed to update ring"))]
RingUpdateFailed = 0x09,
#[cfg_attr(feature = "thiserror", error("invalid engine state"))]
InvalidState = 0x0a,
#[cfg_attr(feature = "thiserror", error("message encoding failed"))]
EncodingFailed = 0x0b,
#[cfg_attr(feature = "thiserror", error("pending user approval"))]
ApprovalPending = 0x0c,
#[cfg_attr(feature = "thiserror", error("failed to start summary computation"))]
SummaryInitFailed = 0x0d,
#[cfg_attr(feature = "thiserror", error("missing summary output"))]
SummaryMissingOutput = 0x0e,
#[cfg_attr(feature = "thiserror", error("identity request rejected"))]
IdentRejected = 0x0f,
#[cfg_attr(feature = "thiserror", error("unknown"))]
Unknown = 0xf0,
}