Enum bdk::keys::DescriptorSecretKey
source · pub enum DescriptorSecretKey {
Single(SinglePriv),
XPrv(DescriptorXKey<ExtendedPrivKey>),
}
Expand description
The descriptor secret key, either a single private key or an xprv.
Variants
Single(SinglePriv)
Single private key.
XPrv(DescriptorXKey<ExtendedPrivKey>)
Extended private key (xpriv).
Implementations
sourceimpl DescriptorSecretKey
impl DescriptorSecretKey
sourcepub fn to_public<C>(
&self,
secp: &Secp256k1<C>
) -> Result<DescriptorPublicKey, DescriptorKeyParseError>where
C: Signing,
pub fn to_public<C>(
&self,
secp: &Secp256k1<C>
) -> Result<DescriptorPublicKey, DescriptorKeyParseError>where
C: Signing,
Returns the public version of this key.
If the key is an “XPrv”, the hardened derivation steps will be applied before converting it to a public key.
Trait Implementations
sourceimpl Debug for DescriptorSecretKey
impl Debug for DescriptorSecretKey
sourceimpl Display for DescriptorSecretKey
impl Display for DescriptorSecretKey
sourceimpl FromStr for DescriptorSecretKey
impl FromStr for DescriptorSecretKey
type Err = DescriptorKeyParseError
type Err = DescriptorKeyParseError
The associated error which can be returned from parsing.
sourcefn from_str(
s: &str
) -> Result<DescriptorSecretKey, <DescriptorSecretKey as FromStr>::Err>
fn from_str(
s: &str
) -> Result<DescriptorSecretKey, <DescriptorSecretKey as FromStr>::Err>
Parses a string
s
to return a value of this type. Read moresourceimpl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for DescriptorSecretKey
impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for DescriptorSecretKey
sourcefn into_descriptor_key(self) -> Result<DescriptorKey<Ctx>, KeyError>
fn into_descriptor_key(self) -> Result<DescriptorKey<Ctx>, KeyError>
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more