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: Signing>(
&self,
secp: &Secp256k1<C>
) -> Result<DescriptorPublicKey, DescriptorKeyParseError>
pub fn to_public<C: Signing>( &self, secp: &Secp256k1<C> ) -> Result<DescriptorPublicKey, DescriptorKeyParseError>
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
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§
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