1use anchor_lang::error_code;
2
3#[error_code]
4pub enum DidSolError {
5 #[msg("No VM with the given fragment exists")]
6 VmFragmentNotFound,
7 #[msg("Given VM fragment is already in use")]
8 VmFragmentAlreadyInUse,
9 #[msg("Cannot add a verification method with OwnershipProof flag")]
10 VmOwnershipOnAdd,
11 #[msg("Removing the last verification method would lead to a lockout")]
12 VmCannotRemoveLastAuthority,
13 #[msg("Service already exists in current service list")]
14 ServiceFragmentAlreadyInUse, #[msg("Service doesn't exists in current service list")]
16 ServiceFragmentNotFound,
17 #[msg("Invalid other controllers. Invalid DID format or did:sol:<did>")]
18 InvalidOtherControllers,
19 #[msg("Invalid native controllers. Cannot set itself as a controller")]
20 InvalidNativeControllers,
21 #[msg("Initial Account size is insufficient for serialization")]
22 InsufficientInitialSize,
23 #[msg("Could not convert between data types")]
24 ConversionError,
25 #[msg("Invalid chain of controlling DidAccounts")]
26 InvalidControllerChain,
27 #[msg("An error occurred while validating Secp256k1 signature")]
28 ErrorValidatingSecp256k1Signature,
29 #[msg("Wrong Authority for given DID")]
30 WrongAuthorityForDid,
31}