Align bigint constans with those in BN (#1716)

This commit is contained in:
Jaco
2023-01-26 09:31:41 +02:00
committed by GitHub
parent 5147f64a64
commit 5b5cdae9ff
2 changed files with 76 additions and 3 deletions
+7
View File
@@ -2,8 +2,15 @@
## master
Contributed:
- Ledger support for Ternoa (Thanks to https://github.com/mohsinriaz17)
Changes:
- Expand `arrayChunk` tests
- Adjust output for Ledger saninity checks
- Expand exported `bigint` constants to match with those in `BN`
- Upgrade dependencies to latest stable versions
+69 -3
View File
@@ -15,21 +15,87 @@ export const _0n = BigInt(0);
*/
export const _1n = BigInt(1);
/**
* @name _2n
* @summary BigInt constant for 2.
*/
export const _2n = BigInt(2);
/**
* @name _3n
* @summary BigInt constant for 3.
*/
export const _3n = BigInt(3);
/**
* @name _4n
* @summary BigInt constant for 4.
*/
export const _4n = BigInt(4);
/**
* @name _5n
* @summary BigInt constant for 5.
*/
export const _5n = BigInt(5);
/**
* @name _6n
* @summary BigInt constant for 6.
*/
export const _6n = BigInt(6);
/**
* @name _7n
* @summary BigInt constant for 7.
*/
export const _7n = BigInt(7);
/**
* @name _8n
* @summary BigInt constant for 8.
*/
export const _8n = BigInt(8);
/**
* @name _9n
* @summary BigInt constant for 9.
*/
export const _9n = BigInt(9);
/**
* @name _10n
* @summary BigInt constant for 10.
*/
export const _10n = BigInt(10);
/**
* @name _100n
* @summary BigInt constant for 100.
*/
export const _100n = BigInt(100);
/**
* @name _1000n
* @summary BigInt constant for 1000.
*/
export const _1000n = BigInt(1_000);
/**
* @name _1Mn
* @summary BigInt constant for 1,000,000.
* @summary BigInt constant for 1,000,000 (million).
*/
export const _1Mn = BigInt(1_000_000);
/**
* @name _1Bn
* @summary BigInt constant for 1,000,000,000.
* @summary BigInt constant for 1,000,000,000 (billion).
*/
export const _1Bn = BigInt(1_000_000_000);
/**
* @name _1Qn
* @summary BigInt constant for 1,000,000,000,000,000,000.
* @summary BigInt constant for 1,000,000,000,000,000,000 (quitillion).
*/
export const _1Qn = _1Bn * _1Bn;