Struct secp256k1::schnorrsig::KeyPair [−][src]
pub struct KeyPair(_);
Expand description
Opaque data structure that holds a keypair consisting of a secret and a public key.
Implementations
Obtains a raw const pointer suitable for use with FFI functions
Obtains a raw mutable pointer suitable for use with FFI functions
Creates a Schnorr KeyPair directly from generic Secp256k1 secret key
Panics if internal representation of the provided [SecretKey
] does not
holds correct secret key value obtained from Secp256k1 library
previously
Creates a Schnorr KeyPair directly from a secret key slice
Creates a Schnorr KeyPair directly from a secret key string
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>
pub fn tweak_add_assign<C: Verification>(
&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
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for KeyPair
impl UnwindSafe for KeyPair
Blanket Implementations
Mutably borrows from an owned value. Read more