//! 错误类型定义 use thiserror::Error; /// 上链错误类型 #[derive(Error, Debug)] pub enum OnboardingError { #[error("状态转换错误: {0}")] StateTransitionError(String), #[error("合规审批失败: {0}")] ComplianceError(String), #[error("估值失败: {0}")] ValuationError(String), #[error("DNA生成失败: {0}")] DNAGenerationError(String), #[error("托管失败: {0}")] CustodyError(String), #[error("XTZH铸造失败: {0}")] XTZHMintingError(String), #[error("代币发行失败: {0}")] TokenIssuanceError(String), #[error("区块链集成失败: {0}")] BlockchainIntegrationError(String), #[error("流程不存在: {0}")] ProcessNotFound(String), #[error("无效的参数: {0}")] InvalidParameter(String), #[error("内部错误: {0}")] InternalError(String), #[error(transparent)] Other(#[from] anyhow::Error), } /// Result类型别名 pub type Result = std::result::Result;