[−][src]Struct secp256k1zkp::key::PublicKey
A Secp256k1 public key, used for verification of signatures
Implementations
impl PublicKey
[src]
pub fn new() -> PublicKey
[src]
Creates a new zeroed out public key
pub fn from_combination(
secp: &Secp256k1,
in_keys: Vec<&PublicKey>
) -> Result<PublicKey, Error>
[src]
secp: &Secp256k1,
in_keys: Vec<&PublicKey>
) -> Result<PublicKey, Error>
Creates a new public key as the sum of the provided keys
pub fn is_valid(&self) -> bool
[src]
Determines whether a pubkey is valid
pub fn as_ptr(&self) -> *const PublicKey
[src]
Obtains a raw pointer suitable for use with FFI functions
pub fn as_mut_ptr(&mut self) -> *mut PublicKey
[src]
Obtains a mutable raw pointer suitable for use with FFI functions
pub fn from_secp256k1_pubkey(pk: PublicKey) -> PublicKey
[src]
Creates a new public key from a Secp256k1 public key
pub fn from_secret_key(
secp: &Secp256k1,
sk: &SecretKey
) -> Result<PublicKey, Error>
[src]
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]
Creates a public key directly from a slice
pub fn serialize_vec(
&self,
secp: &Secp256k1,
compressed: bool
) -> ArrayVec<[u8; 72]>
[src]
&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]
&mut self,
secp: &Secp256k1,
other: &SecretKey
) -> Result<(), Error>
Adds the pk corresponding to other
to the pk self
in place
pub fn mul_assign(
&mut self,
secp: &Secp256k1,
other: &SecretKey
) -> Result<(), Error>
[src]
&mut self,
secp: &Secp256k1,
other: &SecretKey
) -> Result<(), Error>
Muliplies the pk self
in place by the scalar other
Trait Implementations
impl Clone for PublicKey
[src]
impl Copy for PublicKey
[src]
impl Debug for PublicKey
[src]
impl Decodable for PublicKey
[src]
impl<'de> Deserialize<'de> for PublicKey
[src]
pub fn deserialize<D>(d: D) -> Result<PublicKey, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl Encodable for PublicKey
[src]
impl Eq for PublicKey
[src]
impl From<PublicKey> for PublicKey
[src]
Creates a new public key from a FFI public key
impl Hash for PublicKey
[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 PublicKey
[src]
pub fn cmp(&self, other: &PublicKey) -> 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<PublicKey> for PublicKey
[src]
impl PartialOrd<PublicKey> for PublicKey
[src]
pub fn partial_cmp(&self, other: &PublicKey) -> Option<Ordering>
[src]
pub fn lt(&self, other: &PublicKey) -> bool
[src]
pub fn le(&self, other: &PublicKey) -> bool
[src]
pub fn gt(&self, other: &PublicKey) -> bool
[src]
pub fn ge(&self, other: &PublicKey) -> bool
[src]
impl Serialize for PublicKey
[src]
impl StructuralEq for PublicKey
[src]
impl StructuralPartialEq for PublicKey
[src]
Auto Trait Implementations
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnwindSafe for PublicKey
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> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
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>,