pub struct PublicKey { /* private fields */ }Expand description
Public key
Implementations§
Source§impl PublicKey
impl PublicKey
Sourcepub fn from_bytes(bytes: [u8; 65]) -> Self
pub fn from_bytes(bytes: [u8; 65]) -> Self
Create public key from bytes
Sourcepub fn from_slice(slice: &[u8]) -> Result<Self>
pub fn from_slice(slice: &[u8]) -> Result<Self>
Create public key from slice
Sourcepub fn as_compressed_bytes(&self) -> [u8; 33]
pub fn as_compressed_bytes(&self) -> [u8; 33]
Get public key as compressed bytes
Sourcepub fn derive_child(&self, other: [u8; 32]) -> Result<Self>
pub fn derive_child(&self, other: [u8; 32]) -> Result<Self>
Derive child key from parent key.
Trait Implementations§
impl Copy for PublicKey
impl Eq for PublicKey
Source§impl From<&PublicKey> for VerifyingKey
impl From<&PublicKey> for VerifyingKey
Source§impl From<VerifyingKey<Secp256k1>> for PublicKey
impl From<VerifyingKey<Secp256k1>> for PublicKey
Source§fn from(value: VerifyingKey) -> Self
fn from(value: VerifyingKey) -> Self
Converts to this type from the input type.
Source§impl K256Recover for PublicKey
impl K256Recover for PublicKey
Source§impl K256Verify for PublicKey
impl K256Verify 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 UnsafeUnpin 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