1use thiserror::Error;
4
5pub type Result<T> = core::result::Result<T, RootError>;
7
8#[derive(Debug, Clone, PartialEq, Eq, Error)]
11pub enum RootError {
12 #[error("ceremony configuration rejected: {reason}")]
14 InvalidConfig { reason: String },
15
16 #[error("canonical encoding failed: {detail}")]
18 CanonicalEncoding { detail: String },
19
20 #[error("frost operation failed: {detail}")]
22 Frost { detail: String },
23
24 #[error("threshold not met: required {required}, supplied {supplied}")]
26 ThresholdNotMet { required: u16, supplied: u16 },
27
28 #[error("signature verification failed: {reason}")]
30 SignatureRejected { reason: String },
31
32 #[error("root bundle rejected: {reason}")]
34 BundleRejected { reason: String },
35
36 #[error("portal envelope rejected: {reason}")]
38 PortalRejected { reason: String },
39
40 #[error("share protection failed: {reason}")]
42 ProtectionFailed { reason: String },
43}