Struct subcoin_script::EcdsaSignature
source · pub struct EcdsaSignature {
pub signature: Signature,
pub sighash_type: u32,
}
Expand description
Same semantic with [bitcoin::ecdsa::Signature
] with the following differences:
sighash_type
uses u32 instead of [bitcoin::EcdsaSighashType
].- Ensure lower S via
normalize_s()
.
Fields§
§signature: Signature
The underlying ECDSA Signature.
sighash_type: u32
The corresponding hash type.
Implementations§
source§impl EcdsaSignature
impl EcdsaSignature
sourcepub fn parse_der_lax(full_sig_bytes: &[u8]) -> Result<Self, Error>
pub fn parse_der_lax(full_sig_bytes: &[u8]) -> Result<Self, Error>
Constructs a EcdsaSignature
from the full sig bytes.
https://github.com/bitcoin/bitcoin/blob/82ba50513425bf0568d4f9456282dc9713132490/src/pubkey.cpp#L285 https://github.com/bitcoin/bitcoin/blob/82ba50513425bf0568d4f9456282dc9713132490/src/pubkey.cpp#L290
Trait Implementations§
source§impl Clone for EcdsaSignature
impl Clone for EcdsaSignature
source§fn clone(&self) -> EcdsaSignature
fn clone(&self) -> EcdsaSignature
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 EcdsaSignature
impl Debug for EcdsaSignature
source§impl Hash for EcdsaSignature
impl Hash for EcdsaSignature
source§impl PartialEq for EcdsaSignature
impl PartialEq for EcdsaSignature
impl Copy for EcdsaSignature
impl Eq for EcdsaSignature
impl StructuralPartialEq for EcdsaSignature
Auto Trait Implementations§
impl Freeze for EcdsaSignature
impl RefUnwindSafe for EcdsaSignature
impl Send for EcdsaSignature
impl Sync for EcdsaSignature
impl Unpin for EcdsaSignature
impl UnwindSafe for EcdsaSignature
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)