Enum bdk_debug::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§
source§impl 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§
source§impl Debug for DescriptorSecretKey
impl Debug for DescriptorSecretKey
source§impl Display for DescriptorSecretKey
impl Display for DescriptorSecretKey
source§impl FromStr for DescriptorSecretKey
impl FromStr for DescriptorSecretKey
§type Err = DescriptorKeyParseError
type Err = DescriptorKeyParseError
The associated error which can be returned from parsing.
source§fn 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 moresource§impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for DescriptorSecretKey
impl<Ctx: ScriptContext> IntoDescriptorKey<Ctx> for DescriptorSecretKey
source§fn 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 ScriptContextAuto Trait Implementations§
impl RefUnwindSafe for DescriptorSecretKey
impl Send for DescriptorSecretKey
impl Sync for DescriptorSecretKey
impl Unpin for DescriptorSecretKey
impl UnwindSafe for DescriptorSecretKey
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more