Struct bitcoin::util::ecdsa::PublicKey [−][src]
Expand description
A Bitcoin ECDSA public key
Fields
compressed: bool
Whether this public key should be serialized as compressed
key: PublicKey
The actual ECDSA key
Implementations
Constructs compressed ECDSA public key from the provided generic Secp256k1 public key
Constructs uncompressed (legacy) ECDSA public key from the provided generic Secp256k1 public key
Returns bitcoin 160-bit hash of the public key
Returns bitcoin 160-bit hash of the public key for witness program
Write the public key into a writer
Read the public key from a reader
This internally reads the first byte before reading the rest, so
use of a BufReader
is recommended.
Deserialize a public key from a slice
Computes the public key as supposed to be used with this secret
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for PublicKey
impl UnwindSafe for PublicKey
Blanket Implementations
Mutably borrows from an owned value. Read more