pub enum SignerError {
Lwk(String),
LwkDetailed {
operation: String,
context: String,
error_message: String,
},
InvalidMnemonic(String),
HexParse(FromHexError),
HexParseDetailed {
parsing_context: String,
hex_preview: String,
hex_error: String,
},
InvalidTransaction(String),
InvalidTransactionDetailed {
txid: String,
validation_details: String,
error_message: String,
},
Network(Error),
Serialization(Error),
SerializationDetailed {
operation: String,
data_type: String,
context: String,
serde_error: String,
},
FileIo(Error),
}Expand description
Comprehensive error types for signer operations
This enum covers all possible error scenarios that can occur during transaction signing operations, providing detailed context for debugging and proper error handling in client applications.
Variants§
Lwk(String)
LWK-specific errors from the Liquid Wallet Kit
This variant captures errors from LWK operations including:
SwSignercreation failures- Transaction signing failures
- PSET (Partially Signed Element Transaction) operations
- Key derivation and cryptographic operations
LwkDetailed
Fields
InvalidMnemonic(String)
Invalid mnemonic phrase errors
This variant captures mnemonic-related errors including:
- Invalid word count (not 12, 15, 18, 21, or 24 words)
- Invalid characters or formatting
- BIP39 checksum validation failures
- Empty or malformed mnemonic phrases
HexParse(FromHexError)
Hex string parsing and decoding errors
This variant captures errors when parsing hex-encoded data including:
- Invalid hex characters
- Odd-length hex strings
- Empty hex strings
- Malformed transaction hex data
HexParseDetailed
Fields
InvalidTransaction(String)
Invalid transaction structure or content errors
This variant captures transaction validation errors including:
- Malformed transaction structure
- Missing inputs or outputs
- Invalid transaction serialization
- PSET conversion failures
- Transaction size or format issues
InvalidTransactionDetailed
Fields
Network(Error)
Network-related communication errors
This variant captures network errors that may occur during remote operations or API calls (reserved for future use).
Serialization(Error)
JSON serialization and deserialization errors
This variant captures JSON processing errors including:
- Mnemonic file parsing failures
- Invalid JSON structure in storage files
- Serialization failures when writing storage
SerializationDetailed
Fields
FileIo(Error)
File system I/O operation errors
This variant captures file operation errors including:
- Mnemonic file read/write failures
- Permission denied errors
- Disk space or filesystem issues
- Atomic write operation failures
Trait Implementations§
Source§impl Debug for SignerError
impl Debug for SignerError
Source§impl Display for SignerError
impl Display for SignerError
Source§impl Error for SignerError
impl Error for SignerError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<Error> for SignerError
impl From<Error> for SignerError
Source§impl From<Error> for SignerError
impl From<Error> for SignerError
Source§impl From<Error> for SignerError
impl From<Error> for SignerError
Source§impl From<Error> for SignerError
Convert BIP39 mnemonic errors to SignerError
impl From<Error> for SignerError
Convert BIP39 mnemonic errors to SignerError
This conversion handles all BIP39-related errors including:
- Invalid word count
- Invalid words not in BIP39 wordlist
- Checksum validation failures
- Language detection issues
Source§impl From<Error> for SignerError
Convert Elements transaction encoding errors to SignerError
impl From<Error> for SignerError
Convert Elements transaction encoding errors to SignerError
This conversion handles transaction serialization/deserialization errors from the Elements library including:
- Consensus encoding failures
- Invalid transaction structure
- Serialization format errors
Source§impl From<FromHexError> for SignerError
impl From<FromHexError> for SignerError
Source§fn from(source: FromHexError) -> Self
fn from(source: FromHexError) -> Self
Source§impl From<SignerError> for AmpError
impl From<SignerError> for AmpError
Source§fn from(source: SignerError) -> Self
fn from(source: SignerError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for SignerError
impl !UnwindSafe for SignerError
impl Freeze for SignerError
impl Send for SignerError
impl Sync for SignerError
impl Unpin for SignerError
impl UnsafeUnpin for SignerError
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.