Struct digibyte::util::key::PrivateKey [−][src]
A Bitcoin ECDSA private key
Fields
compressed: bool
Whether this private key should be serialized as compressed
network: Network
The network on which this key should be used
key: SecretKey
The actual ECDSA key
Implementations
impl PrivateKey
[src]
impl PrivateKey
[src]pub fn public_key<C: Signing>(&self, secp: &Secp256k1<C>) -> PublicKey
[src]
Creates a public key from this private key
pub fn to_bytes(&self) -> Vec<u8>
[src]
Serialize the private key to bytes
pub fn fmt_wif(&self, fmt: &mut dyn Write) -> Result
[src]
Format the private key to WIF format.
pub fn to_wif(&self) -> String
[src]
Get WIF encoding of this private key.
pub fn from_wif(wif: &str) -> Result<PrivateKey, Error>
[src]
Parse WIF encoded private key.
Trait Implementations
impl Clone for PrivateKey
[src]
impl Clone for PrivateKey
[src]fn clone(&self) -> PrivateKey
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for PrivateKey
[src]
impl Copy for PrivateKey
[src]impl Eq for PrivateKey
[src]
impl Eq for PrivateKey
[src]impl FromStr for PrivateKey
[src]
impl FromStr for PrivateKey
[src]impl Index<RangeFull> for PrivateKey
[src]
impl Index<RangeFull> for PrivateKey
[src]impl PartialEq<PrivateKey> for PrivateKey
[src]
impl PartialEq<PrivateKey> for PrivateKey
[src]fn eq(&self, other: &PrivateKey) -> bool
[src]
fn ne(&self, other: &PrivateKey) -> bool
[src]
impl StructuralEq for PrivateKey
[src]
impl StructuralEq for PrivateKey
[src]impl StructuralPartialEq for PrivateKey
[src]
impl StructuralPartialEq for PrivateKey
[src]Auto Trait Implementations
impl RefUnwindSafe for PrivateKey
impl RefUnwindSafe for PrivateKey
impl Send for PrivateKey
impl Send for PrivateKey
impl Sync for PrivateKey
impl Sync for PrivateKey
impl Unpin for PrivateKey
impl Unpin for PrivateKey
impl UnwindSafe for PrivateKey
impl UnwindSafe for PrivateKey