Enum bdk::keys::ExtendedKey[][src]

pub enum ExtendedKey<Ctx: ScriptContext = Legacy> {
    Private((ExtendedPrivKey, PhantomData<Ctx>)),
    Public((ExtendedPubKey, PhantomData<Ctx>)),
}

Enum for extended keys that can be either xprv or xpub

An instance of ExtendedKey can be constructed from an ExtendedPrivKey or an ExtendedPubKey by using the From trait.

Defaults to the Legacy context.

Variants

A private extended key, aka an xprv

A public extended key, aka an xpub

Implementations

impl<Ctx: ScriptContext> ExtendedKey<Ctx>[src]

pub fn has_secret(&self) -> bool[src]

Return whether or not the key contains the private data

pub fn into_xprv(self, network: Network) -> Option<ExtendedPrivKey>[src]

Transform the ExtendedKey into an ExtendedPrivKey for the given Network, if the key contains the private data

pub fn into_xpub<C: Signing>(
    self,
    network: Network,
    secp: &Secp256k1<C>
) -> ExtendedPubKey
[src]

Transform the ExtendedKey into an ExtendedPubKey for the given Network

Trait Implementations

impl<Ctx: ScriptContext> DerivableKey<Ctx> for ExtendedKey<Ctx>[src]

Identity conversion

impl<Ctx: ScriptContext> From<ExtendedPrivKey> for ExtendedKey<Ctx>[src]

impl<Ctx: ScriptContext> From<ExtendedPubKey> for ExtendedKey<Ctx>[src]

Auto Trait Implementations

impl<Ctx> RefUnwindSafe for ExtendedKey<Ctx> where
    Ctx: RefUnwindSafe

impl<Ctx> Send for ExtendedKey<Ctx> where
    Ctx: Send

impl<Ctx> Sync for ExtendedKey<Ctx> where
    Ctx: Sync

impl<Ctx> Unpin for ExtendedKey<Ctx> where
    Ctx: Unpin

impl<Ctx> UnwindSafe for ExtendedKey<Ctx> where
    Ctx: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,