Enum miniscript::descriptor::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: Signing>(
&self,
secp: &Secp256k1<C>
) -> Result<DescriptorPublicKey, DescriptorKeyParseError>
pub fn as_public<C: Signing>(
&self,
secp: &Secp256k1<C>
) -> Result<DescriptorPublicKey, DescriptorKeyParseError>
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.