mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 14:31:02 +00:00
1 line
14 KiB
Plaintext
1 line
14 KiB
Plaintext
{"dependencies":[{"name":"@babel/runtime/helpers/slicedToArray","data":{"asyncType":null,"isESMImport":false,"locs":[],"key":"5y7e5+zC7teYEEC6niD9f5zII1M=","exportNames":["*"],"imports":1}},{"name":"@babel/runtime/helpers/toConsumableArray","data":{"asyncType":null,"isESMImport":false,"locs":[],"key":"kiCFfIx1MWoD4noR0gEoyrFAUKE=","exportNames":["*"],"imports":1}},{"name":"rxjs","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":15,"index":160},"end":{"line":5,"column":30,"index":175}}],"key":"atDzfUGaJNRNtwyVumomzH/5ygw=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":6,"column":19,"index":196},"end":{"line":6,"column":46,"index":223}}],"key":"H94lp+EitftSFqDHaenrSs5zKB0=","exportNames":["*"],"imports":1}}],"output":[{"data":{"code":"__d(function (global, require, _$$_IMPORT_DEFAULT, _$$_IMPORT_ALL, module, exports, _dependencyMap) {\n \"use strict\";\n\n var _slicedToArray = require(_dependencyMap[0], \"@babel/runtime/helpers/slicedToArray\").default;\n var _toConsumableArray = require(_dependencyMap[1], \"@babel/runtime/helpers/toConsumableArray\").default;\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.nextElected = nextElected;\n exports.validators = validators;\n var rxjs_1 = require(_dependencyMap[2], \"rxjs\");\n var index_js_1 = require(_dependencyMap[3], \"../util/index.js\");\n /**\n * @name nextElected\n * @description Retrieves the list of accounts that are set to be the next elected validators in the staking system. It provides a preview of who will be validators in the next staking era.\n * @example\n * ```javascript\n * const nextElected = await api.derive.staking.nextElected();\n * console.log(\n * \"Next Elected Validators:\",\n * nextElected.map((acc) => acc.toString())\n * );\n * ```\n */\n function nextElected(instanceId, api) {\n return (0, index_js_1.memo)(instanceId, function () {\n return (\n // Compatibility for future generation changes in staking.\n api.query.staking.erasStakersOverview ? api.derive.session.indexes().pipe(\n // only populate for next era in the last session, so track both here - entries are not\n // subscriptions, so we need a trigger - currentIndex acts as that trigger to refresh\n (0, rxjs_1.switchMap)(function (_ref) {\n var currentEra = _ref.currentEra;\n return api.query.staking.erasStakersOverview.keys(currentEra);\n }),\n // Dedupe any duplicates\n (0, rxjs_1.map)(function (keys) {\n return _toConsumableArray(new Set(keys.map(function (_ref2) {\n var _ref2$args = _slicedToArray(_ref2.args, 2),\n accountId = _ref2$args[1];\n return accountId.toString();\n }))).map(function (a) {\n return api.registry.createType('AccountId', a);\n });\n })) : api.query.staking.erasStakers ? api.derive.session.indexes().pipe(\n // only populate for next era in the last session, so track both here - entries are not\n // subscriptions, so we need a trigger - currentIndex acts as that trigger to refresh\n (0, rxjs_1.switchMap)(function (_ref3) {\n var currentEra = _ref3.currentEra;\n return api.query.staking.erasStakers.keys(currentEra);\n }),\n // Dedupe any duplicates\n (0, rxjs_1.map)(function (keys) {\n return _toConsumableArray(new Set(keys.map(function (_ref4) {\n var _ref4$args = _slicedToArray(_ref4.args, 2),\n accountId = _ref4$args[1];\n return accountId.toString();\n }))).map(function (a) {\n return api.registry.createType('AccountId', a);\n });\n })) : api.query.staking['currentElected']()\n );\n });\n }\n /**\n * @name validators\n * @description Retrieve latest list of validators.\n * @example\n * ```javascript\n * const { validators, nextElected } = await api.derive.staking.validators();\n * console.log(\n * \"Current Validators:\",\n * validators.map((v) => v.toString())\n * );\n * console.log(\n * \"Next Elected Validators:\",\n * nextElected.map((v) => v.toString())\n * );\n * ```\n */\n function validators(instanceId, api) {\n return (0, index_js_1.memo)(instanceId, function () {\n return (\n // Sadly the node-template is (for some obscure reason) not comprehensive, so while the derive works\n // in all actual real-world deployed chains, it does create some confusion for limited template chains\n (0, rxjs_1.combineLatest)([api.query.session ? api.query.session.validators() : (0, rxjs_1.of)([]), api.query.staking ? api.derive.staking.nextElected() : (0, rxjs_1.of)([])]).pipe((0, rxjs_1.map)(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n validators = _ref6[0],\n nextElected = _ref6[1];\n return {\n nextElected: nextElected.length ? nextElected : validators,\n validators: validators\n };\n }))\n );\n });\n }\n});","lineCount":98,"map":[[2,2,1,0],[2,14,1,12],[4,2,1,13],[4,6,1,13,"_slicedToArray"],[4,20,1,13],[4,23,1,13,"require"],[4,30,1,13],[4,31,1,13,"_dependencyMap"],[4,45,1,13],[4,90,1,13,"default"],[4,97,1,13],[5,2,1,13],[5,6,1,13,"_toConsumableArray"],[5,24,1,13],[5,27,1,13,"require"],[5,34,1,13],[5,35,1,13,"_dependencyMap"],[5,49,1,13],[5,98,1,13,"default"],[5,105,1,13],[6,2,2,0,"Object"],[6,8,2,6],[6,9,2,7,"defineProperty"],[6,23,2,21],[6,24,2,22,"exports"],[6,31,2,29],[6,33,2,31],[6,45,2,43],[6,47,2,45],[7,4,2,47,"value"],[7,9,2,52],[7,11,2,54],[8,2,2,59],[8,3,2,60],[8,4,2,61],[9,2,3,0,"exports"],[9,9,3,7],[9,10,3,8,"nextElected"],[9,21,3,19],[9,24,3,22,"nextElected"],[9,35,3,33],[10,2,4,0,"exports"],[10,9,4,7],[10,10,4,8,"validators"],[10,20,4,18],[10,23,4,21,"validators"],[10,33,4,31],[11,2,5,0],[11,6,5,6,"rxjs_1"],[11,12,5,12],[11,15,5,15,"require"],[11,22,5,22],[11,23,5,22,"_dependencyMap"],[11,37,5,22],[11,48,5,29],[11,49,5,30],[12,2,6,0],[12,6,6,6,"index_js_1"],[12,16,6,16],[12,19,6,19,"require"],[12,26,6,26],[12,27,6,26,"_dependencyMap"],[12,41,6,26],[12,64,6,45],[12,65,6,46],[13,2,7,0],[14,0,8,0],[15,0,9,0],[16,0,10,0],[17,0,11,0],[18,0,12,0],[19,0,13,0],[20,0,14,0],[21,0,15,0],[22,0,16,0],[23,0,17,0],[24,0,18,0],[25,2,19,0],[25,11,19,9,"nextElected"],[25,22,19,20,"nextElected"],[25,23,19,21,"instanceId"],[25,33,19,31],[25,35,19,33,"api"],[25,38,19,36],[25,40,19,38],[26,4,20,4],[26,11,20,11],[26,12,20,12],[26,13,20,13],[26,15,20,15,"index_js_1"],[26,25,20,25],[26,26,20,26,"memo"],[26,30,20,30],[26,32,20,32,"instanceId"],[26,42,20,42],[26,44,20,44],[27,6,20,44],[28,8,21,4],[29,8,22,4,"api"],[29,11,22,7],[29,12,22,8,"query"],[29,17,22,13],[29,18,22,14,"staking"],[29,25,22,21],[29,26,22,22,"erasStakersOverview"],[29,45,22,41],[29,48,23,10,"api"],[29,51,23,13],[29,52,23,14,"derive"],[29,58,23,20],[29,59,23,21,"session"],[29,66,23,28],[29,67,23,29,"indexes"],[29,74,23,36],[29,75,23,37],[29,76,23,38],[29,77,23,39,"pipe"],[29,81,23,43],[30,8,24,8],[31,8,25,8],[32,8,26,8],[32,9,26,9],[32,10,26,10],[32,12,26,12,"rxjs_1"],[32,18,26,18],[32,19,26,19,"switchMap"],[32,28,26,28],[32,30,26,30],[32,40,26,30,"_ref"],[32,44,26,30],[33,10,26,30],[33,14,26,33,"currentEra"],[33,24,26,43],[33,27,26,43,"_ref"],[33,31,26,43],[33,32,26,33,"currentEra"],[33,42,26,43],[34,10,26,43],[34,17,26,50,"api"],[34,20,26,53],[34,21,26,54,"query"],[34,26,26,59],[34,27,26,60,"staking"],[34,34,26,67],[34,35,26,68,"erasStakersOverview"],[34,54,26,87],[34,55,26,88,"keys"],[34,59,26,92],[34,60,26,93,"currentEra"],[34,70,26,103],[34,71,26,104],[35,8,26,104],[35,10,26,105],[36,8,27,8],[37,8,28,8],[37,9,28,9],[37,10,28,10],[37,12,28,12,"rxjs_1"],[37,18,28,18],[37,19,28,19,"map"],[37,22,28,22],[37,24,28,24],[37,34,28,25,"keys"],[37,38,28,29],[38,10,28,29],[38,17,28,34,"_toConsumableArray"],[38,35,28,34],[38,36,28,38],[38,40,28,42,"Set"],[38,43,28,45],[38,44,28,46,"keys"],[38,48,28,50],[38,49,28,51,"map"],[38,52,28,54],[38,53,28,55],[38,63,28,55,"_ref2"],[38,68,28,55],[39,12,28,55],[39,16,28,55,"_ref2$args"],[39,26,28,55],[39,29,28,55,"_slicedToArray"],[39,43,28,55],[39,44,28,55,"_ref2"],[39,49,28,55],[39,50,28,58,"args"],[39,54,28,62],[40,14,28,67,"accountId"],[40,23,28,76],[40,26,28,76,"_ref2$args"],[40,36,28,76],[41,12,28,76],[41,19,28,84,"accountId"],[41,28,28,93],[41,29,28,94,"toString"],[41,37,28,102],[41,38,28,103],[41,39,28,104],[42,10,28,104],[42,12,28,105],[42,13,28,106],[42,15,28,108,"map"],[42,18,28,111],[42,19,28,112],[42,29,28,113,"a"],[42,30,28,114],[43,12,28,114],[43,19,28,119,"api"],[43,22,28,122],[43,23,28,123,"registry"],[43,31,28,131],[43,32,28,132,"createType"],[43,42,28,142],[43,43,28,143],[43,54,28,154],[43,56,28,156,"a"],[43,57,28,157],[43,58,28,158],[44,10,28,158],[44,12,28,159],[45,8,28,159],[45,10,28,160],[45,11,28,161],[45,14,29,10,"api"],[45,17,29,13],[45,18,29,14,"query"],[45,23,29,19],[45,24,29,20,"staking"],[45,31,29,27],[45,32,29,28,"erasStakers"],[45,43,29,39],[45,46,30,14,"api"],[45,49,30,17],[45,50,30,18,"derive"],[45,56,30,24],[45,57,30,25,"session"],[45,64,30,32],[45,65,30,33,"indexes"],[45,72,30,40],[45,73,30,41],[45,74,30,42],[45,75,30,43,"pipe"],[45,79,30,47],[46,8,31,12],[47,8,32,12],[48,8,33,12],[48,9,33,13],[48,10,33,14],[48,12,33,16,"rxjs_1"],[48,18,33,22],[48,19,33,23,"switchMap"],[48,28,33,32],[48,30,33,34],[48,40,33,34,"_ref3"],[48,45,33,34],[49,10,33,34],[49,14,33,37,"currentEra"],[49,24,33,47],[49,27,33,47,"_ref3"],[49,32,33,47],[49,33,33,37,"currentEra"],[49,43,33,47],[50,10,33,47],[50,17,33,54,"api"],[50,20,33,57],[50,21,33,58,"query"],[50,26,33,63],[50,27,33,64,"staking"],[50,34,33,71],[50,35,33,72,"erasStakers"],[50,46,33,83],[50,47,33,84,"keys"],[50,51,33,88],[50,52,33,89,"currentEra"],[50,62,33,99],[50,63,33,100],[51,8,33,100],[51,10,33,101],[52,8,34,12],[53,8,35,12],[53,9,35,13],[53,10,35,14],[53,12,35,16,"rxjs_1"],[53,18,35,22],[53,19,35,23,"map"],[53,22,35,26],[53,24,35,28],[53,34,35,29,"keys"],[53,38,35,33],[54,10,35,33],[54,17,35,38,"_toConsumableArray"],[54,35,35,38],[54,36,35,42],[54,40,35,46,"Set"],[54,43,35,49],[54,44,35,50,"keys"],[54,48,35,54],[54,49,35,55,"map"],[54,52,35,58],[54,53,35,59],[54,63,35,59,"_ref4"],[54,68,35,59],[55,12,35,59],[55,16,35,59,"_ref4$args"],[55,26,35,59],[55,29,35,59,"_slicedToArray"],[55,43,35,59],[55,44,35,59,"_ref4"],[55,49,35,59],[55,50,35,62,"args"],[55,54,35,66],[56,14,35,71,"accountId"],[56,23,35,80],[56,26,35,80,"_ref4$args"],[56,36,35,80],[57,12,35,80],[57,19,35,88,"accountId"],[57,28,35,97],[57,29,35,98,"toString"],[57,37,35,106],[57,38,35,107],[57,39,35,108],[58,10,35,108],[58,12,35,109],[58,13,35,110],[58,15,35,112,"map"],[58,18,35,115],[58,19,35,116],[58,29,35,117,"a"],[58,30,35,118],[59,12,35,118],[59,19,35,123,"api"],[59,22,35,126],[59,23,35,127,"registry"],[59,31,35,135],[59,32,35,136,"createType"],[59,42,35,146],[59,43,35,147],[59,54,35,158],[59,56,35,160,"a"],[59,57,35,161],[59,58,35,162],[60,10,35,162],[60,12,35,163],[61,8,35,163],[61,10,35,164],[61,11,35,165],[61,14,36,14,"api"],[61,17,36,17],[61,18,36,18,"query"],[61,23,36,23],[61,24,36,24,"staking"],[61,31,36,31],[61,32,36,32],[61,48,36,48],[61,49,36,49],[61,50,36,50],[62,6,36,51],[63,4,36,51],[63,6,36,52],[64,2,37,0],[65,2,38,0],[66,0,39,0],[67,0,40,0],[68,0,41,0],[69,0,42,0],[70,0,43,0],[71,0,44,0],[72,0,45,0],[73,0,46,0],[74,0,47,0],[75,0,48,0],[76,0,49,0],[77,0,50,0],[78,0,51,0],[79,0,52,0],[80,0,53,0],[81,2,54,0],[81,11,54,9,"validators"],[81,21,54,19,"validators"],[81,22,54,20,"instanceId"],[81,32,54,30],[81,34,54,32,"api"],[81,37,54,35],[81,39,54,37],[82,4,55,4],[82,11,55,11],[82,12,55,12],[82,13,55,13],[82,15,55,15,"index_js_1"],[82,25,55,25],[82,26,55,26,"memo"],[82,30,55,30],[82,32,55,32,"instanceId"],[82,42,55,42],[82,44,55,44],[83,6,55,44],[84,8,56,4],[85,8,57,4],[86,8,58,4],[86,9,58,5],[86,10,58,6],[86,12,58,8,"rxjs_1"],[86,18,58,14],[86,19,58,15,"combineLatest"],[86,32,58,28],[86,34,58,30],[86,35,59,8,"api"],[86,38,59,11],[86,39,59,12,"query"],[86,44,59,17],[86,45,59,18,"session"],[86,52,59,25],[86,55,60,14,"api"],[86,58,60,17],[86,59,60,18,"query"],[86,64,60,23],[86,65,60,24,"session"],[86,72,60,31],[86,73,60,32,"validators"],[86,83,60,42],[86,84,60,43],[86,85,60,44],[86,88,61,14],[86,89,61,15],[86,90,61,16],[86,92,61,18,"rxjs_1"],[86,98,61,24],[86,99,61,25,"of"],[86,101,61,27],[86,103,61,29],[86,105,61,31],[86,106,61,32],[86,108,62,8,"api"],[86,111,62,11],[86,112,62,12,"query"],[86,117,62,17],[86,118,62,18,"staking"],[86,125,62,25],[86,128,63,14,"api"],[86,131,63,17],[86,132,63,18,"derive"],[86,138,63,24],[86,139,63,25,"staking"],[86,146,63,32],[86,147,63,33,"nextElected"],[86,158,63,44],[86,159,63,45],[86,160,63,46],[86,163,64,14],[86,164,64,15],[86,165,64,16],[86,167,64,18,"rxjs_1"],[86,173,64,24],[86,174,64,25,"of"],[86,176,64,27],[86,178,64,29],[86,180,64,31],[86,181,64,32],[86,182,65,5],[86,183,65,6],[86,184,65,7,"pipe"],[86,188,65,11],[86,189,65,12],[86,190,65,13],[86,191,65,14],[86,193,65,16,"rxjs_1"],[86,199,65,22],[86,200,65,23,"map"],[86,203,65,26],[86,205,65,28],[86,215,65,28,"_ref5"],[86,220,65,28],[87,10,65,28],[87,14,65,28,"_ref6"],[87,19,65,28],[87,22,65,28,"_slicedToArray"],[87,36,65,28],[87,37,65,28,"_ref5"],[87,42,65,28],[88,12,65,30,"validators"],[88,22,65,40],[88,25,65,40,"_ref6"],[88,30,65,40],[89,12,65,42,"nextElected"],[89,23,65,53],[89,26,65,53,"_ref6"],[89,31,65,53],[90,10,65,53],[90,17,65,60],[91,12,66,8,"nextElected"],[91,23,66,19],[91,25,66,21,"nextElected"],[91,36,66,32],[91,37,66,33,"length"],[91,43,66,39],[91,46,67,14,"nextElected"],[91,57,67,25],[91,60,68,14,"validators"],[91,70,68,24],[92,12,69,8,"validators"],[92,22,69,18],[92,24,69,8,"validators"],[93,10,70,4],[93,11,70,5],[94,8,70,5],[94,9,70,6],[94,10,70,7],[95,6,70,8],[96,4,70,8],[96,6,70,9],[97,2,71,0],[98,0,71,1],[98,3]],"functionMap":{"names":["<global>","nextElected","<anonymous>","keys.map$argument_0","map$argument_0","validators"],"mappings":"AAA;ACkB;4CCC;uDCQ,iDD,QE,8CF;2DCO,iDD,QE,8CF;mDDC;CDC;AKiB;4CHC;QGe;CLC"},"hasCjsExports":true},"type":"js/module"}]} |