Skip to content

Narrower return types than P2Ret #21

@kyranjamie

Description

@kyranjamie

Currently P2Ret acts as a catch-all for the payment methods. It'd be more developer/typescript friendly to avoid the optional props, and return narrower payment-specific types.

For example, if I call the p2sh method, the compiler should know that redeemScript is defined. Usage of the library would be cleaner, in that fewer potentially undefined checks are needed.

(and thanks for all the great work Paul, this lib is a godsend)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions