From 417602335be85008369eda7eb81a703600e0bc4f Mon Sep 17 00:00:00 2001 From: Lev Dubinets <3114081+ldub@users.noreply.github.com> Date: Thu, 20 Dec 2018 17:04:02 -0800 Subject: [PATCH] Update SignatureOptions to use BNInput for r and s As you can see here: https://github.com/indutny/elliptic/blob/master/lib/elliptic/ec/signature.js#L17-L18 options.r and options.s is fed as input to BN and thus should be typed as BNInput. Without this, I believe it is impossible to import a signature with these typings, because the number type can't hold numbers large enough for r and s. --- types/elliptic/index.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/types/elliptic/index.d.ts b/types/elliptic/index.d.ts index f819d17497..7ae7972150 100644 --- a/types/elliptic/index.d.ts +++ b/types/elliptic/index.d.ts @@ -144,8 +144,8 @@ export namespace ec { } interface SignatureOptions { - r: number; - s: number; + r: BNInput; + s: BNInput; recoveryParam?: number; }