//! VISION钱包错误类型 use thiserror::Error; /// VISION钱包错误类型 #[derive(Error, Debug)] pub enum VisionError { #[error("账户错误: {0}")] AccountError(String), #[error("交易错误: {0}")] TransactionError(String), #[error("宪法收据错误: {0}")] ConstitutionalReceiptError(String), #[error("GNACS解析错误: {0}")] GnacsParseError(String), #[error("AI助手错误: {0}")] AiAssistantError(String), #[error("安全错误: {0}")] SecurityError(String), #[error("网络错误: {0}")] NetworkError(String), #[error("序列化错误: {0}")] SerializationError(#[from] serde_json::Error), #[error("IO错误: {0}")] IoError(#[from] std::io::Error), #[error("钱包核心错误: {0}")] WalletCoreError(String), #[error("其他错误: {0}")] Other(String), } /// VISION钱包结果类型 pub type Result = std::result::Result;