Skip to content

Commit

Permalink
fix: make Typescript compiler happy with constant types
Browse files Browse the repository at this point in the history
  • Loading branch information
corbt committed Nov 21, 2021
1 parent 5a4a318 commit aedd895
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import BN from 'bn.js';

import { toBN } from './utils/number';

export { IS_BROWSER } from './utils/encode';

export const ZERO = toBN(0);
export const ONE = toBN(1);
export const TWO = toBN(2);
export const MASK_250 = TWO.pow(toBN(250)).sub(ONE); // 2 ** 250 - 1
export const ZERO: BN = toBN(0);
export const ONE: BN = toBN(1);
export const TWO: BN = toBN(2);
export const MASK_250: BN = TWO.pow(toBN(250)).sub(ONE); // 2 ** 250 - 1

/**
* The following is taken from https://github.com/starkware-libs/starkex-resources/blob/master/crypto/starkware/crypto/signature/pedersen_params.json but converted to hex, because JS is very bad handling big integers by default
Expand Down

0 comments on commit aedd895

Please sign in to comment.