[−][src]Struct secp256k1::schnorrsig::KeyPair
Opaque data structure that holds a keypair consisting of a secret and a public key.
Methods
impl KeyPair
[src]
pub fn as_ptr(&self) -> *const KeyPair
[src]
Obtains a raw const pointer suitable for use with FFI functions
pub fn as_mut_ptr(&mut self) -> *mut KeyPair
[src]
Obtains a raw mutable pointer suitable for use with FFI functions
pub fn from_seckey_slice<C: Signing>(
secp: &Secp256k1<C>,
data: &[u8]
) -> Result<KeyPair, Error>
[src]
secp: &Secp256k1<C>,
data: &[u8]
) -> Result<KeyPair, Error>
Creates a Schnorr KeyPair directly from a secret key slice
pub fn from_seckey_str<C: Signing>(
secp: &Secp256k1<C>,
s: &str
) -> Result<KeyPair, Error>
[src]
secp: &Secp256k1<C>,
s: &str
) -> Result<KeyPair, Error>
Creates a Schnorr KeyPair directly from a secret key string
pub fn tweak_add_assign<C: Verification>(
&mut self,
secp: &Secp256k1<C>,
tweak: &[u8]
) -> Result<(), Error>
[src]
&mut self,
secp: &Secp256k1<C>,
tweak: &[u8]
) -> Result<(), Error>
Tweak a keypair by adding the given tweak to the secret key and updating the public key accordingly. Will return an error if the resulting key would be invalid or if the tweak was not a 32-byte length slice.
Trait Implementations
impl Ord for KeyPair
[src]
fn cmp(&self, other: &KeyPair) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl PartialOrd<KeyPair> for KeyPair
[src]
fn partial_cmp(&self, other: &KeyPair) -> Option<Ordering>
[src]
fn lt(&self, other: &KeyPair) -> bool
[src]
fn le(&self, other: &KeyPair) -> bool
[src]
fn gt(&self, other: &KeyPair) -> bool
[src]
fn ge(&self, other: &KeyPair) -> bool
[src]
impl Clone for KeyPair
[src]
fn clone(&self) -> KeyPair
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialEq<KeyPair> for KeyPair
[src]
impl Eq for KeyPair
[src]
impl Copy for KeyPair
[src]
impl Debug for KeyPair
[src]
impl Hash for KeyPair
[src]
Auto Trait Implementations
impl Unpin for KeyPair
impl Sync for KeyPair
impl Send for KeyPair
impl UnwindSafe for KeyPair
impl RefUnwindSafe for KeyPair
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,