pub struct RecoverableSignature(/* private fields */);
Expand description
An ECDSA signature with a recovery ID for pubkey recovery
Implementations§
Source§impl RecoverableSignature
impl RecoverableSignature
Sourcepub fn from_compact(
secp: &Secp256k1,
data: &[u8],
recid: RecoveryId,
) -> Result<RecoverableSignature, Error>
pub fn from_compact( secp: &Secp256k1, data: &[u8], recid: RecoveryId, ) -> Result<RecoverableSignature, Error>
Converts a compact-encoded byte slice to a signature. This representation is nonstandard and defined by the libsecp256k1 library.
Sourcepub fn as_ptr(&self) -> *const RecoverableSignature
pub fn as_ptr(&self) -> *const RecoverableSignature
Obtains a raw pointer suitable for use with FFI functions
Sourcepub fn serialize_compact(&self, secp: &Secp256k1) -> (RecoveryId, [u8; 64])
pub fn serialize_compact(&self, secp: &Secp256k1) -> (RecoveryId, [u8; 64])
Serializes the recoverable signature in compact format
Sourcepub fn to_standard(&self, secp: &Secp256k1) -> Signature
pub fn to_standard(&self, secp: &Secp256k1) -> Signature
Converts a recoverable signature to a non-recoverable one (this is needed for verification
Trait Implementations§
Source§impl Clone for RecoverableSignature
impl Clone for RecoverableSignature
Source§fn clone(&self) -> RecoverableSignature
fn clone(&self) -> RecoverableSignature
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 RecoverableSignature
impl Debug for RecoverableSignature
Source§impl From<RecoverableSignature> for RecoverableSignature
impl From<RecoverableSignature> for RecoverableSignature
Creates a new recoverable signature from a FFI one
Source§fn from(sig: RecoverableSignature) -> RecoverableSignature
fn from(sig: RecoverableSignature) -> RecoverableSignature
Converts to this type from the input type.
Source§impl PartialEq for RecoverableSignature
impl PartialEq for RecoverableSignature
impl Copy for RecoverableSignature
impl Eq for RecoverableSignature
impl StructuralPartialEq for RecoverableSignature
Auto Trait Implementations§
impl Freeze for RecoverableSignature
impl RefUnwindSafe for RecoverableSignature
impl Send for RecoverableSignature
impl Sync for RecoverableSignature
impl Unpin for RecoverableSignature
impl UnwindSafe for RecoverableSignature
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§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
)