mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 07:41:01 +00:00
1 line
5.2 KiB
Plaintext
1 line
5.2 KiB
Plaintext
{"dependencies":[{"name":"../bn/bn.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":16,"index":120},"end":{"line":4,"column":38,"index":142}}],"key":"94jLUD3K1mDUvWzcKqzUyJN5xw0=","exportNames":["*"],"imports":1}},{"name":"./stripPrefix.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":25,"index":169},"end":{"line":5,"column":52,"index":196}}],"key":"5YSjnCFRtGAQvMST/r4LR6Kzmjw=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.hexToBn = hexToBn;\n var bn_js_1 = require(_dependencyMap[0], \"../bn/bn.js\");\n var stripPrefix_js_1 = require(_dependencyMap[1], \"./stripPrefix.js\");\n /**\n * @name hexToBn\n * @summary Creates a BN.js object from a hex string.\n * @description\n * `null` inputs returns a `BN(0)` result. Hex input values return the actual value converted to a BN. Anything that is not a hex string (including the `0x` prefix) throws an error.\n * @param _value The value to convert\n * @param _options Options to pass while converting\n * @param _options.isLe Convert using Little Endian\n * @param _options.isNegative Convert using two's complement\n * @example\n * <BR>\n *\n * ```javascript\n * import { hexToBn } from '@polkadot/util';\n *\n * hexToBn('0x123480001f'); // => BN(0x123480001f)\n * ```\n */\n function hexToBn(value) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n _ref$isLe = _ref.isLe,\n isLe = _ref$isLe === void 0 ? false : _ref$isLe,\n _ref$isNegative = _ref.isNegative,\n isNegative = _ref$isNegative === void 0 ? false : _ref$isNegative;\n if (!value || value === '0x') {\n return new bn_js_1.BN(0);\n }\n var stripped = (0, stripPrefix_js_1.hexStripPrefix)(value);\n var bn = new bn_js_1.BN(stripped, 16, isLe ? 'le' : 'be');\n // fromTwos takes as parameter the number of bits, which is the hex length\n // multiplied by 4 (2 bytes being 8 bits)\n return isNegative ? bn.fromTwos(stripped.length * 4) : bn;\n }\n});","lineCount":43,"map":[[2,2,1,0],[2,14,1,12],[4,2,2,0,"Object"],[4,8,2,6],[4,9,2,7,"defineProperty"],[4,23,2,21],[4,24,2,22,"exports"],[4,31,2,29],[4,33,2,31],[4,45,2,43],[4,47,2,45],[5,4,2,47,"value"],[5,9,2,52],[5,11,2,54],[6,2,2,59],[6,3,2,60],[6,4,2,61],[7,2,3,0,"exports"],[7,9,3,7],[7,10,3,8,"hexToBn"],[7,17,3,15],[7,20,3,18,"hexToBn"],[7,27,3,25],[8,2,4,0],[8,6,4,6,"bn_js_1"],[8,13,4,13],[8,16,4,16,"require"],[8,23,4,23],[8,24,4,23,"_dependencyMap"],[8,38,4,23],[8,56,4,37],[8,57,4,38],[9,2,5,0],[9,6,5,6,"stripPrefix_js_1"],[9,22,5,22],[9,25,5,25,"require"],[9,32,5,32],[9,33,5,32,"_dependencyMap"],[9,47,5,32],[9,70,5,51],[9,71,5,52],[10,2,6,0],[11,0,7,0],[12,0,8,0],[13,0,9,0],[14,0,10,0],[15,0,11,0],[16,0,12,0],[17,0,13,0],[18,0,14,0],[19,0,15,0],[20,0,16,0],[21,0,17,0],[22,0,18,0],[23,0,19,0],[24,0,20,0],[25,0,21,0],[26,0,22,0],[27,0,23,0],[28,2,24,0],[28,11,24,9,"hexToBn"],[28,18,24,16,"hexToBn"],[28,19,24,17,"value"],[28,24,24,22],[28,26,24,67],[29,4,24,67],[29,8,24,67,"_ref"],[29,12,24,67],[29,15,24,67,"arguments"],[29,24,24,67],[29,25,24,67,"length"],[29,31,24,67],[29,39,24,67,"arguments"],[29,48,24,67],[29,56,24,67,"undefined"],[29,65,24,67],[29,68,24,67,"arguments"],[29,77,24,67],[29,83,24,63],[29,84,24,64],[29,85,24,65],[30,6,24,65,"_ref$isLe"],[30,15,24,65],[30,18,24,65,"_ref"],[30,22,24,65],[30,23,24,26,"isLe"],[30,27,24,30],[31,6,24,26,"isLe"],[31,10,24,30],[31,13,24,30,"_ref$isLe"],[31,22,24,30],[31,36,24,33],[31,41,24,38],[31,44,24,38,"_ref$isLe"],[31,53,24,38],[32,6,24,38,"_ref$isNegative"],[32,21,24,38],[32,24,24,38,"_ref"],[32,28,24,38],[32,29,24,40,"isNegative"],[32,39,24,50],[33,6,24,40,"isNegative"],[33,16,24,50],[33,19,24,50,"_ref$isNegative"],[33,34,24,50],[33,48,24,53],[33,53,24,58],[33,56,24,58,"_ref$isNegative"],[33,71,24,58],[34,4,25,4],[34,8,25,8],[34,9,25,9,"value"],[34,14,25,14],[34,18,25,18,"value"],[34,23,25,23],[34,28,25,28],[34,32,25,32],[34,34,25,34],[35,6,26,8],[35,13,26,15],[35,17,26,19,"bn_js_1"],[35,24,26,26],[35,25,26,27,"BN"],[35,27,26,29],[35,28,26,30],[35,29,26,31],[35,30,26,32],[36,4,27,4],[37,4,28,4],[37,8,28,10,"stripped"],[37,16,28,18],[37,19,28,21],[37,20,28,22],[37,21,28,23],[37,23,28,25,"stripPrefix_js_1"],[37,39,28,41],[37,40,28,42,"hexStripPrefix"],[37,54,28,56],[37,56,28,58,"value"],[37,61,28,63],[37,62,28,64],[38,4,29,4],[38,8,29,10,"bn"],[38,10,29,12],[38,13,29,15],[38,17,29,19,"bn_js_1"],[38,24,29,26],[38,25,29,27,"BN"],[38,27,29,29],[38,28,29,30,"stripped"],[38,36,29,38],[38,38,29,40],[38,40,29,42],[38,42,29,44,"isLe"],[38,46,29,48],[38,49,29,51],[38,53,29,55],[38,56,29,58],[38,60,29,62],[38,61,29,63],[39,4,30,4],[40,4,31,4],[41,4,32,4],[41,11,32,11,"isNegative"],[41,21,32,21],[41,24,33,10,"bn"],[41,26,33,12],[41,27,33,13,"fromTwos"],[41,35,33,21],[41,36,33,22,"stripped"],[41,44,33,30],[41,45,33,31,"length"],[41,51,33,37],[41,54,33,40],[41,55,33,41],[41,56,33,42],[41,59,34,10,"bn"],[41,61,34,12],[42,2,35,0],[43,0,35,1],[43,3]],"functionMap":{"names":["<global>","hexToBn"],"mappings":"AAA;ACuB;CDW"},"hasCjsExports":true},"type":"js/module"}]} |