Enum bdk::keys::ExtendedKey [−][src]
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
Public((ExtendedPubKey, PhantomData<Ctx>))
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]
self,
network: Network,
secp: &Secp256k1<C>
) -> ExtendedPubKey
Transform the ExtendedKey
into an ExtendedPubKey
for the
given Network
Trait Implementations
impl<Ctx: ScriptContext> DerivableKey<Ctx> for ExtendedKey<Ctx>
[src]
Identity conversion
fn into_extended_key(self) -> Result<ExtendedKey<Ctx>, KeyError>
[src]
fn into_descriptor_key(
self,
origin: Option<KeySource>,
derivation_path: DerivationPath
) -> Result<DescriptorKey<Ctx>, KeyError>
[src]
self,
origin: Option<KeySource>,
derivation_path: DerivationPath
) -> Result<DescriptorKey<Ctx>, KeyError>
impl<Ctx: ScriptContext> From<ExtendedPrivKey> for ExtendedKey<Ctx>
[src]
fn from(xprv: ExtendedPrivKey) -> Self
[src]
impl<Ctx: ScriptContext> From<ExtendedPubKey> for ExtendedKey<Ctx>
[src]
fn from(xpub: ExtendedPubKey) -> Self
[src]
Auto Trait Implementations
impl<Ctx> RefUnwindSafe for ExtendedKey<Ctx> where
Ctx: RefUnwindSafe,
Ctx: RefUnwindSafe,
impl<Ctx> Send for ExtendedKey<Ctx> where
Ctx: Send,
Ctx: Send,
impl<Ctx> Sync for ExtendedKey<Ctx> where
Ctx: Sync,
Ctx: Sync,
impl<Ctx> Unpin for ExtendedKey<Ctx> where
Ctx: Unpin,
Ctx: Unpin,
impl<Ctx> UnwindSafe for ExtendedKey<Ctx> where
Ctx: UnwindSafe,
Ctx: UnwindSafe,
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> Instrument for T
[src]
pub fn instrument(self, span: Span) -> Instrumented<Self>
[src]
pub fn in_current_span(self) -> Instrumented<Self>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Pointable for T
pub const ALIGN: usize
type Init = T
The type for initializers.
pub unsafe fn init(init: <T as Pointable>::Init) -> usize
pub unsafe fn deref<'a>(ptr: usize) -> &'a T
pub unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T
pub unsafe fn drop(ptr: usize)
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]
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>,