ethers.js/lib.commonjs/constants/numbers.js

34 lines
1.4 KiB
JavaScript
Raw Normal View History

2022-09-05 23:57:11 +03:00
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
2022-11-30 23:44:23 +03:00
exports.MaxInt256 = exports.MinInt256 = exports.MaxUint256 = exports.WeiPerEther = exports.N = void 0;
2022-09-05 23:57:11 +03:00
/**
* A constant for the order N for the secp256k1 curve.
2022-12-10 02:24:58 +03:00
*
* (**i.e.** ``0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141n``)
2022-09-05 23:57:11 +03:00
*/
2022-11-30 23:44:23 +03:00
exports.N = BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");
2022-09-05 23:57:11 +03:00
/**
* A constant for the number of wei in a single ether.
2022-12-10 02:24:58 +03:00
*
* (**i.e.** ``1000000000000000000n``)
2022-09-05 23:57:11 +03:00
*/
2022-11-30 23:44:23 +03:00
exports.WeiPerEther = BigInt("1000000000000000000");
2022-09-05 23:57:11 +03:00
/**
* A constant for the maximum value for a ``uint256``.
2022-12-10 02:24:58 +03:00
*
* (**i.e.** ``0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn``)
2022-09-05 23:57:11 +03:00
*/
2022-11-30 23:44:23 +03:00
exports.MaxUint256 = BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
2022-09-05 23:57:11 +03:00
/**
* A constant for the minimum value for an ``int256``.
2022-12-10 02:24:58 +03:00
*
* (**i.e.** ``-8000000000000000000000000000000000000000000000000000000000000000n``)
2022-09-05 23:57:11 +03:00
*/
2022-11-30 23:44:23 +03:00
exports.MinInt256 = BigInt("0x8000000000000000000000000000000000000000000000000000000000000000") * BigInt(-1);
2022-09-05 23:57:11 +03:00
/**
* A constant for the maximum value for an ``int256``.
2022-12-10 02:24:58 +03:00
*
* (**i.e.** ``0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn``)
2022-09-05 23:57:11 +03:00
*/
2022-11-30 23:44:23 +03:00
exports.MaxInt256 = BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
2022-09-05 23:57:11 +03:00
//# sourceMappingURL=numbers.js.map