#[non_exhaustive]
pub enum Error {
Io(ErrorKind),
IndexOutOfInputsBounds {
index: usize,
inputs_size: usize,
},
SingleWithoutCorrespondingOutput {
index: usize,
outputs_size: usize,
},
PrevoutsSize,
PrevoutIndex,
PrevoutKind,
WrongAnnex,
InvalidSighashType(u32),
}Expand description
Possible errors in computing the signature message.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Io(ErrorKind)
Could happen only by using *_encode_signing_* methods with custom writers, engines writers
like the ones used in methods *_signature_hash do not error.
IndexOutOfInputsBounds
Requested index is greater or equal than the number of inputs in the transaction.
SingleWithoutCorrespondingOutput
Using SIGHASH_SINGLE without a “corresponding output” (an output with the same index as
the input being verified) is a validation failure.
PrevoutsSize
There are mismatches in the number of prevouts provided compared to the number of inputs in the transaction.
PrevoutIndex
Requested a prevout index which is greater than the number of prevouts provided or a
Prevouts::One with different index.
PrevoutKind
A single prevout has been provided but all prevouts are needed unless using
SIGHASH_ANYONECANPAY.
WrongAnnex
Annex must be at least one byte long and the first bytes must be 0x50.
InvalidSighashType(u32)
Invalid Sighash type.
Trait Implementations§
source§impl Error for Error
Available on crate feature std only.
impl Error for Error
std only.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
source§impl Ord for Error
impl Ord for Error
source§impl PartialEq<Error> for Error
impl PartialEq<Error> for Error
source§impl PartialOrd<Error> for Error
impl PartialOrd<Error> for Error
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self and other) and is used by the <=
operator. Read more