wasi_sol/core/
error.rs

1use serde::{Deserialize, Serialize};
2use thiserror::Error;
3
4#[derive(Error, Debug, Serialize, Deserialize)]
5pub enum WalletError {
6    #[error("Wallet not connected")]
7    WalletNotConnectedError,
8    #[error("Wallet not ready")]
9    WalletNotReadyError,
10    #[error("Failed to load wallet")]
11    WalletLoadError,
12    #[error("Wallet configuration error")]
13    WalletConfigError,
14    #[error("Failed to connect to wallet")]
15    WalletConnectionError,
16    #[error("Wallet disconnected")]
17    WalletDisconnectedError,
18    #[error("Failed to disconnect wallet")]
19    WalletDisconnectionError,
20    #[error("Wallet account error")]
21    WalletAccountError,
22    #[error("Invalid public key")]
23    WalletPublicKeyError,
24    #[error("Failed to send transaction")]
25    WalletSendTransactionError,
26    #[error("Failed to sign transaction")]
27    WalletSignTransactionError,
28    #[error("Failed to sign message")]
29    WalletSignMessageError,
30    #[error("Failed to sign in")]
31    WalletSignInError,
32    #[error("Wallet operation timed out")]
33    WalletTimeoutError,
34    #[error("Wallet window blocked")]
35    WalletWindowBlockedError,
36    #[error("Wallet window closed")]
37    WalletWindowClosedError,
38}
39
40pub type Result<T> = std::result::Result<T, WalletError>;