Struct secp256k1::key::PublicKey  [−][src]
pub struct PublicKey(_);
A Secp256k1 public key, used for verification of signatures
Methods
impl PublicKey[src] 
impl PublicKeypub fn new() -> PublicKey[src] 
pub fn new() -> PublicKeyCreates a new zeroed out public key
pub fn is_valid(&self) -> bool[src] 
pub fn is_valid(&self) -> boolDetermines whether a pubkey is valid
pub fn as_ptr(&self) -> *const PublicKey[src] 
pub fn as_ptr(&self) -> *const PublicKeyObtains a raw pointer suitable for use with FFI functions
pub fn from_secret_key(
    secp: &Secp256k1, 
    sk: &SecretKey
) -> Result<PublicKey, Error>[src] 
pub fn from_secret_key(
    secp: &Secp256k1, 
    sk: &SecretKey
) -> Result<PublicKey, Error>Creates a new public key from a secret key.
pub fn from_slice(secp: &Secp256k1, data: &[u8]) -> Result<PublicKey, Error>[src] 
pub fn from_slice(secp: &Secp256k1, data: &[u8]) -> Result<PublicKey, Error>Creates a public key directly from a slice
pub fn serialize_vec(
    &self, 
    secp: &Secp256k1, 
    compressed: bool
) -> ArrayVec<[u8; 72]>[src] 
pub fn serialize_vec(
    &self, 
    secp: &Secp256k1, 
    compressed: bool
) -> ArrayVec<[u8; 72]>Serialize the key as a byte-encoded pair of values. In compressed form the y-coordinate is represented by only a single bit, as x determines it up to one bit.
pub fn add_exp_assign(
    &mut self, 
    secp: &Secp256k1, 
    other: &SecretKey
) -> Result<(), Error>[src] 
pub fn add_exp_assign(
    &mut self, 
    secp: &Secp256k1, 
    other: &SecretKey
) -> Result<(), Error>Adds the pk corresponding to other to the pk self in place
pub fn add_assign(
    &mut self, 
    secp: &Secp256k1, 
    other: &PublicKey
) -> Result<(), Error>[src] 
pub fn add_assign(
    &mut self, 
    secp: &Secp256k1, 
    other: &PublicKey
) -> Result<(), Error>Adds another point on the curve in place
pub fn mul_assign(
    &mut self, 
    secp: &Secp256k1, 
    other: &SecretKey
) -> Result<(), Error>[src] 
pub fn mul_assign(
    &mut self, 
    secp: &Secp256k1, 
    other: &SecretKey
) -> Result<(), Error>Multiplies this point by secret scalar
Trait Implementations
impl Copy for PublicKey[src] 
impl Copy for PublicKeyimpl Clone for PublicKey[src] 
impl Clone for PublicKeyfn clone(&self) -> PublicKey[src] 
fn clone(&self) -> PublicKeyReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src] 
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl PartialEq for PublicKey[src] 
impl PartialEq for PublicKeyfn eq(&self, other: &PublicKey) -> bool[src] 
fn eq(&self, other: &PublicKey) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &PublicKey) -> bool[src] 
fn ne(&self, other: &PublicKey) -> boolThis method tests for !=.
impl Eq for PublicKey[src] 
impl Eq for PublicKeyimpl Debug for PublicKey[src] 
impl Debug for PublicKeyfn fmt(&self, f: &mut Formatter) -> Result[src] 
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Hash for PublicKey[src] 
impl Hash for PublicKeyfn hash<__H: Hasher>(&self, state: &mut __H)[src] 
fn hash<__H: Hasher>(&self, state: &mut __H)Feeds this value into the given [Hasher]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher, 1.3.0[src] 
fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher, Feeds a slice of this type into the given [Hasher]. Read more
impl From<PublicKey> for PublicKey[src] 
impl From<PublicKey> for PublicKeyCreates a new public key from a FFI public key