1 | "use strict";
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.hexToBigInt = hexToBigInt;
|
7 |
|
8 | var _xBigint = require("@polkadot/x-bigint");
|
9 |
|
10 | var _spread = require("../object/spread");
|
11 |
|
12 | var _toBigInt = require("../u8a/toBigInt");
|
13 |
|
14 | var _toU8a = require("./toU8a");
|
15 |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 |
|
22 |
|
23 | function hexToBigInt(value) {
|
24 | let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
25 | return !value || value === '0x' ? (0, _xBigint.BigInt)(0) : (0, _toBigInt.u8aToBigInt)((0, _toU8a.hexToU8a)(value), (0, _spread.objectSpread)({
|
26 | isLe: false,
|
27 | isNegative: false
|
28 | }, options));
|
29 | } |
\ | No newline at end of file |