pub struct BitcoinPublicKey<N: BitcoinNetwork> { /* private fields */ }Expand description
Represents a Bitcoin public key
Implementations§
Source§impl<N: BitcoinNetwork> BitcoinPublicKey<N>
impl<N: BitcoinNetwork> BitcoinPublicKey<N>
Sourcepub fn from_secp256k1_public_key(
public_key: PublicKey,
compressed: bool,
) -> Self
pub fn from_secp256k1_public_key( public_key: PublicKey, compressed: bool, ) -> Self
Returns a public key given a secp256k1 public key.
Sourcepub fn to_secp256k1_public_key(&self) -> PublicKey
pub fn to_secp256k1_public_key(&self) -> PublicKey
Returns the secp256k1 public key of the public key.
Sourcepub fn is_compressed(&self) -> bool
pub fn is_compressed(&self) -> bool
Returns true if the public key is in compressed form.
Trait Implementations§
Source§impl<N: Clone + BitcoinNetwork> Clone for BitcoinPublicKey<N>
impl<N: Clone + BitcoinNetwork> Clone for BitcoinPublicKey<N>
Source§fn clone(&self) -> BitcoinPublicKey<N>
fn clone(&self) -> BitcoinPublicKey<N>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<N: Debug + BitcoinNetwork> Debug for BitcoinPublicKey<N>
impl<N: Debug + BitcoinNetwork> Debug for BitcoinPublicKey<N>
Source§impl<N: BitcoinNetwork> Display for BitcoinPublicKey<N>
impl<N: BitcoinNetwork> Display for BitcoinPublicKey<N>
Source§impl<N: BitcoinNetwork> FromStr for BitcoinPublicKey<N>
impl<N: BitcoinNetwork> FromStr for BitcoinPublicKey<N>
Source§impl<N: PartialEq + BitcoinNetwork> PartialEq for BitcoinPublicKey<N>
impl<N: PartialEq + BitcoinNetwork> PartialEq for BitcoinPublicKey<N>
Source§impl<N: BitcoinNetwork> PublicKey for BitcoinPublicKey<N>
impl<N: BitcoinNetwork> PublicKey for BitcoinPublicKey<N>
Source§fn from_secret_key(secret_key: &Self::SecretKey) -> Self
fn from_secret_key(secret_key: &Self::SecretKey) -> Self
Returns the address corresponding to the given public key.
Source§fn to_address(
&self,
format: &Self::Format,
) -> Result<Self::Address, AddressError>
fn to_address( &self, format: &Self::Format, ) -> Result<Self::Address, AddressError>
Returns the address of the corresponding private key.
type SecretKey = SecretKey
type Address = BitcoinAddress<N>
type Format = BitcoinFormat
impl<N: Eq + BitcoinNetwork> Eq for BitcoinPublicKey<N>
impl<N: BitcoinNetwork> StructuralPartialEq for BitcoinPublicKey<N>
Auto Trait Implementations§
impl<N> Freeze for BitcoinPublicKey<N>
impl<N> RefUnwindSafe for BitcoinPublicKey<N>where
N: RefUnwindSafe,
impl<N> Send for BitcoinPublicKey<N>
impl<N> Sync for BitcoinPublicKey<N>
impl<N> Unpin for BitcoinPublicKey<N>where
N: Unpin,
impl<N> UnwindSafe for BitcoinPublicKey<N>where
N: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)