Enum sapio_bitcoin::util::sighash::SchnorrSighashType
source · pub enum SchnorrSighashType {
Default = 0,
All = 1,
None = 2,
Single = 3,
AllPlusAnyoneCanPay = 129,
NonePlusAnyoneCanPay = 130,
SinglePlusAnyoneCanPay = 131,
Reserved = 255,
}
Expand description
Hashtype of an input’s signature, encoded in the last byte of the signature Fixed values so they can be casted as integer types for encoding
Variants§
Default = 0
0x0: Used when not explicitly specified, defaulting to SchnorrSighashType::All
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)
Reserved = 255
Reserved for future use, #[non_exhaustive]
is not available with current MSRV
Implementations§
Trait Implementations§
source§impl Clone for SchnorrSighashType
impl Clone for SchnorrSighashType
source§fn clone(&self) -> SchnorrSighashType
fn clone(&self) -> SchnorrSighashType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SchnorrSighashType
impl Debug for SchnorrSighashType
source§impl<'de> Deserialize<'de> for SchnorrSighashType
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for SchnorrSighashType
serde
only.source§fn deserialize<D>(deserializer: D) -> Result<SchnorrSighashType, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<SchnorrSighashType, D::Error>where
D: Deserializer<'de>,
source§impl Display for SchnorrSighashType
impl Display for SchnorrSighashType
source§impl From<EcdsaSighashType> for SchnorrSighashType
impl From<EcdsaSighashType> for SchnorrSighashType
source§fn from(s: EcdsaSighashType) -> Self
fn from(s: EcdsaSighashType) -> Self
source§impl From<SchnorrSighashType> for PsbtSighashType
impl From<SchnorrSighashType> for PsbtSighashType
source§fn from(schnorr_hash_ty: SchnorrSighashType) -> Self
fn from(schnorr_hash_ty: SchnorrSighashType) -> Self
source§impl FromStr for SchnorrSighashType
impl FromStr for SchnorrSighashType
source§impl Hash for SchnorrSighashType
impl Hash for SchnorrSighashType
source§impl Ord for SchnorrSighashType
impl Ord for SchnorrSighashType
source§fn cmp(&self, other: &SchnorrSighashType) -> Ordering
fn cmp(&self, other: &SchnorrSighashType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for SchnorrSighashType
impl PartialEq for SchnorrSighashType
source§fn eq(&self, other: &SchnorrSighashType) -> bool
fn eq(&self, other: &SchnorrSighashType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SchnorrSighashType
impl PartialOrd for SchnorrSighashType
source§fn partial_cmp(&self, other: &SchnorrSighashType) -> Option<Ordering>
fn partial_cmp(&self, other: &SchnorrSighashType) -> Option<Ordering>
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 moresource§impl<'de> Serialize for SchnorrSighashType
Available on crate feature serde
only.
impl<'de> Serialize for SchnorrSighashType
serde
only.