wallet_adapter_common/
errors.rs1pub type WalletUtilsResult<T> = Result<T, WalletUtilsError>;
3
4#[derive(Debug, PartialEq, Eq, Clone, thiserror::Error)]
6pub enum WalletUtilsError {
7 #[error("SystemTime::checked_add(expiration_time_milliseconds) overflow")]
9 SystemTimeCheckedAddOverflow,
10 #[error("This token expires earlier than it was issued. Make sure to set the expiry time to be a later date than the issued time")]
12 ExpiryTimeEarlierThanIssuedTime,
13 #[error("The expiration time is set to expire in the past")]
15 ExpirationTimeIsInThePast,
16 #[error("This token becomes valid earlier than it was issued. Make sure to set the not_before time to be equal to or a later date than the issued time")]
18 NotBeforeTimeEarlierThanIssuedTime,
19 #[error("NotBefore time is set in the past")]
21 NotBeforeTimeIsInThePast,
22 #[error("This token becomes valid after it has already expired. Make sure to set the not_before time to be equal to or a date before expiry time")]
24 NotBeforeTimeLaterThanExpirationTime,
25 #[error("Invalid ISO 8601 timestamp `{0}. Only timestamps in the format specified by ISO8601 are supported.")]
27 InvalidISO8601Timestamp(String),
28 #[error("Invalid Base58 Address")]
30 InvalidBase58Address,
31 #[error("The bytes provided for the Ed25519 Public Key are invalid")]
33 InvalidEd25519PublicKeyBytes,
34 #[error("The Ed25519 Signature is invalid for the signed message and public key")]
36 InvalidSignature,
37 #[error("The byte length should be equal to 64 bytes in length")]
39 Expected64ByteLength,
40 #[error("The byte length should be equal to 32 bytes in length")]
42 Expected32ByteLength,
43 #[error("The nonce is required to be at least 8 characters long")]
45 NonceMustBeAtLeast8Characters,
46 #[error("The message signed by the wallet is not the same as the message sent to the wallet for signing")]
48 MessageResponseMismatch,
49}