pub struct SignatureInfo {
pub signature: SignatureType,
pub der_encoded: DEREncoding,
pub sig_hash: u8,
pub length: usize,
}Fields§
§signature: SignatureTypeThe actual signature wrapped in a type enum.
der_encoded: DEREncodingInidcates if a ECDSA signature is strictly DER encoded. A Schnorr signature will never be DER encoded always be DEREncoding::NotApplicable.
sig_hash: u8SigHash flag of the signature.
length: usizelength of the encoded signature.
Implementations§
Source§impl SignatureInfo
impl SignatureInfo
pub fn low_s(&self) -> bool
pub fn low_r(&self) -> bool
Sourcepub fn from_instruction_ecdsa(
instruction: &Instruction<'_>,
) -> Option<SignatureInfo>
pub fn from_instruction_ecdsa( instruction: &Instruction<'_>, ) -> Option<SignatureInfo>
Returns Some(SignatureInfo) if the Instruction is a Bitcoin ECDSA Signature, otherwise None is returned.
Sourcepub fn from_instruction_schnorr(
instruction: &Instruction<'_>,
) -> Option<SignatureInfo>
pub fn from_instruction_schnorr( instruction: &Instruction<'_>, ) -> Option<SignatureInfo>
Returns Some(SignatureInfo) if the Instruction is a Bitcoin Schnorr Signature, otherwise None is returned.
Sourcepub fn from_u8_slice_ecdsa(bytes: &[u8]) -> Option<SignatureInfo>
pub fn from_u8_slice_ecdsa(bytes: &[u8]) -> Option<SignatureInfo>
Returns Some(SignatureInfo) if the Instruction is a Bitcoin ECDSA Signature, otherwise None is returned.
Sourcepub fn from_u8_slice_schnorr(bytes: &[u8]) -> Option<SignatureInfo>
pub fn from_u8_slice_schnorr(bytes: &[u8]) -> Option<SignatureInfo>
Returns Some(SignatureInfo) if the Instruction is a Bitcoin Schnorr Signature, otherwise None is returned.
Sourcepub fn all_from(input: &TxIn) -> Result<Vec<SignatureInfo>, InputError>
pub fn all_from(input: &TxIn) -> Result<Vec<SignatureInfo>, InputError>
Constructs a vector of SignatureInfo for all Signatures in the input. If the inputs script_sig and witness don’t contain any signatures, an empty vector is returned.
Trait Implementations§
Source§impl Clone for SignatureInfo
impl Clone for SignatureInfo
Source§fn clone(&self) -> SignatureInfo
fn clone(&self) -> SignatureInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more