mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 05:21:02 +00:00
1 line
4.4 KiB
Plaintext
1 line
4.4 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 const bn_js_1 = require(_dependencyMap[0], \"../bn/bn.js\");\n const 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 isLe = false,\n isNegative = false\n } = {}) {\n if (!value || value === '0x') {\n return new bn_js_1.BN(0);\n }\n const stripped = (0, stripPrefix_js_1.hexStripPrefix)(value);\n const 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":41,"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,8,4,6,"bn_js_1"],[8,15,4,13],[8,18,4,16,"require"],[8,25,4,23],[8,26,4,23,"_dependencyMap"],[8,40,4,23],[8,58,4,37],[8,59,4,38],[9,2,5,0],[9,8,5,6,"stripPrefix_js_1"],[9,24,5,22],[9,27,5,25,"require"],[9,34,5,32],[9,35,5,32,"_dependencyMap"],[9,49,5,32],[9,72,5,51],[9,73,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,24],[29,4,24,26,"isLe"],[29,8,24,30],[29,11,24,33],[29,16,24,38],[30,4,24,40,"isNegative"],[30,14,24,50],[30,17,24,53],[31,2,24,59],[31,3,24,60],[31,6,24,63],[31,7,24,64],[31,8,24,65],[31,10,24,67],[32,4,25,4],[32,8,25,8],[32,9,25,9,"value"],[32,14,25,14],[32,18,25,18,"value"],[32,23,25,23],[32,28,25,28],[32,32,25,32],[32,34,25,34],[33,6,26,8],[33,13,26,15],[33,17,26,19,"bn_js_1"],[33,24,26,26],[33,25,26,27,"BN"],[33,27,26,29],[33,28,26,30],[33,29,26,31],[33,30,26,32],[34,4,27,4],[35,4,28,4],[35,10,28,10,"stripped"],[35,18,28,18],[35,21,28,21],[35,22,28,22],[35,23,28,23],[35,25,28,25,"stripPrefix_js_1"],[35,41,28,41],[35,42,28,42,"hexStripPrefix"],[35,56,28,56],[35,58,28,58,"value"],[35,63,28,63],[35,64,28,64],[36,4,29,4],[36,10,29,10,"bn"],[36,12,29,12],[36,15,29,15],[36,19,29,19,"bn_js_1"],[36,26,29,26],[36,27,29,27,"BN"],[36,29,29,29],[36,30,29,30,"stripped"],[36,38,29,38],[36,40,29,40],[36,42,29,42],[36,44,29,44,"isLe"],[36,48,29,48],[36,51,29,51],[36,55,29,55],[36,58,29,58],[36,62,29,62],[36,63,29,63],[37,4,30,4],[38,4,31,4],[39,4,32,4],[39,11,32,11,"isNegative"],[39,21,32,21],[39,24,33,10,"bn"],[39,26,33,12],[39,27,33,13,"fromTwos"],[39,35,33,21],[39,36,33,22,"stripped"],[39,44,33,30],[39,45,33,31,"length"],[39,51,33,37],[39,54,33,40],[39,55,33,41],[39,56,33,42],[39,59,34,10,"bn"],[39,61,34,12],[40,2,35,0],[41,0,35,1],[41,3]],"functionMap":{"names":["<global>","hexToBn"],"mappings":"AAA;ACuB;CDW"},"hasCjsExports":true},"type":"js/module"}]} |