Struct iop_keyvault::Bip44PublicKey
source · [−]pub struct Bip44PublicKey<C: KeyDerivationCrypto + 'static> { /* private fields */ }
Expand description
Represents a public key with a given index used on the chain for verifying signatures or validating key identifiers.
Implementations
sourceimpl<C: KeyDerivationCrypto + 'static> Bip44PublicKey<C>
impl<C: KeyDerivationCrypto + 'static> Bip44PublicKey<C>
sourcepub fn new(
path: Bip44KeyPath,
network: &'static dyn Network<Suite = C>,
node: Bip32PublicNode<C>
) -> Self
pub fn new(
path: Bip44KeyPath,
network: &'static dyn Network<Suite = C>,
node: Bip32PublicNode<C>
) -> Self
Backdoor to mount a BIP44 key at any place in the BIP32 tree. Use only for implementing advanced or fringe non-standard use-cases.
sourcepub fn node(&self) -> &Bip32PublicNode<C>
pub fn node(&self) -> &Bip32PublicNode<C>
Accessor for the underlying BIP32 node.
sourcepub fn bip44_path(&self) -> &Bip44KeyPath
pub fn bip44_path(&self) -> &Bip44KeyPath
Accessor for the BIP44 path of the key.
sourcepub fn bip32_path(&self) -> &Path
pub fn bip32_path(&self) -> &Path
Accessor for the BIP32 path of the key.
sourcepub fn to_public_key(&self) -> C::PublicKey
pub fn to_public_key(&self) -> C::PublicKey
Creates the public key for verifying authentications done by this key.
sourcepub fn to_key_id(&self) -> C::KeyId
pub fn to_key_id(&self) -> C::KeyId
Creates the key identifier for the public key. This is an extra layer of security for single-use keys, so the revealing of the public key can be delayed to the point when the authenticated action (spending some coin or revoking access) makes the public key irrelevant after the action is successful.
sourceimpl Bip44PublicKey<Secp256k1>
impl Bip44PublicKey<Secp256k1>
sourcepub fn to_p2pkh_addr(&self) -> String
pub fn to_p2pkh_addr(&self) -> String
Returns the P2PKH address that belongs key with the version byte of the network.
Trait Implementations
sourceimpl<C: Clone + KeyDerivationCrypto + 'static> Clone for Bip44PublicKey<C>
impl<C: Clone + KeyDerivationCrypto + 'static> Clone for Bip44PublicKey<C>
sourcefn clone(&self) -> Bip44PublicKey<C>
fn clone(&self) -> Bip44PublicKey<C>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<C: Debug + KeyDerivationCrypto + 'static> Debug for Bip44PublicKey<C>
impl<C: Debug + KeyDerivationCrypto + 'static> Debug for Bip44PublicKey<C>
Auto Trait Implementations
impl<C> !RefUnwindSafe for Bip44PublicKey<C>
impl<C> !Send for Bip44PublicKey<C>
impl<C> !Sync for Bip44PublicKey<C>
impl<C> Unpin for Bip44PublicKey<C> where
<C as KeyDerivationCrypto>::ExtendedPublicKey: Unpin,
impl<C> !UnwindSafe for Bip44PublicKey<C>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more