1use thiserror::Error;
6
7#[derive(Error, Copy, Clone, Debug, PartialEq, Eq, Ord, PartialOrd)]
9pub enum Error {
10 #[error("Threshold cannot be less than 2")]
12 SharingMinThreshold,
13 #[error("Limit is less than threshold")]
15 SharingLimitLessThanThreshold,
16 #[error("An invalid share detected")]
18 SharingInvalidIdentifier,
19 #[error("Duplicate share detected")]
21 SharingDuplicateIdentifier,
22 #[error("The maximum number of shares to be made when splitting was reached")]
24 SharingMaxRequest,
25 #[error("An invalid share was supplied for verification or combine")]
27 InvalidShare,
28 #[error("An invalid secret was supplied for split")]
30 InvalidSecret,
31 #[error("A share cannot be converted to a group or field element")]
33 InvalidShareConversion,
34 #[error("Not implemented")]
36 NotImplemented,
37}
38
39pub type VsssResult<T> = anyhow::Result<T, Error>;