An object with elliptic curve operations, such as tiny-secp256k1 or @bitcoinerlab/secp256k1.
Parses and analyzies a descriptor expression and destructures it into its elemental parts.
The descriptor expression to be expanded.
Optional
index?: numberThe descriptor index, if ranged.
Optional
checksumA flag indicating whether the descriptor is required to include a checksum.
false
Optional
network?: NetworkThe Bitcoin network to use.
networks.bitcoin
Optional
allowFlag to allow miniscript in P2SH.
false
Throws an error if the descriptor cannot be parsed or does not conform to the expected format.
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 ofOutput
. For backward compatibility, theDescriptor
class remains, but usingOutput
is advised.The Factory also returns utility methods like
expand
(detailed below) andparseKeyExpression
(see ParseKeyExpression).Additionally, for convenience, the function returns
BIP32
andECPair
. These are bitcoinjs-lib classes designed for managingBIP32
keys and public/private key pairs:ECPair
, respectively.