pub struct Signature(/* private fields */);
Expand description
RecoverableSignature compact serialize
Implementations§
Source§impl Signature
impl Signature
Sourcepub fn from_compact(rec_id: RecoveryId, ret: [u8; 64]) -> Self
pub fn from_compact(rec_id: RecoveryId, ret: [u8; 64]) -> Self
Construct a new Signature from compact serialize slice and rec_id
Sourcepub fn from_slice(data: &[u8]) -> Result<Self, Error>
pub fn from_slice(data: &[u8]) -> Result<Self, Error>
Construct a new Signature from slice.
Sourcepub fn to_recoverable(&self) -> Result<RecoverableSignature, Error>
pub fn to_recoverable(&self) -> Result<RecoverableSignature, Error>
Converts compact signature to a recoverable signature
Sourcepub fn recover(&self, message: &Message) -> Result<Pubkey, Error>
pub fn recover(&self, message: &Message) -> Result<Pubkey, Error>
Determines the public key for signature
Sourcepub fn serialize_der(&self) -> Vec<u8>
pub fn serialize_der(&self) -> Vec<u8>
Serializes the signature in DER format
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
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
)