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

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

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

Private((ExtendedPrivKey, PhantomData<Ctx>))

A private extended key, aka an xprv

Tuple Fields of Private

0: (ExtendedPrivKey, PhantomData<Ctx>)
Public((ExtendedPubKey, PhantomData<Ctx>))

A public extended key, aka an xpub

Tuple Fields of Public

0: (ExtendedPubKey, PhantomData<Ctx>)

Implementations

Return whether or not the key contains the private data

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

Transform the ExtendedKey into an ExtendedPubKey for the given [Network]

Trait Implementations

Identity conversion

Consume self and turn it into an ExtendedKey Read more

Consume self and turn it into a DescriptorKey by adding the extra metadata, such as key origin and derivation path Read more

Performs the conversion.

Performs the conversion.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.