Closed dhruvkelawala closed 1 year ago
Class can't be exported. It's dynamically generated.
But is it possible to export a better typing than SignatureConstructor?
Can you provide a code that shows how is it broken?
Seems fine to me.
This is the issue when trying to be explicit about Signature
return type
https://github.com/paulmillr/noble-curves/blob/65d7256b9e8ecffdf57bfe61b65158a21ac348c9/src/abstract/weierstrass.ts#L767
Why are we exporting Signature of type
SignatureConstructor
and notSignature
class?https://github.com/paulmillr/noble-curves/blob/65d7256b9e8ecffdf57bfe61b65158a21ac348c9/src/abstract/weierstrass.ts#L928
This breaks the type inference (when being explicit) using
sign
method in stark.ts because it returnsSignatureType
which needs to be imported fromweierstrass.ts
. I think Signature Class should be exported fromweierstrass.ts
instead of SignatureConstructor