1use ssi_verification_methods::InvalidVerificationMethod;
2
3use crate::BlockchainAccountIdError;
4
5#[derive(thiserror::Error, Debug)]
6pub enum Error {
7 #[error(transparent)]
8 JWS(#[from] ssi_jws::Error),
9 #[error(transparent)]
10 DID(#[from] ssi_dids_core::resolution::DerefError),
11 #[error(transparent)]
12 Ipld(#[from] libipld::error::Error),
13 #[error("Verification method mismatch")]
14 VerificationMethodMismatch,
15 #[error(transparent)]
16 InvalidVerificationMethod(#[from] InvalidVerificationMethod),
17 #[error("Missing verification method public key")]
18 MissingPublicKey,
19 #[error("Invalid verification method blockchain account id: {0}")]
20 BlockchainAccountId(#[from] BlockchainAccountIdError),
21 #[error("Missing UCAN field, expected: '{0}'")]
22 MissingUCANHeaderField(&'static str),
23 #[error("Invalid DID URL")]
24 DIDURL,
25 #[error(transparent)]
26 Json(#[from] serde_json::Error),
27 #[error(transparent)]
28 Caip10Parse(#[from] ssi_caips::caip10::BlockchainAccountIdParseError),
29 #[error(transparent)]
30 Caip10Verify(#[from] ssi_caips::caip10::BlockchainAccountIdVerifyError),
31}