A Bitcoin ECDSA private key
Whether this private key represents a compressed address
The network on which this key should be used
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
Format the private key to WIF format.
Get WIF encoding of this private key.
Parse WIF encoded private key.
This method tests for self
and other
values to be equal, and is used by ==
. Read more
This method tests for !=
.
Performs copy-assignment from source
. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
The associated error which can be returned from parsing.
Parses a string s
to return a value of this type. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String
. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static