pub enum WalletError {
Protocol {
code: u8,
message: String,
},
InvalidParameter(String),
NotImplemented(String),
Internal(String),
InsufficientFunds(String),
ReviewActions(String),
InvalidHmac,
InvalidSignature,
}Expand description
Unified error type for all wallet operations.
Variants§
Protocol
Protocol-level error with a numeric code and message.
InvalidParameter(String)
Invalid parameter supplied to a wallet operation.
NotImplemented(String)
Requested functionality is not yet implemented.
Internal(String)
Internal error wrapping lower-level failures.
InsufficientFunds(String)
Insufficient funds for the requested action.
Matches TS SDK WERR_INSUFFICIENT_FUNDS.
ReviewActions(String)
User must review and approve pending actions.
Matches TS SDK WERR_REVIEW_ACTIONS.
InvalidHmac
HMAC verification failed. Matches TS SDK behavior which throws on invalid HMAC rather than returning false.
InvalidSignature
Signature verification failed. Matches TS SDK behavior which throws on invalid signature rather than returning false.
Trait Implementations§
Source§impl Debug for WalletError
impl Debug for WalletError
Source§impl Display for WalletError
impl Display for WalletError
Source§impl Error for WalletError
impl Error for WalletError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<Error> for WalletError
impl From<Error> for WalletError
Source§impl From<PrimitivesError> for WalletError
impl From<PrimitivesError> for WalletError
Source§fn from(e: PrimitivesError) -> Self
fn from(e: PrimitivesError) -> Self
Converts to this type from the input type.
Source§impl From<ScriptError> for WalletError
impl From<ScriptError> for WalletError
Source§fn from(e: ScriptError) -> Self
fn from(e: ScriptError) -> Self
Converts to this type from the input type.
Source§impl From<TransactionError> for WalletError
impl From<TransactionError> for WalletError
Source§fn from(e: TransactionError) -> Self
fn from(e: TransactionError) -> Self
Converts to this type from the input type.
Source§impl From<WalletError> for AuthError
impl From<WalletError> for AuthError
Source§fn from(source: WalletError) -> Self
fn from(source: WalletError) -> Self
Converts to this type from the input type.
Source§impl From<WalletError> for ServicesError
impl From<WalletError> for ServicesError
Source§fn from(source: WalletError) -> Self
fn from(source: WalletError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for WalletError
impl RefUnwindSafe for WalletError
impl Send for WalletError
impl Sync for WalletError
impl Unpin for WalletError
impl UnsafeUnpin for WalletError
impl UnwindSafe for WalletError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more