[−][src]Struct secp256k1::schnorrsig::KeyPair
Opaque data structure that holds a keypair consisting of a secret and a public key.
Implementations
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 new<R: Rng + ?Sized, C: Signing>(
secp: &Secp256k1<C>,
rng: &mut R
) -> KeyPair
[src]
secp: &Secp256k1<C>,
rng: &mut R
) -> KeyPair
Creates a new random secret key. Requires compilation with the "rand" feature.
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 Clone for KeyPair
[src]
impl Copy for KeyPair
[src]
impl Debug for KeyPair
[src]
impl Eq for KeyPair
[src]
impl Hash for KeyPair
[src]
pub fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl Ord for KeyPair
[src]
pub fn cmp(&self, other: &KeyPair) -> Ordering
[src]
#[must_use]pub fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self
1.50.0[src]
impl PartialEq<KeyPair> for KeyPair
[src]
impl PartialOrd<KeyPair> for KeyPair
[src]
pub fn partial_cmp(&self, other: &KeyPair) -> Option<Ordering>
[src]
pub fn lt(&self, other: &KeyPair) -> bool
[src]
pub fn le(&self, other: &KeyPair) -> bool
[src]
pub fn gt(&self, other: &KeyPair) -> bool
[src]
pub fn ge(&self, other: &KeyPair) -> bool
[src]
impl StructuralEq for KeyPair
[src]
impl StructuralPartialEq for KeyPair
[src]
Auto Trait Implementations
impl RefUnwindSafe for KeyPair
[src]
impl Send for KeyPair
[src]
impl Sync for KeyPair
[src]
impl Unpin for KeyPair
[src]
impl UnwindSafe for KeyPair
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,