Skip to content

Commit aedd895

Browse files
committed
fix: make Typescript compiler happy with constant types
1 parent 5a4a318 commit aedd895

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/constants.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1+
import BN from 'bn.js';
2+
13
import { toBN } from './utils/number';
24

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

5-
export const ZERO = toBN(0);
6-
export const ONE = toBN(1);
7-
export const TWO = toBN(2);
8-
export const MASK_250 = TWO.pow(toBN(250)).sub(ONE); // 2 ** 250 - 1
7+
export const ZERO: BN = toBN(0);
8+
export const ONE: BN = toBN(1);
9+
export const TWO: BN = toBN(2);
10+
export const MASK_250: BN = TWO.pow(toBN(250)).sub(ONE); // 2 ** 250 - 1
911

1012
/**
1113
* 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

0 commit comments

Comments
 (0)