[−][src]Trait bdk::keys::DerivableKey
Trait for keys that can be derived.
When extra metadata are provided, a DerivableKey
can be transofrmed into a
DescriptorKey
: the trait ToDescriptorKey
is automatically implemented
for (DerivableKey, DerivationPath)
and
(DerivableKey, KeySource, DerivationPath)
tuples.
For key types that don't encode any indication about the path to use (like bip39), it's
generally recommended to implemented this trait instead of ToDescriptorKey
. The same
rules regarding script context and valid networks apply.
Required methods
pub fn add_metadata(
self,
origin: Option<KeySource>,
derivation_path: DerivationPath
) -> Result<DescriptorKey<Ctx>, KeyError>
[src]
self,
origin: Option<KeySource>,
derivation_path: DerivationPath
) -> Result<DescriptorKey<Ctx>, KeyError>
Add a extra metadata, consume self
and turn it into a DescriptorKey
Implementations on Foreign Types
impl<Ctx: ScriptContext> DerivableKey<Ctx> for Seed
[src]
This is supported on crate feature
keys-bip39
only.pub fn add_metadata(
self,
source: Option<KeySource>,
derivation_path: DerivationPath
) -> Result<DescriptorKey<Ctx>, KeyError>
[src]
self,
source: Option<KeySource>,
derivation_path: DerivationPath
) -> Result<DescriptorKey<Ctx>, KeyError>
impl<Ctx: ScriptContext> DerivableKey<Ctx> for Mnemonic
[src]
This is supported on crate feature
keys-bip39
only.pub fn add_metadata(
self,
source: Option<KeySource>,
derivation_path: DerivationPath
) -> Result<DescriptorKey<Ctx>, KeyError>
[src]
self,
source: Option<KeySource>,
derivation_path: DerivationPath
) -> Result<DescriptorKey<Ctx>, KeyError>
impl<Ctx: ScriptContext> DerivableKey<Ctx> for ExtendedPubKey
[src]
pub fn add_metadata(
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> DerivableKey<Ctx> for ExtendedPrivKey
[src]
pub fn add_metadata(
self,
origin: Option<KeySource>,
derivation_path: DerivationPath
) -> Result<DescriptorKey<Ctx>, KeyError>
[src]
self,
origin: Option<KeySource>,
derivation_path: DerivationPath
) -> Result<DescriptorKey<Ctx>, KeyError>
Implementors
impl<Ctx, K> DerivableKey<Ctx> for GeneratedKey<K, Ctx> where
Ctx: ScriptContext,
K: DerivableKey<Ctx>,
[src]
Ctx: ScriptContext,
K: DerivableKey<Ctx>,
pub fn add_metadata(
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> DerivableKey<Ctx> for MnemonicWithPassphrase
[src]
This is supported on crate feature
keys-bip39
only.pub fn add_metadata(
self,
source: Option<KeySource>,
derivation_path: DerivationPath
) -> Result<DescriptorKey<Ctx>, KeyError>
[src]
self,
source: Option<KeySource>,
derivation_path: DerivationPath
) -> Result<DescriptorKey<Ctx>, KeyError>