Function parse_descriptor

Source
pub fn parse_descriptor<C: Signing>(
    secp: &Secp256k1<C>,
    s: &str,
) -> Result<(Descriptor<DescriptorPublicKey>, KeyMap), Error>
Expand description

Parse a descriptor that may contain secret keys

Internally turns every secret key found into the corresponding public key and then returns a a descriptor that only contains public keys and a map to lookup the secret key given a public key.

Re-implements parse_descriptor from miniscript/descriptor to handle MultiXPrivs by replacing each MultiXPriv with an indexed dummy SinglePub and adding the MultiXpriv to the key map.