Skip to content

Further improve typings for 'unlock' functions #297

Open
@mr-zwets

Description

@mr-zwets

now it gives type hints without the aliases for the different arguments, and gives all the union types which makes everything hard to read:

transfer: (functionParameters_0: string | Uint8Array<ArrayBufferLike> | SignatureTemplate) => Unlocker
spend: (functionParameters_0: string | Uint8Array<ArrayBufferLike>, functionParameters_1: string | Uint8Array<ArrayBufferLike> | SignatureTemplate) => Unlocker

where we would want something like:

transfer: (recipientSig: SignatureType) => Unlocker
spend: (pk: PubKeyType, sig: SignatureType) => Unlocker

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestjavascript-sdkRelates to the CashScript JavaScript SDK

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions