pub fn to_public<C: Signing>(
        &self,
        secp: &Secp256k1<C>,
    ) -> Result<DescriptorPublicKey, DescriptorKeyParseError> {
        let pk = match self {
            DescriptorSecretKey::Single(prv) => DescriptorPublicKey::Single(prv.to_public(secp)),
            DescriptorSecretKey::XPrv(xprv) => DescriptorPublicKey::XPub(xprv.to_public(secp)?),
        };

        Ok(pk)
    }
/// 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.
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.
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 .
pub fn to_public<C: Signing>(
        &self,
        secp: &Secp256k1<C>,
    ) -> Result<DescriptorPublicKey, DescriptorKeyParseError> {
        let pk = match self {
            DescriptorSecretKey::Single(prv) => DescriptorPublicKey::Single(prv.to_public(secp)),
            DescriptorSecretKey::XPrv(xprv) => DescriptorPublicKey::XPub(xprv.to_public(secp)?),
        };
        Ok(pk)
    }
pub fn to_public < C : Signing > ( & self , secp : & Secp256k1 < C > , ) -> Result < DescriptorPublicKey , DescriptorKeyParseError > { let pk = match self { DescriptorSecretKey :: Single ( prv ) => DescriptorPublicKey :: Single ( prv . to_public ( secp ) ) , DescriptorSecretKey :: XPrv ( xprv ) => DescriptorPublicKey :: XPub ( xprv . to_public ( secp ) ? ) , } ; Ok ( pk ) }
Returns the public version of this key.
Returns the public version of this key .
&self
secp
&Secp256k1<C>
&self
secp
&Secp256k1<C>