From 3b146838068305ece7441211f7f4bcd1d20765ea Mon Sep 17 00:00:00 2001 From: Eric Ho Date: Wed, 11 Oct 2023 18:41:11 +0100 Subject: [PATCH 1/2] Update weierstrass.ts --- src/abstract/weierstrass.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/abstract/weierstrass.ts b/src/abstract/weierstrass.ts index 82e7d42..aecbeb3 100644 --- a/src/abstract/weierstrass.ts +++ b/src/abstract/weierstrass.ts @@ -123,6 +123,7 @@ function validatePointOpts(curve: CurvePointsType) { } export type CurvePointsRes = { + CURVE: ReturnType>; ProjectivePoint: ProjConstructor; normPrivateKeyToScalar: (key: PrivKey) => bigint; weierstrassEquation: (x: T) => T; From 02099b9b4cc5e4f2a2028c9ed05c56f7d304306a Mon Sep 17 00:00:00 2001 From: Eric Ho Date: Wed, 11 Oct 2023 19:16:56 +0100 Subject: [PATCH 2/2] Add weierstrassPoints return type --- src/abstract/weierstrass.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/abstract/weierstrass.ts b/src/abstract/weierstrass.ts index aecbeb3..06a46bb 100644 --- a/src/abstract/weierstrass.ts +++ b/src/abstract/weierstrass.ts @@ -188,7 +188,7 @@ export const DER = { // prettier-ignore const _0n = BigInt(0), _1n = BigInt(1), _2n = BigInt(2), _3n = BigInt(3), _4n = BigInt(4); -export function weierstrassPoints(opts: CurvePointsType) { +export function weierstrassPoints(opts: CurvePointsType): CurvePointsRes { const CURVE = validatePointOpts(opts); const { Fp } = CURVE; // All curves has same field / group length as for now, but they can differ