Skip to content

Commit

Permalink
PresetCurve
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeSchwert committed Mar 11, 2024
1 parent 9f477d4 commit 77dedea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/x-client/src/utils/stark/legacy/crypto/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ const order = new BN(
16,
);

// eslint-disable-next-line @typescript-eslint/naming-convention
const { PresetCurve }: typeof elliptic.curves = elliptic.curves;

// eslint-disable-next-line new-cap
const starkEc = new elliptic.ec(
new elliptic.curves.PresetCurve({
new PresetCurve({
type: 'short',
prime: null,
p: prime as any,
Expand Down
5 changes: 4 additions & 1 deletion packages/x-client/src/utils/stark/starkCurve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ export const starkEcOrder = new BN(
16,
);

// eslint-disable-next-line @typescript-eslint/naming-convention
const { PresetCurve }: typeof elliptic.curves = elliptic.curves;

// eslint-disable-next-line new-cap
export const starkEc = new elliptic.ec(
new elliptic.curves.PresetCurve({
new PresetCurve({
type: 'short',
prime: null,
p: '08000000 00000011 00000000 00000000 00000000 00000000 00000000 00000001',
Expand Down

0 comments on commit 77dedea

Please sign in to comment.