mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 16:51:02 +00:00
1 line
6.2 KiB
Plaintext
1 line
6.2 KiB
Plaintext
{"dependencies":[{"name":"./toBn.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":18,"index":122},"end":{"line":4,"column":38,"index":142}}],"key":"D6mcp+meNSfm94ikkjorkfvX7oc=","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.bnToU8a = bnToU8a;\n var toBn_js_1 = require(_dependencyMap[0], \"./toBn.js\");\n var DEFAULT_OPTS = {\n bitLength: -1,\n isLe: true,\n isNegative: false\n };\n /**\n * @name bnToU8a\n * @summary Creates a Uint8Array object from a BN.\n * @description\n * `null`/`undefined`/`NaN` inputs returns an empty `Uint8Array` result. `BN` input values return the actual bytes value converted to a `Uint8Array`. Optionally convert using little-endian format if `isLE` is set.\n * @example\n * <BR>\n *\n * ```javascript\n * import { bnToU8a } from '@polkadot/util';\n *\n * bnToU8a(new BN(0x1234)); // => [0x12, 0x34]\n * ```\n */\n function bnToU8a(value) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_OPTS,\n _ref$bitLength = _ref.bitLength,\n bitLength = _ref$bitLength === void 0 ? -1 : _ref$bitLength,\n _ref$isLe = _ref.isLe,\n isLe = _ref$isLe === void 0 ? true : _ref$isLe,\n _ref$isNegative = _ref.isNegative,\n isNegative = _ref$isNegative === void 0 ? false : _ref$isNegative;\n var valueBn = (0, toBn_js_1.bnToBn)(value);\n var byteLength = bitLength === -1 ? Math.ceil(valueBn.bitLength() / 8) : Math.ceil((bitLength || 0) / 8);\n if (!value) {\n return bitLength === -1 ? new Uint8Array(1) : new Uint8Array(byteLength);\n }\n var output = new Uint8Array(byteLength);\n var bn = isNegative ? valueBn.toTwos(byteLength * 8) : valueBn;\n output.set(bn.toArray(isLe ? 'le' : 'be', byteLength), 0);\n return output;\n }\n});","lineCount":46,"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,"bnToU8a"],[7,17,3,15],[7,20,3,18,"bnToU8a"],[7,27,3,25],[8,2,4,0],[8,6,4,6,"toBn_js_1"],[8,15,4,15],[8,18,4,18,"require"],[8,25,4,25],[8,26,4,25,"_dependencyMap"],[8,40,4,25],[8,56,4,37],[8,57,4,38],[9,2,5,0],[9,6,5,6,"DEFAULT_OPTS"],[9,18,5,18],[9,21,5,21],[10,4,5,23,"bitLength"],[10,13,5,32],[10,15,5,34],[10,16,5,35],[10,17,5,36],[11,4,5,38,"isLe"],[11,8,5,42],[11,10,5,44],[11,14,5,48],[12,4,5,50,"isNegative"],[12,14,5,60],[12,16,5,62],[13,2,5,68],[13,3,5,69],[14,2,6,0],[15,0,7,0],[16,0,8,0],[17,0,9,0],[18,0,10,0],[19,0,11,0],[20,0,12,0],[21,0,13,0],[22,0,14,0],[23,0,15,0],[24,0,16,0],[25,0,17,0],[26,0,18,0],[27,0,19,0],[28,2,20,0],[28,11,20,9,"bnToU8a"],[28,18,20,16,"bnToU8a"],[28,19,20,17,"value"],[28,24,20,22],[28,26,20,92],[29,4,20,92],[29,8,20,92,"_ref"],[29,12,20,92],[29,15,20,92,"arguments"],[29,24,20,92],[29,25,20,92,"length"],[29,31,20,92],[29,39,20,92,"arguments"],[29,48,20,92],[29,56,20,92,"undefined"],[29,65,20,92],[29,68,20,92,"arguments"],[29,77,20,92],[29,83,20,78,"DEFAULT_OPTS"],[29,95,20,90],[30,6,20,90,"_ref$bitLength"],[30,20,20,90],[30,23,20,90,"_ref"],[30,27,20,90],[30,28,20,26,"bitLength"],[30,37,20,35],[31,6,20,26,"bitLength"],[31,15,20,35],[31,18,20,35,"_ref$bitLength"],[31,32,20,35],[31,46,20,38],[31,47,20,39],[31,48,20,40],[31,51,20,40,"_ref$bitLength"],[31,65,20,40],[32,6,20,40,"_ref$isLe"],[32,15,20,40],[32,18,20,40,"_ref"],[32,22,20,40],[32,23,20,42,"isLe"],[32,27,20,46],[33,6,20,42,"isLe"],[33,10,20,46],[33,13,20,46,"_ref$isLe"],[33,22,20,46],[33,36,20,49],[33,40,20,53],[33,43,20,53,"_ref$isLe"],[33,52,20,53],[34,6,20,53,"_ref$isNegative"],[34,21,20,53],[34,24,20,53,"_ref"],[34,28,20,53],[34,29,20,55,"isNegative"],[34,39,20,65],[35,6,20,55,"isNegative"],[35,16,20,65],[35,19,20,65,"_ref$isNegative"],[35,34,20,65],[35,48,20,68],[35,53,20,73],[35,56,20,73,"_ref$isNegative"],[35,71,20,73],[36,4,21,4],[36,8,21,10,"valueBn"],[36,15,21,17],[36,18,21,20],[36,19,21,21],[36,20,21,22],[36,22,21,24,"toBn_js_1"],[36,31,21,33],[36,32,21,34,"bnToBn"],[36,38,21,40],[36,40,21,42,"value"],[36,45,21,47],[36,46,21,48],[37,4,22,4],[37,8,22,10,"byteLength"],[37,18,22,20],[37,21,22,23,"bitLength"],[37,30,22,32],[37,35,22,37],[37,36,22,38],[37,37,22,39],[37,40,23,10,"Math"],[37,44,23,14],[37,45,23,15,"ceil"],[37,49,23,19],[37,50,23,20,"valueBn"],[37,57,23,27],[37,58,23,28,"bitLength"],[37,67,23,37],[37,68,23,38],[37,69,23,39],[37,72,23,42],[37,73,23,43],[37,74,23,44],[37,77,24,10,"Math"],[37,81,24,14],[37,82,24,15,"ceil"],[37,86,24,19],[37,87,24,20],[37,88,24,21,"bitLength"],[37,97,24,30],[37,101,24,34],[37,102,24,35],[37,106,24,39],[37,107,24,40],[37,108,24,41],[38,4,25,4],[38,8,25,8],[38,9,25,9,"value"],[38,14,25,14],[38,16,25,16],[39,6,26,8],[39,13,26,15,"bitLength"],[39,22,26,24],[39,27,26,29],[39,28,26,30],[39,29,26,31],[39,32,27,14],[39,36,27,18,"Uint8Array"],[39,46,27,28],[39,47,27,29],[39,48,27,30],[39,49,27,31],[39,52,28,14],[39,56,28,18,"Uint8Array"],[39,66,28,28],[39,67,28,29,"byteLength"],[39,77,28,39],[39,78,28,40],[40,4,29,4],[41,4,30,4],[41,8,30,10,"output"],[41,14,30,16],[41,17,30,19],[41,21,30,23,"Uint8Array"],[41,31,30,33],[41,32,30,34,"byteLength"],[41,42,30,44],[41,43,30,45],[42,4,31,4],[42,8,31,10,"bn"],[42,10,31,12],[42,13,31,15,"isNegative"],[42,23,31,25],[42,26,32,10,"valueBn"],[42,33,32,17],[42,34,32,18,"toTwos"],[42,40,32,24],[42,41,32,25,"byteLength"],[42,51,32,35],[42,54,32,38],[42,55,32,39],[42,56,32,40],[42,59,33,10,"valueBn"],[42,66,33,17],[43,4,34,4,"output"],[43,10,34,10],[43,11,34,11,"set"],[43,14,34,14],[43,15,34,15,"bn"],[43,17,34,17],[43,18,34,18,"toArray"],[43,25,34,25],[43,26,34,26,"isLe"],[43,30,34,30],[43,33,34,33],[43,37,34,37],[43,40,34,40],[43,44,34,44],[43,46,34,46,"byteLength"],[43,56,34,56],[43,57,34,57],[43,59,34,59],[43,60,34,60],[43,61,34,61],[44,4,35,4],[44,11,35,11,"output"],[44,17,35,17],[45,2,36,0],[46,0,36,1],[46,3]],"functionMap":{"names":["<global>","bnToU8a"],"mappings":"AAA;ACmB;CDgB"},"hasCjsExports":true},"type":"js/module"}]} |