@bitcoinerlab/descriptors - v2.3.4
    Preparing search index...

    Interface ParseKeyExpression

    The DescriptorsFactory function creates and returns the parseKeyExpression function, which is an implementation of this interface.

    It parses and destructures a key expression string (xpub, xprv, pubkey or wif) into KeyInfo.

    For example, given this keyExpression: [d34db33f/49'/0'/0']tpubDCdxmvzJ5QBjTN8oCjjyT2V58AyZvA1fkmCeZRC75QMoaHcVP2m45Bv3hmnR7ttAwkb2UNYyoXdHVt4gwBqRrJqLUU2JrM43HippxiWpHra/1/2/3/4/*, this is the parsed result:

     {
    keyExpression:
    "[d34db33f/49'/0'/0']tpubDCdxmvzJ5QBjTN8oCjjyT2V58AyZvA1fkmCeZRC75QMoaHcVP2m45Bv3hmnR7ttAwkb2UNYyoXdHVt4gwBqRrJqLUU2JrM43HippxiWpHra/1/2/3/4/*",
    keyPath: '/1/2/3/4/*',
    originPath: "/49'/0'/0'",
    path: "m/49'/0'/0'/1/2/3/4/*",
    // Other relevant properties of the type `KeyInfo`: `pubkey`, `ecpair` & `bip32` interfaces, `masterFingerprint`, etc.
    }

    See KeyInfo for the complete list of elements retrieved by this function.

    • Parameters

      • params: {
            keyExpression: string;
            isSegwit?: boolean;
            isTaproot?: boolean;
            network?: Network;
        }
        • keyExpression: string
        • OptionalisSegwit?: boolean

          Indicates if this key expression belongs to a a SegWit output. When set, further checks are done to ensure the public key (if present in the expression) is compressed (33 bytes).

        • OptionalisTaproot?: boolean

          Indicates if this key expression belongs to a Taproot output. For Taproot, the key must be represented as an x-only public key (32 bytes). If a 33-byte compressed pubkey is derived, it is converted to its x-only representation.

        • Optionalnetwork?: Network

      Returns KeyInfo