cashscript icon indicating copy to clipboard operation
cashscript copied to clipboard

Further improve typings for 'unlock' functions

Open mr-zwets opened this issue 7 months ago • 1 comments

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

mr-zwets avatar Mar 26 '25 13:03 mr-zwets