Expansion: {
    payment?: Payment;
    expandedExpression?: string;
    miniscript?: string;
    expansionMap?: ExpansionMap;
    isSegwit?: boolean;
    expandedMiniscript?: string;
    redeemScript?: Buffer;
    witnessScript?: Buffer;
    isRanged: boolean;
    canonicalExpression: string;
}

DescriptorsFactory creates and returns the expand() function that parses a descriptor expression and destructures it into its elemental parts. Expansion is the type that expand() returns.

Type declaration

  • Optional payment?: Payment

    The corresponding bitcoinjs-lib Payment for the provided expression, if applicable.

  • Optional expandedExpression?: string

    The expanded descriptor expression. See ExpansionMap for a detailed explanation.

  • Optional miniscript?: string

    The extracted miniscript from the expression, if any.

  • Optional expansionMap?: ExpansionMap

    A map of key expressions in the descriptor to their corresponding expanded keys. See ExpansionMap for a detailed explanation.

  • Optional isSegwit?: boolean

    A boolean indicating whether the descriptor uses SegWit.

  • Optional expandedMiniscript?: string

    The expanded miniscript, if any. It corresponds to the expandedExpression without the top-level script expression.

  • Optional redeemScript?: Buffer

    The redeem script for the descriptor, if applicable.

  • Optional witnessScript?: Buffer

    The witness script for the descriptor, if applicable.

  • isRanged: boolean

    Whether the descriptor is a ranged-descriptor.

  • canonicalExpression: string

    This is the preferred or authoritative representation of an output descriptor expression. It removes the checksum and, if it is a ranged-descriptor, it particularizes it to its index.