mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 03:01:04 +00:00
1 line
5.1 KiB
Plaintext
1 line
5.1 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 const toBn_js_1 = require(_dependencyMap[0], \"./toBn.js\");\n const 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 bitLength = -1,\n isLe = true,\n isNegative = false\n } = DEFAULT_OPTS) {\n const valueBn = (0, toBn_js_1.bnToBn)(value);\n const 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 const output = new Uint8Array(byteLength);\n const bn = isNegative ? valueBn.toTwos(byteLength * 8) : valueBn;\n output.set(bn.toArray(isLe ? 'le' : 'be', byteLength), 0);\n return output;\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,"bnToU8a"],[7,17,3,15],[7,20,3,18,"bnToU8a"],[7,27,3,25],[8,2,4,0],[8,8,4,6,"toBn_js_1"],[8,17,4,15],[8,20,4,18,"require"],[8,27,4,25],[8,28,4,25,"_dependencyMap"],[8,42,4,25],[8,58,4,37],[8,59,4,38],[9,2,5,0],[9,8,5,6,"DEFAULT_OPTS"],[9,20,5,18],[9,23,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,24],[29,4,20,26,"bitLength"],[29,13,20,35],[29,16,20,38],[29,17,20,39],[29,18,20,40],[30,4,20,42,"isLe"],[30,8,20,46],[30,11,20,49],[30,15,20,53],[31,4,20,55,"isNegative"],[31,14,20,65],[31,17,20,68],[32,2,20,74],[32,3,20,75],[32,6,20,78,"DEFAULT_OPTS"],[32,18,20,90],[32,20,20,92],[33,4,21,4],[33,10,21,10,"valueBn"],[33,17,21,17],[33,20,21,20],[33,21,21,21],[33,22,21,22],[33,24,21,24,"toBn_js_1"],[33,33,21,33],[33,34,21,34,"bnToBn"],[33,40,21,40],[33,42,21,42,"value"],[33,47,21,47],[33,48,21,48],[34,4,22,4],[34,10,22,10,"byteLength"],[34,20,22,20],[34,23,22,23,"bitLength"],[34,32,22,32],[34,37,22,37],[34,38,22,38],[34,39,22,39],[34,42,23,10,"Math"],[34,46,23,14],[34,47,23,15,"ceil"],[34,51,23,19],[34,52,23,20,"valueBn"],[34,59,23,27],[34,60,23,28,"bitLength"],[34,69,23,37],[34,70,23,38],[34,71,23,39],[34,74,23,42],[34,75,23,43],[34,76,23,44],[34,79,24,10,"Math"],[34,83,24,14],[34,84,24,15,"ceil"],[34,88,24,19],[34,89,24,20],[34,90,24,21,"bitLength"],[34,99,24,30],[34,103,24,34],[34,104,24,35],[34,108,24,39],[34,109,24,40],[34,110,24,41],[35,4,25,4],[35,8,25,8],[35,9,25,9,"value"],[35,14,25,14],[35,16,25,16],[36,6,26,8],[36,13,26,15,"bitLength"],[36,22,26,24],[36,27,26,29],[36,28,26,30],[36,29,26,31],[36,32,27,14],[36,36,27,18,"Uint8Array"],[36,46,27,28],[36,47,27,29],[36,48,27,30],[36,49,27,31],[36,52,28,14],[36,56,28,18,"Uint8Array"],[36,66,28,28],[36,67,28,29,"byteLength"],[36,77,28,39],[36,78,28,40],[37,4,29,4],[38,4,30,4],[38,10,30,10,"output"],[38,16,30,16],[38,19,30,19],[38,23,30,23,"Uint8Array"],[38,33,30,33],[38,34,30,34,"byteLength"],[38,44,30,44],[38,45,30,45],[39,4,31,4],[39,10,31,10,"bn"],[39,12,31,12],[39,15,31,15,"isNegative"],[39,25,31,25],[39,28,32,10,"valueBn"],[39,35,32,17],[39,36,32,18,"toTwos"],[39,42,32,24],[39,43,32,25,"byteLength"],[39,53,32,35],[39,56,32,38],[39,57,32,39],[39,58,32,40],[39,61,33,10,"valueBn"],[39,68,33,17],[40,4,34,4,"output"],[40,10,34,10],[40,11,34,11,"set"],[40,14,34,14],[40,15,34,15,"bn"],[40,17,34,17],[40,18,34,18,"toArray"],[40,25,34,25],[40,26,34,26,"isLe"],[40,30,34,30],[40,33,34,33],[40,37,34,37],[40,40,34,40],[40,44,34,44],[40,46,34,46,"byteLength"],[40,56,34,56],[40,57,34,57],[40,59,34,59],[40,60,34,60],[40,61,34,61],[41,4,35,4],[41,11,35,11,"output"],[41,17,35,17],[42,2,36,0],[43,0,36,1],[43,3]],"functionMap":{"names":["<global>","bnToU8a"],"mappings":"AAA;ACmB;CDgB"},"hasCjsExports":true},"type":"js/module"}]} |