Struct bitcoin::util::privkey::Privkey[][src]

pub struct Privkey {
    pub compressed: bool,
    pub network: Network,
    pub key: SecretKey,
}

A Bitcoin ECDSA private key

Fields

Whether this private key represents a compressed address

The network on which this key should be used

The actual ECDSA key

Methods

impl Privkey
[src]

Creates a Privkey from a raw secp256k1 secret key

Computes the public key as supposed to be used with this secret

Converts a private key to a segwit address

Converts a private key to a legacy (non-segwit) address

Accessor for the underlying secp key

Accessor for the underlying secp key that consumes the privkey

Accessor for the network type

Accessor for the compressed flag

Trait Implementations

impl Clone for Privkey
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Privkey
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Privkey
[src]

impl Display for Privkey
[src]

Formats the value using the given formatter. Read more

impl FromStr for Privkey
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Auto Trait Implementations

impl Send for Privkey

impl Sync for Privkey