Trait DeriveShift

Source
pub trait DeriveShift<E: Curve> {
    // Required methods
    fn derive_public_shift(
        parent_public_key: &ExtendedPublicKey<E>,
        child_index: NonHardenedIndex,
    ) -> DerivedShift<E>;
    fn derive_hardened_shift(
        parent_key: &ExtendedKeyPair<E>,
        child_index: HardenedIndex,
    ) -> DerivedShift<E>;
}
Expand description

Core functionality of HD wallet derivation, everything is defined on top of it

Required Methods§

Source

fn derive_public_shift( parent_public_key: &ExtendedPublicKey<E>, child_index: NonHardenedIndex, ) -> DerivedShift<E>

Derives a shift for non-hardened child

We support only HD derivations that are always defined. This function may not panic.

Source

fn derive_hardened_shift( parent_key: &ExtendedKeyPair<E>, child_index: HardenedIndex, ) -> DerivedShift<E>

Derive a shift for hardened child

We support only HD derivations that are always defined. This function may not panic.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§