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

    Function DescriptorsFactory

    • Constructs the necessary functions and classes for working with descriptors using an external elliptic curve (ecc) library.

      Notably, it returns the Output class, which provides methods to create, sign, and finalize PSBTs based on descriptor expressions.

      While this Factory function includes the Descriptor class, note that this class was deprecated in v2.0 in favor of Output. For backward compatibility, the Descriptor class remains, but using Output is advised.

      The Factory also returns utility methods like expand (detailed below) and parseKeyExpression (see ParseKeyExpression).

      Additionally, for convenience, the function returns BIP32 and ECPair. These are bitcoinjs-lib classes designed for managing BIP32 keys and public/private key pairs: ECPair, respectively.

      Parameters

      Returns {
          Output: typeof Output;
          parseKeyExpression: ParseKeyExpression;
          expand: (
              params: {
                  descriptor: string;
                  index?: number;
                  checksumRequired?: boolean;
                  network?: Network;
                  allowMiniscriptInP2SH?: boolean;
              },
          ) => Expansion;
          ECPair: ECPairAPI;
          BIP32: BIP32API;
      }

      • Output: typeof Output
      • parseKeyExpression: ParseKeyExpression

        Takes a string key expression (xpub, xprv, pubkey or wif) and parses it

      • expand: (
            params: {
                descriptor: string;
                index?: number;
                checksumRequired?: boolean;
                network?: Network;
                allowMiniscriptInP2SH?: boolean;
            },
        ) => Expansion
      • ECPair: ECPairAPI
      • BIP32: BIP32API