Enum sapio_bitcoin::util::sighash::SchnorrSighashType
source · [−]pub enum SchnorrSighashType {
Default,
All,
None,
Single,
AllPlusAnyoneCanPay,
NonePlusAnyoneCanPay,
SinglePlusAnyoneCanPay,
Reserved,
}
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
0x0: Used when not explicitly specified, defaulting to SchnorrSighashType::All
All
0x1: Sign all outputs
None
0x2: Sign no outputs — anyone can choose the destination
Single
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
0x81: Sign all outputs but only this input
NonePlusAnyoneCanPay
0x82: Sign no outputs and only this input
SinglePlusAnyoneCanPay
0x83: Sign one output and only this input (see Single
for what “one output” means)
Reserved
Reserved for future use, #[non_exhaustive]
is not available with current MSRV
Implementations
Trait Implementations
sourceimpl Clone for SchnorrSighashType
impl Clone for SchnorrSighashType
sourcefn clone(&self) -> SchnorrSighashType
fn clone(&self) -> SchnorrSighashType
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for SchnorrSighashType
impl Debug for SchnorrSighashType
sourceimpl<'de> Deserialize<'de> for SchnorrSighashType
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for SchnorrSighashType
serde
only.sourcefn 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>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Display for SchnorrSighashType
impl Display for SchnorrSighashType
sourceimpl From<EcdsaSighashType> for SchnorrSighashType
impl From<EcdsaSighashType> for SchnorrSighashType
sourcefn from(s: EcdsaSighashType) -> Self
fn from(s: EcdsaSighashType) -> Self
Converts to this type from the input type.
sourceimpl From<SchnorrSighashType> for PsbtSighashType
impl From<SchnorrSighashType> for PsbtSighashType
sourcefn from(schnorr_hash_ty: SchnorrSighashType) -> Self
fn from(schnorr_hash_ty: SchnorrSighashType) -> Self
Converts to this type from the input type.
sourceimpl FromStr for SchnorrSighashType
impl FromStr for SchnorrSighashType
sourceimpl Hash for SchnorrSighashType
impl Hash for SchnorrSighashType
sourceimpl Ord for SchnorrSighashType
impl Ord for SchnorrSighashType
sourceimpl PartialOrd<SchnorrSighashType> for SchnorrSighashType
impl PartialOrd<SchnorrSighashType> for SchnorrSighashType
sourcefn partial_cmp(&self, other: &SchnorrSighashType) -> Option<Ordering>
fn partial_cmp(&self, other: &SchnorrSighashType) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<'de> Serialize for SchnorrSighashType
Available on crate feature serde
only.
impl<'de> Serialize for SchnorrSighashType
serde
only.impl Copy for SchnorrSighashType
impl Eq for SchnorrSighashType
impl StructuralEq for SchnorrSighashType
impl StructuralPartialEq for SchnorrSighashType
Auto Trait Implementations
impl RefUnwindSafe for SchnorrSighashType
impl Send for SchnorrSighashType
impl Sync for SchnorrSighashType
impl Unpin for SchnorrSighashType
impl UnwindSafe for SchnorrSighashType
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more