Struct lnpbp_secp256k1zkp::key::PublicKey
source · pub struct PublicKey(pub PublicKey);
Expand description
A Secp256k1 public key, used for verification of signatures
Tuple Fields§
§0: PublicKey
Implementations§
source§impl PublicKey
impl PublicKey
sourcepub fn from_combination(
secp: &Secp256k1,
in_keys: Vec<&PublicKey>
) -> Result<PublicKey, Error>
pub fn from_combination(
secp: &Secp256k1,
in_keys: Vec<&PublicKey>
) -> Result<PublicKey, Error>
Creates a new public key as the sum of the provided keys
sourcepub fn as_ptr(&self) -> *const PublicKey
pub fn as_ptr(&self) -> *const PublicKey
Obtains a raw pointer suitable for use with FFI functions
sourcepub fn as_mut_ptr(&mut self) -> *mut PublicKey
pub fn as_mut_ptr(&mut self) -> *mut PublicKey
Obtains a mutable raw pointer suitable for use with FFI functions
sourcepub fn from_secp256k1_pubkey(pk: PublicKey) -> PublicKey
pub fn from_secp256k1_pubkey(pk: PublicKey) -> PublicKey
Creates a new public key from a Secp256k1 public key
sourcepub fn from_secret_key(
secp: &Secp256k1,
sk: &SecretKey
) -> Result<PublicKey, Error>
pub fn from_secret_key(
secp: &Secp256k1,
sk: &SecretKey
) -> Result<PublicKey, Error>
Creates a new public key from a secret key.
sourcepub fn from_slice(secp: &Secp256k1, data: &[u8]) -> Result<PublicKey, Error>
pub fn from_slice(secp: &Secp256k1, data: &[u8]) -> Result<PublicKey, Error>
Creates a public key directly from a slice
Trait Implementations§
source§impl Ord for PublicKey
impl Ord for PublicKey
source§impl PartialEq<PublicKey> for PublicKey
impl PartialEq<PublicKey> for PublicKey
source§impl PartialOrd<PublicKey> for PublicKey
impl PartialOrd<PublicKey> for PublicKey
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more