cashu/nuts/nut10/
error.rs1use thiserror::Error;
4
5use crate::nuts::{nut01, nut11, nut14};
6use crate::util::hex;
7
8#[derive(Debug, Error)]
10pub enum Error {
11 #[error("Kind not found")]
13 KindNotFound,
14 #[error("Tag value not found")]
16 TagValueNotFound,
17 #[error("Incorrect secret kind")]
19 IncorrectSecretKind,
20 #[error("Spend conditions are not met")]
22 SpendConditionsNotMet,
23 #[error("proof does not contain enough proofs to be spendable")]
25 NotEnoughSignatures,
26
27 #[error(transparent)]
29 HexError(#[from] hex::Error),
30 #[error(transparent)]
32 ParseInt(#[from] std::num::ParseIntError),
33 #[error(transparent)]
35 SerdeJsonError(#[from] serde_json::Error),
36 #[error(transparent)]
38 Secret(#[from] crate::secret::Error),
39
40 #[error(transparent)]
42 NUT01(#[from] nut01::Error),
43 #[error(transparent)]
45 NUT11(#[from] nut11::Error),
46 #[error(transparent)]
48 NUT14(#[from] nut14::Error),
49}