Enum tapyrus::blockdata::transaction::SigHashType
source · pub enum SigHashType {
All = 1,
None = 2,
Single = 3,
AllPlusAnyoneCanPay = 129,
NonePlusAnyoneCanPay = 130,
SinglePlusAnyoneCanPay = 131,
}
Expand description
Hashtype of a transaction, encoded in the last byte of a signature Fixed values so they can be casted as integer types for encoding
Variants§
All = 1
0x1: Sign all outputs
None = 2
0x2: Sign no outputs — anyone can choose the destination
Single = 3
0x3: Sign the output whose index matches this input’s index. If none exists,
sign the hash 0000000000000000000000000000000000000000000000000000000000000001
.
(This rule is probably an unintentional C++ism, but it’s consensus so we have
to follow it.)
AllPlusAnyoneCanPay = 129
0x81: Sign all outputs but only this input
NonePlusAnyoneCanPay = 130
0x82: Sign no outputs and only this input
SinglePlusAnyoneCanPay = 131
0x83: Sign one output and only this input (see Single
for what “one output” means)
Implementations§
source§impl SigHashType
impl SigHashType
Trait Implementations§
source§impl Clone for SigHashType
impl Clone for SigHashType
source§fn clone(&self) -> SigHashType
fn clone(&self) -> SigHashType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SigHashType
impl Debug for SigHashType
source§impl Deserialize for SigHashType
impl Deserialize for SigHashType
source§impl PartialEq for SigHashType
impl PartialEq for SigHashType
source§fn eq(&self, other: &SigHashType) -> bool
fn eq(&self, other: &SigHashType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for SigHashType
impl Serialize for SigHashType
impl Copy for SigHashType
impl Eq for SigHashType
impl StructuralEq for SigHashType
impl StructuralPartialEq for SigHashType
Auto Trait Implementations§
impl RefUnwindSafe for SigHashType
impl Send for SigHashType
impl Sync for SigHashType
impl Unpin for SigHashType
impl UnwindSafe for SigHashType
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
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where T: CheckedCast<Dst>,
Casts the value.
source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where T: OverflowingCast<Dst>,
Casts the value.
source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere T: SaturatingCast<Dst>,
Casts the value.
source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere T: UnwrappedCast<Dst>,
Casts the value.
source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere T: WrappingCast<Dst>,
Casts the value.