pub struct Edwards;Expand description
HD derivation for Ed25519 curve
This type of derivation isn’t defined in any known to us standards, but it can be often found in other libraries. It is secure and efficient.
§Example
use hd_wallet::{HdWallet, Edwards, curves::Ed25519};
let parent_key: hd_wallet::ExtendedKeyPair<Ed25519> = load_key();
let child_key_pair = Edwards::derive_child_key_pair_with_path(
&parent_key,
[1 + hd_wallet::H, 10],
);Trait Implementations§
Source§impl DeriveShift<Ed25519> for Edwards
impl DeriveShift<Ed25519> for Edwards
Source§fn derive_public_shift(
parent_public_key: &ExtendedPublicKey<Ed25519>,
child_index: NonHardenedIndex,
) -> DerivedShift<Ed25519>
fn derive_public_shift( parent_public_key: &ExtendedPublicKey<Ed25519>, child_index: NonHardenedIndex, ) -> DerivedShift<Ed25519>
Derives a shift for non-hardened child Read more
Source§fn derive_hardened_shift(
parent_key: &ExtendedKeyPair<Ed25519>,
child_index: HardenedIndex,
) -> DerivedShift<Ed25519>
fn derive_hardened_shift( parent_key: &ExtendedKeyPair<Ed25519>, child_index: HardenedIndex, ) -> DerivedShift<Ed25519>
Derive a shift for hardened child Read more
Auto Trait Implementations§
impl Freeze for Edwards
impl RefUnwindSafe for Edwards
impl Send for Edwards
impl Sync for Edwards
impl Unpin for Edwards
impl UnwindSafe for Edwards
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<E, S> HdWallet<E> for Swhere
E: Curve,
S: DeriveShift<E>,
impl<E, S> HdWallet<E> for Swhere
E: Curve,
S: DeriveShift<E>,
Source§fn derive_child_public_key(
parent_public_key: &ExtendedPublicKey<E>,
child_index: NonHardenedIndex,
) -> ExtendedPublicKey<E>
fn derive_child_public_key( parent_public_key: &ExtendedPublicKey<E>, child_index: NonHardenedIndex, ) -> ExtendedPublicKey<E>
Derives child extended public key from parent extended public key Read more
Source§fn derive_child_key_pair(
parent_key: &ExtendedKeyPair<E>,
child_index: impl Into<ChildIndex>,
) -> ExtendedKeyPair<E>
fn derive_child_key_pair( parent_key: &ExtendedKeyPair<E>, child_index: impl Into<ChildIndex>, ) -> ExtendedKeyPair<E>
Derives child key pair (extended secret key + public key) from parent key pair Read more
Source§fn try_derive_child_key_pair_with_path<Err>(
parent_key: &ExtendedKeyPair<E>,
path: impl IntoIterator<Item = Result<impl Into<ChildIndex>, Err>>,
) -> Result<ExtendedKeyPair<E>, Err>
fn try_derive_child_key_pair_with_path<Err>( parent_key: &ExtendedKeyPair<E>, path: impl IntoIterator<Item = Result<impl Into<ChildIndex>, Err>>, ) -> Result<ExtendedKeyPair<E>, Err>
Derives a child key pair with specified derivation path from parent key pair Read more
Source§fn derive_child_key_pair_with_path(
parent_key: &ExtendedKeyPair<E>,
path: impl IntoIterator<Item = impl Into<ChildIndex>>,
) -> ExtendedKeyPair<E>
fn derive_child_key_pair_with_path( parent_key: &ExtendedKeyPair<E>, path: impl IntoIterator<Item = impl Into<ChildIndex>>, ) -> ExtendedKeyPair<E>
Derives a child key pair with specified derivation path from parent key pair Read more
Source§fn try_derive_child_public_key_with_path<Err>(
parent_public_key: &ExtendedPublicKey<E>,
path: impl IntoIterator<Item = Result<NonHardenedIndex, Err>>,
) -> Result<ExtendedPublicKey<E>, Err>
fn try_derive_child_public_key_with_path<Err>( parent_public_key: &ExtendedPublicKey<E>, path: impl IntoIterator<Item = Result<NonHardenedIndex, Err>>, ) -> Result<ExtendedPublicKey<E>, Err>
Derives a child public key with specified derivation path Read more
Source§fn derive_child_public_key_with_path(
parent_public_key: &ExtendedPublicKey<E>,
path: impl IntoIterator<Item = NonHardenedIndex>,
) -> ExtendedPublicKey<E>
fn derive_child_public_key_with_path( parent_public_key: &ExtendedPublicKey<E>, path: impl IntoIterator<Item = NonHardenedIndex>, ) -> ExtendedPublicKey<E>
Derives a child public key with specified derivation path Read more