pub enum Error {
Show 28 variants
InvalidKeyLength {
expected: usize,
actual: usize,
},
InvalidDataLength {
expected: usize,
actual: usize,
},
InvalidHex(String),
InvalidBase58(String),
InvalidBase64(String),
CryptoError(String),
InvalidSignature(String),
InvalidPublicKey(String),
InvalidPrivateKey(String),
PointAtInfinity,
DecryptionFailed,
InvalidNonce(String),
InvalidTag,
InvalidUtf8(String),
ReaderUnderflow {
needed: usize,
available: usize,
},
NonCanonicalVarInt {
width: u8,
value: u64,
},
CompactSizeTooLarge(u64),
InvalidChecksum,
ScriptParseError(String),
ScriptExecutionError(String),
InvalidOpcode(u8),
DisabledOpcode(u8),
StackUnderflow,
StackOverflow,
Bip276Error(String),
InvalidAddress(String),
InvalidAddressLength(String),
UnsupportedAddress(String),
}Expand description
Main error type for the BSV SDK.
Variants§
InvalidKeyLength
Invalid key length for cryptographic operations.
InvalidDataLength
Invalid data length for cryptographic operations.
InvalidHex(String)
Invalid hex string.
InvalidBase58(String)
Invalid base58 string.
InvalidBase64(String)
Invalid base64 string.
CryptoError(String)
Cryptographic operation failed.
InvalidSignature(String)
Invalid signature.
InvalidPublicKey(String)
Invalid public key.
InvalidPrivateKey(String)
Invalid private key.
PointAtInfinity
Point at infinity (invalid for most operations).
DecryptionFailed
Decryption failed.
InvalidNonce(String)
Invalid nonce.
InvalidTag
Invalid tag (for authenticated encryption).
InvalidUtf8(String)
Invalid UTF-8 sequence.
ReaderUnderflow
Reader underflow (not enough bytes to read).
NonCanonicalVarInt
A varint using more bytes than its value requires. Width includes the marker.
CompactSizeTooLarge(u64)
A node CompactSize above MAX_COMPACT_SIZE.
InvalidChecksum
Invalid checksum.
ScriptParseError(String)
Script parse error.
ScriptExecutionError(String)
Script execution error.
InvalidOpcode(u8)
Invalid opcode.
DisabledOpcode(u8)
Disabled opcode.
StackUnderflow
Stack underflow.
StackOverflow
Stack overflow.
Bip276Error(String)
BIP-276 encoding/decoding error.
InvalidAddress(String)
Invalid address.
InvalidAddressLength(String)
Invalid address length.
UnsupportedAddress(String)
Unsupported address type.
Trait Implementations§
impl Eq for Error
Source§impl Error for Error
impl Error for Error
1.30.0 · 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()