key: Reword and clarify comments
This commit is contained in:
parent
b3cc3d50ef
commit
fc448ba47c
|
@ -27,7 +27,7 @@ use util::base58;
|
||||||
/// A Bitcoin ECDSA public key
|
/// A Bitcoin ECDSA public key
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||||
pub struct PublicKey {
|
pub struct PublicKey {
|
||||||
/// Whether this public key represents a compressed address
|
/// Whether this public key should be serialized as compressed
|
||||||
pub compressed: bool,
|
pub compressed: bool,
|
||||||
/// The actual ECDSA key
|
/// The actual ECDSA key
|
||||||
pub key: secp256k1::PublicKey,
|
pub key: secp256k1::PublicKey,
|
||||||
|
@ -70,7 +70,7 @@ impl PublicKey {
|
||||||
#[derive(Clone, PartialEq, Eq)]
|
#[derive(Clone, PartialEq, Eq)]
|
||||||
/// A Bitcoin ECDSA private key
|
/// A Bitcoin ECDSA private key
|
||||||
pub struct PrivateKey {
|
pub struct PrivateKey {
|
||||||
/// Whether this private key represents a compressed address
|
/// Whether this private key should be serialized as compressed
|
||||||
pub compressed: bool,
|
pub compressed: bool,
|
||||||
/// The network on which this key should be used
|
/// The network on which this key should be used
|
||||||
pub network: Network,
|
pub network: Network,
|
||||||
|
@ -79,7 +79,7 @@ pub struct PrivateKey {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PrivateKey {
|
impl PrivateKey {
|
||||||
/// Computes the public key as supposed to be used with this secret
|
/// Creates a public key from this private key
|
||||||
pub fn public_key<C: secp256k1::Signing>(&self, secp: &Secp256k1<C>) -> PublicKey {
|
pub fn public_key<C: secp256k1::Signing>(&self, secp: &Secp256k1<C>) -> PublicKey {
|
||||||
PublicKey {
|
PublicKey {
|
||||||
compressed: self.compressed,
|
compressed: self.compressed,
|
||||||
|
|
Loading…
Reference in New Issue