[−][src]Struct komodo_rpc_client::Privkey
A Bitcoin ECDSA private key
Fields
compressed: bool
Whether this private key represents a compressed address
network: Network
The network on which this key should be used
key: SecretKey
The actual ECDSA key
Implementations
impl Privkey
[src]
pub fn from_secret_key(
key: SecretKey,
compressed: bool,
network: Network
) -> Privkey
[src]
key: SecretKey,
compressed: bool,
network: Network
) -> Privkey
Creates a Privkey
from a raw secp256k1 secret key
pub fn public_key<C>(&self, secp: &Secp256k1<C>) -> PublicKey where
C: Signing,
[src]
C: Signing,
Computes the public key as supposed to be used with this secret
pub fn to_address<C>(&self, secp: &Secp256k1<C>) -> Address where
C: Signing,
[src]
C: Signing,
Converts a private key to a segwit address
pub fn to_legacy_address<C>(&self, secp: &Secp256k1<C>) -> Address where
C: Signing,
[src]
C: Signing,
Converts a private key to a legacy (non-segwit) address
pub fn secret_key(&self) -> &SecretKey
[src]
Accessor for the underlying secp key
pub fn into_secret_key(self) -> SecretKey
[src]
Accessor for the underlying secp key that consumes the privkey
pub fn network(&self) -> Network
[src]
Accessor for the network type
pub fn is_compressed(&self) -> bool
[src]
Accessor for the compressed flag
Trait Implementations
impl Clone for Privkey
[src]
impl Display for Privkey
[src]
impl Eq for Privkey
[src]
impl FromStr for Privkey
[src]
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<Privkey, Error>
[src]
impl PartialEq<Privkey> for Privkey
[src]
impl StructuralEq for Privkey
[src]
impl StructuralPartialEq for Privkey
[src]
Auto Trait Implementations
impl RefUnwindSafe for Privkey
impl Send for Privkey
impl Sync for Privkey
impl Unpin for Privkey
impl UnwindSafe for Privkey
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<Q, K> Equivalent<K> for Q where
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
[src]
K: Borrow<Q> + ?Sized,
Q: Eq + ?Sized,
fn equivalent(&self, key: &K) -> bool
[src]
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,