pub struct PublicKey(/* private fields */);
Expand description
Public key on a secp256k1 curve.
Implementations§
Source§impl PublicKey
impl PublicKey
pub fn from_secret_key_with_context( seckey: &SecretKey, context: &ECMultGenContext, ) -> PublicKey
pub fn from_secret_key(seckey: &SecretKey) -> PublicKey
pub fn parse_slice( p: &[u8], format: Option<PublicKeyFormat>, ) -> Result<PublicKey, Error>
pub fn parse(p: &[u8; 65]) -> Result<PublicKey, Error>
pub fn parse_compressed(p: &[u8; 33]) -> Result<PublicKey, Error>
pub fn serialize(&self) -> [u8; 65]
pub fn serialize_compressed(&self) -> [u8; 33]
pub fn tweak_add_assign_with_context( &mut self, tweak: &SecretKey, context: &ECMultContext, ) -> Result<(), Error>
pub fn tweak_add_assign(&mut self, tweak: &SecretKey) -> Result<(), Error>
pub fn tweak_mul_assign_with_context( &mut self, tweak: &SecretKey, context: &ECMultContext, ) -> Result<(), Error>
pub fn tweak_mul_assign(&mut self, tweak: &SecretKey) -> Result<(), Error>
pub fn combine(keys: &[PublicKey]) -> Result<Self, Error>
Trait Implementations§
impl Copy for PublicKey
impl Eq for PublicKey
impl StructuralPartialEq for PublicKey
Auto Trait Implementations§
impl Freeze for PublicKey
impl RefUnwindSafe for PublicKey
impl Send for PublicKey
impl Sync for PublicKey
impl Unpin for PublicKey
impl UnwindSafe for PublicKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more