Struct iop_keyvault::Bip32Node [−][src]
In BIP-0032 each extended private key has the same operations, independently from the actual path. This struct represents such an extended private key in a given subtree.
Implementations
impl<C: KeyDerivationCrypto + 'static> Bip32Node<C>
[src]
pub fn new(
path: Path,
xsk: <C as KeyDerivationCrypto>::ExtendedPrivateKey,
subtree: &'static dyn Subtree<Suite = C>
) -> Self
[src]
path: Path,
xsk: <C as KeyDerivationCrypto>::ExtendedPrivateKey,
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 xsk(&self) -> &<C as KeyDerivationCrypto>::ExtendedPrivateKey
[src]
Accessor for the extended private key of this node
pub fn subtree(&self) -> &'static dyn Subtree<Suite = C>
[src]
Accessor for the subtree of this node
pub fn neuter(&self) -> Bip32PublicNode<C>
[src]
Removes the ability to sign and derive hardened keys. The public node it returns is still able to provide normal derivation and signature verifications.
pub fn derive_normal(&self, idx: i32) -> Result<Bip32Node<C>>
[src]
Create a new node with normal (public) derivation with the given index.
pub fn derive_hardened(&self, idx: i32) -> Result<Bip32Node<C>>
[src]
Create a new node with hardened (private) derivation with the given index.
pub fn private_key(&self) -> C::PrivateKey
[src]
Creates the private key that belongs to this node for authenticating actions.
impl Bip32Node<Secp256k1>
[src]
pub fn from_xprv(
path: Path,
xprv: impl AsRef<str>,
network: &'static dyn Network<Suite = Secp256k1>
) -> Result<Bip32Node<Secp256k1>>
[src]
path: Path,
xprv: impl AsRef<str>,
network: &'static dyn Network<Suite = Secp256k1>
) -> Result<Bip32Node<Secp256k1>>
Recreates the BIP32 node from its parts
pub fn to_xprv(
&self,
network: &'static dyn Network<Suite = Secp256k1>
) -> String
[src]
&self,
network: &'static dyn Network<Suite = Secp256k1>
) -> String
Returns the extended private key in the BIP32 readable format with the version bytes of the network.
pub fn to_wif(&self, network: &'static dyn Network<Suite = Secp256k1>) -> String
[src]
Returns the private key in the Wallet Import Format with the version byte of the network.
Trait Implementations
impl<C: Clone + KeyDerivationCrypto + 'static> Clone for Bip32Node<C>
[src]
impl<C: KeyDerivationCrypto + 'static> Debug for Bip32Node<C>
[src]
Auto Trait Implementations
impl<C> !RefUnwindSafe for Bip32Node<C>
impl<C> !Send for Bip32Node<C>
impl<C> !Sync for Bip32Node<C>
impl<C> Unpin for Bip32Node<C> where
<C as KeyDerivationCrypto>::ExtendedPrivateKey: Unpin,
<C as KeyDerivationCrypto>::ExtendedPrivateKey: Unpin,
impl<C> !UnwindSafe for Bip32Node<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>,