Struct iop_keyvault::Bip32PublicNode [−][src]
In BIP-0032 a neutered extended private key is an extended public key. This struct represents such an extended public key in a given subtree. It is able to do normal (public) derivation, signature verification, creating and validating key identifiers
Implementations
impl<C: KeyDerivationCrypto + 'static> Bip32PublicNode<C>
[src]
pub fn new(
path: Path,
xpk: <C as KeyDerivationCrypto>::ExtendedPublicKey,
subtree: &'static dyn Subtree<Suite = C>
) -> Self
[src]
path: Path,
xpk: <C as KeyDerivationCrypto>::ExtendedPublicKey,
subtree: &'static dyn Subtree<Suite = C>
) -> Self
Backdoor for advanced or fringe non-standard use-cases. Use [Bip32.master
] instead for normal use-cases.
pub fn path(&self) -> &Path
[src]
Accessor for the BIP32 path of this node
pub fn xpk(&self) -> &<C as KeyDerivationCrypto>::ExtendedPublicKey
[src]
Accessor for the extended public key of this node
pub fn subtree(&self) -> &'static dyn Subtree<Suite = C>
[src]
Accessor for the subtree of this node
pub fn derive_normal(&self, idx: i32) -> Result<Bip32PublicNode<C>>
[src]
Create a new node with normal (public) derivation with the given index.
pub fn public_key(&self) -> C::PublicKey
[src]
Creates the public key that belongs to this node for verifying authentications done by the private key.
pub fn key_id(&self) -> C::KeyId
[src]
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.
impl Bip32PublicNode<Secp256k1>
[src]
pub fn from_xpub(
path: Path,
xpub: impl AsRef<str>,
network: &'static dyn Network<Suite = Secp256k1>
) -> Result<Bip32PublicNode<Secp256k1>>
[src]
path: Path,
xpub: impl AsRef<str>,
network: &'static dyn Network<Suite = Secp256k1>
) -> Result<Bip32PublicNode<Secp256k1>>
Recreates the BIP32 public node from its parts
pub fn to_xpub(
&self,
network: &'static dyn Network<Suite = Secp256k1>
) -> String
[src]
&self,
network: &'static dyn Network<Suite = Secp256k1>
) -> String
Returns the extended public key in the BIP32 readable format with the version bytes of the network.
pub fn to_p2pkh_addr(
&self,
network: &'static dyn Network<Suite = Secp256k1>
) -> String
[src]
&self,
network: &'static dyn Network<Suite = Secp256k1>
) -> String
Returns the P2PKH address that belongs key with the version byte of the network.
Trait Implementations
impl<C: Clone + KeyDerivationCrypto + 'static> Clone for Bip32PublicNode<C>
[src]
fn clone(&self) -> Bip32PublicNode<C>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<C: KeyDerivationCrypto + 'static> Debug for Bip32PublicNode<C>
[src]
Auto Trait Implementations
impl<C> !RefUnwindSafe for Bip32PublicNode<C>
impl<C> !Send for Bip32PublicNode<C>
impl<C> !Sync for Bip32PublicNode<C>
impl<C> Unpin for Bip32PublicNode<C> where
<C as KeyDerivationCrypto>::ExtendedPublicKey: Unpin,
<C as KeyDerivationCrypto>::ExtendedPublicKey: Unpin,
impl<C> !UnwindSafe for Bip32PublicNode<C>
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,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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.
pub 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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,