Enum sapio_bitcoin::util::sighash::Error
source · 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§
Io(ErrorKind)
Could happen only by using *_encode_signing_*
methods with custom writers, engines writers
like the ones used in methods *_signature_hash
don’t 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 with 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 without 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
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
source§impl Ord for Error
impl Ord for Error
source§impl PartialEq for Error
impl PartialEq for Error
source§impl PartialOrd for Error
impl PartialOrd 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