Enum bdk::keys::DescriptorSecretKey [−][src]
pub enum DescriptorSecretKey { SinglePriv(DescriptorSinglePriv), XPrv(DescriptorXKey<ExtendedPrivKey>), }
Expand description
A Secret Key that can be either a single key or an Xprv
Variants
SinglePriv(DescriptorSinglePriv)
Single Secret Key
XPrv(DescriptorXKey<ExtendedPrivKey>)
Xprv
Implementations
pub fn as_public<C>(
&self,
secp: &Secp256k1<C>
) -> Result<DescriptorPublicKey, DescriptorKeyParseError> where
C: Signing,
[src]
pub fn as_public<C>(
&self,
secp: &Secp256k1<C>
) -> Result<DescriptorPublicKey, DescriptorKeyParseError> where
C: Signing,
[src]Return the public version of this key, by applying either
DescriptorSinglePriv::as_public
or DescriptorXKey<bip32::ExtendedPrivKey>::as_public
depending on the type of key.
If the key is an “XPrv”, the hardened derivation steps will be applied before converting it
to a public key. See the documentation of DescriptorXKey<bip32::ExtendedPrivKey>::as_public
for more details.
Trait Implementations
type Err = DescriptorKeyParseError
type Err = DescriptorKeyParseError
The associated error which can be returned from parsing.
pub fn from_str(
s: &str
) -> Result<DescriptorSecretKey, <DescriptorSecretKey as FromStr>::Err>
[src]
pub fn from_str(
s: &str
) -> Result<DescriptorSecretKey, <DescriptorSecretKey as FromStr>::Err>
[src]Parses a string s
to return a value of this type. Read more
Turn the key into a DescriptorKey
within the requested ScriptContext
Auto Trait Implementations
impl RefUnwindSafe for DescriptorSecretKey
impl Send for DescriptorSecretKey
impl Sync for DescriptorSecretKey
impl Unpin for DescriptorSecretKey
impl UnwindSafe for DescriptorSecretKey
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V