tonlib_core/wallet/
error.rs1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum MnemonicError {
5 #[error("Invalid mnemonic word count (count: {0})")]
6 UnexpectedWordCount(usize),
7
8 #[error("Invalid mnemonic word (word: {0})")]
9 InvalidWord(String),
10
11 #[error("Invalid mnemonic with password (first byte: {0:#X})")]
12 InvalidFirstByte(u8),
13
14 #[error("Invalid passwordless mnemonic (first byte: {0:#X})")]
15 InvalidPasswordlessMenmonicFirstByte(u8),
16
17 #[error("Invalid password (hash: {0})")]
18 PasswordHashError(pbkdf2::password_hash::Error),
19
20 #[error("Invalid length of sha digest (length: {0})")]
21 ShaDigestLengthInvalid(#[from] sha2::digest::InvalidLength),
22}