mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 19:11:02 +00:00
1 line
12 KiB
Plaintext
1 line
12 KiB
Plaintext
{"dependencies":[{"name":"@babel/runtime/helpers/slicedToArray","data":{"asyncType":null,"isESMImport":false,"locs":[],"key":"5y7e5+zC7teYEEC6niD9f5zII1M=","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 Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.nextElected = nextElected;\n exports.validators = validators;\n var rxjs_1 = require(_dependencyMap[1], \"rxjs\");\n var index_js_1 = require(_dependencyMap[2], \"../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, () =>\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)(_ref => {\n var currentEra = _ref.currentEra;\n return api.query.staking.erasStakersOverview.keys(currentEra);\n }),\n // Dedupe any duplicates\n (0, rxjs_1.map)(keys => [...new Set(keys.map(_ref2 => {\n var _ref2$args = _slicedToArray(_ref2.args, 2),\n accountId = _ref2$args[1];\n return accountId.toString();\n }))].map(a => api.registry.createType('AccountId', a)))) : 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)(_ref3 => {\n var currentEra = _ref3.currentEra;\n return api.query.staking.erasStakers.keys(currentEra);\n }),\n // Dedupe any duplicates\n (0, rxjs_1.map)(keys => [...new Set(keys.map(_ref4 => {\n var _ref4$args = _slicedToArray(_ref4.args, 2),\n accountId = _ref4$args[1];\n return accountId.toString();\n }))].map(a => api.registry.createType('AccountId', a)))) : api.query.staking['currentElected']());\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, () =>\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)(_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\n };\n })));\n }\n});","lineCount":83,"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,2,0,"Object"],[5,8,2,6],[5,9,2,7,"defineProperty"],[5,23,2,21],[5,24,2,22,"exports"],[5,31,2,29],[5,33,2,31],[5,45,2,43],[5,47,2,45],[6,4,2,47,"value"],[6,9,2,52],[6,11,2,54],[7,2,2,59],[7,3,2,60],[7,4,2,61],[8,2,3,0,"exports"],[8,9,3,7],[8,10,3,8,"nextElected"],[8,21,3,19],[8,24,3,22,"nextElected"],[8,35,3,33],[9,2,4,0,"exports"],[9,9,4,7],[9,10,4,8,"validators"],[9,20,4,18],[9,23,4,21,"validators"],[9,33,4,31],[10,2,5,0],[10,6,5,6,"rxjs_1"],[10,12,5,12],[10,15,5,15,"require"],[10,22,5,22],[10,23,5,22,"_dependencyMap"],[10,37,5,22],[10,48,5,29],[10,49,5,30],[11,2,6,0],[11,6,6,6,"index_js_1"],[11,16,6,16],[11,19,6,19,"require"],[11,26,6,26],[11,27,6,26,"_dependencyMap"],[11,41,6,26],[11,64,6,45],[11,65,6,46],[12,2,7,0],[13,0,8,0],[14,0,9,0],[15,0,10,0],[16,0,11,0],[17,0,12,0],[18,0,13,0],[19,0,14,0],[20,0,15,0],[21,0,16,0],[22,0,17,0],[23,0,18,0],[24,2,19,0],[24,11,19,9,"nextElected"],[24,22,19,20,"nextElected"],[24,23,19,21,"instanceId"],[24,33,19,31],[24,35,19,33,"api"],[24,38,19,36],[24,40,19,38],[25,4,20,4],[25,11,20,11],[25,12,20,12],[25,13,20,13],[25,15,20,15,"index_js_1"],[25,25,20,25],[25,26,20,26,"memo"],[25,30,20,30],[25,32,20,32,"instanceId"],[25,42,20,42],[25,44,20,44],[26,4,21,4],[27,4,22,4,"api"],[27,7,22,7],[27,8,22,8,"query"],[27,13,22,13],[27,14,22,14,"staking"],[27,21,22,21],[27,22,22,22,"erasStakersOverview"],[27,41,22,41],[27,44,23,10,"api"],[27,47,23,13],[27,48,23,14,"derive"],[27,54,23,20],[27,55,23,21,"session"],[27,62,23,28],[27,63,23,29,"indexes"],[27,70,23,36],[27,71,23,37],[27,72,23,38],[27,73,23,39,"pipe"],[27,77,23,43],[28,4,24,8],[29,4,25,8],[30,4,26,8],[30,5,26,9],[30,6,26,10],[30,8,26,12,"rxjs_1"],[30,14,26,18],[30,15,26,19,"switchMap"],[30,24,26,28],[30,26,26,30,"_ref"],[30,30,26,30],[31,6,26,30],[31,10,26,33,"currentEra"],[31,20,26,43],[31,23,26,43,"_ref"],[31,27,26,43],[31,28,26,33,"currentEra"],[31,38,26,43],[32,6,26,43],[32,13,26,50,"api"],[32,16,26,53],[32,17,26,54,"query"],[32,22,26,59],[32,23,26,60,"staking"],[32,30,26,67],[32,31,26,68,"erasStakersOverview"],[32,50,26,87],[32,51,26,88,"keys"],[32,55,26,92],[32,56,26,93,"currentEra"],[32,66,26,103],[32,67,26,104],[33,4,26,104],[33,6,26,105],[34,4,27,8],[35,4,28,8],[35,5,28,9],[35,6,28,10],[35,8,28,12,"rxjs_1"],[35,14,28,18],[35,15,28,19,"map"],[35,18,28,22],[35,20,28,25,"keys"],[35,24,28,29],[35,28,28,34],[35,29,28,35],[35,32,28,38],[35,36,28,42,"Set"],[35,39,28,45],[35,40,28,46,"keys"],[35,44,28,50],[35,45,28,51,"map"],[35,48,28,54],[35,49,28,55,"_ref2"],[35,54,28,55],[36,6,28,55],[36,10,28,55,"_ref2$args"],[36,20,28,55],[36,23,28,55,"_slicedToArray"],[36,37,28,55],[36,38,28,55,"_ref2"],[36,43,28,55],[36,44,28,58,"args"],[36,48,28,62],[37,8,28,67,"accountId"],[37,17,28,76],[37,20,28,76,"_ref2$args"],[37,30,28,76],[38,6,28,76],[38,13,28,84,"accountId"],[38,22,28,93],[38,23,28,94,"toString"],[38,31,28,102],[38,32,28,103],[38,33,28,104],[39,4,28,104],[39,6,28,105],[39,7,28,106],[39,8,28,107],[39,9,28,108,"map"],[39,12,28,111],[39,13,28,113,"a"],[39,14,28,114],[39,18,28,119,"api"],[39,21,28,122],[39,22,28,123,"registry"],[39,30,28,131],[39,31,28,132,"createType"],[39,41,28,142],[39,42,28,143],[39,53,28,154],[39,55,28,156,"a"],[39,56,28,157],[39,57,28,158],[39,58,28,159],[39,59,28,160],[39,60,28,161],[39,63,29,10,"api"],[39,66,29,13],[39,67,29,14,"query"],[39,72,29,19],[39,73,29,20,"staking"],[39,80,29,27],[39,81,29,28,"erasStakers"],[39,92,29,39],[39,95,30,14,"api"],[39,98,30,17],[39,99,30,18,"derive"],[39,105,30,24],[39,106,30,25,"session"],[39,113,30,32],[39,114,30,33,"indexes"],[39,121,30,40],[39,122,30,41],[39,123,30,42],[39,124,30,43,"pipe"],[39,128,30,47],[40,4,31,12],[41,4,32,12],[42,4,33,12],[42,5,33,13],[42,6,33,14],[42,8,33,16,"rxjs_1"],[42,14,33,22],[42,15,33,23,"switchMap"],[42,24,33,32],[42,26,33,34,"_ref3"],[42,31,33,34],[43,6,33,34],[43,10,33,37,"currentEra"],[43,20,33,47],[43,23,33,47,"_ref3"],[43,28,33,47],[43,29,33,37,"currentEra"],[43,39,33,47],[44,6,33,47],[44,13,33,54,"api"],[44,16,33,57],[44,17,33,58,"query"],[44,22,33,63],[44,23,33,64,"staking"],[44,30,33,71],[44,31,33,72,"erasStakers"],[44,42,33,83],[44,43,33,84,"keys"],[44,47,33,88],[44,48,33,89,"currentEra"],[44,58,33,99],[44,59,33,100],[45,4,33,100],[45,6,33,101],[46,4,34,12],[47,4,35,12],[47,5,35,13],[47,6,35,14],[47,8,35,16,"rxjs_1"],[47,14,35,22],[47,15,35,23,"map"],[47,18,35,26],[47,20,35,29,"keys"],[47,24,35,33],[47,28,35,38],[47,29,35,39],[47,32,35,42],[47,36,35,46,"Set"],[47,39,35,49],[47,40,35,50,"keys"],[47,44,35,54],[47,45,35,55,"map"],[47,48,35,58],[47,49,35,59,"_ref4"],[47,54,35,59],[48,6,35,59],[48,10,35,59,"_ref4$args"],[48,20,35,59],[48,23,35,59,"_slicedToArray"],[48,37,35,59],[48,38,35,59,"_ref4"],[48,43,35,59],[48,44,35,62,"args"],[48,48,35,66],[49,8,35,71,"accountId"],[49,17,35,80],[49,20,35,80,"_ref4$args"],[49,30,35,80],[50,6,35,80],[50,13,35,88,"accountId"],[50,22,35,97],[50,23,35,98,"toString"],[50,31,35,106],[50,32,35,107],[50,33,35,108],[51,4,35,108],[51,6,35,109],[51,7,35,110],[51,8,35,111],[51,9,35,112,"map"],[51,12,35,115],[51,13,35,117,"a"],[51,14,35,118],[51,18,35,123,"api"],[51,21,35,126],[51,22,35,127,"registry"],[51,30,35,135],[51,31,35,136,"createType"],[51,41,35,146],[51,42,35,147],[51,53,35,158],[51,55,35,160,"a"],[51,56,35,161],[51,57,35,162],[51,58,35,163],[51,59,35,164],[51,60,35,165],[51,63,36,14,"api"],[51,66,36,17],[51,67,36,18,"query"],[51,72,36,23],[51,73,36,24,"staking"],[51,80,36,31],[51,81,36,32],[51,97,36,48],[51,98,36,49],[51,99,36,50],[51,100,36,51],[51,101,36,52],[52,2,37,0],[53,2,38,0],[54,0,39,0],[55,0,40,0],[56,0,41,0],[57,0,42,0],[58,0,43,0],[59,0,44,0],[60,0,45,0],[61,0,46,0],[62,0,47,0],[63,0,48,0],[64,0,49,0],[65,0,50,0],[66,0,51,0],[67,0,52,0],[68,0,53,0],[69,2,54,0],[69,11,54,9,"validators"],[69,21,54,19,"validators"],[69,22,54,20,"instanceId"],[69,32,54,30],[69,34,54,32,"api"],[69,37,54,35],[69,39,54,37],[70,4,55,4],[70,11,55,11],[70,12,55,12],[70,13,55,13],[70,15,55,15,"index_js_1"],[70,25,55,25],[70,26,55,26,"memo"],[70,30,55,30],[70,32,55,32,"instanceId"],[70,42,55,42],[70,44,55,44],[71,4,56,4],[72,4,57,4],[73,4,58,4],[73,5,58,5],[73,6,58,6],[73,8,58,8,"rxjs_1"],[73,14,58,14],[73,15,58,15,"combineLatest"],[73,28,58,28],[73,30,58,30],[73,31,59,8,"api"],[73,34,59,11],[73,35,59,12,"query"],[73,40,59,17],[73,41,59,18,"session"],[73,48,59,25],[73,51,60,14,"api"],[73,54,60,17],[73,55,60,18,"query"],[73,60,60,23],[73,61,60,24,"session"],[73,68,60,31],[73,69,60,32,"validators"],[73,79,60,42],[73,80,60,43],[73,81,60,44],[73,84,61,14],[73,85,61,15],[73,86,61,16],[73,88,61,18,"rxjs_1"],[73,94,61,24],[73,95,61,25,"of"],[73,97,61,27],[73,99,61,29],[73,101,61,31],[73,102,61,32],[73,104,62,8,"api"],[73,107,62,11],[73,108,62,12,"query"],[73,113,62,17],[73,114,62,18,"staking"],[73,121,62,25],[73,124,63,14,"api"],[73,127,63,17],[73,128,63,18,"derive"],[73,134,63,24],[73,135,63,25,"staking"],[73,142,63,32],[73,143,63,33,"nextElected"],[73,154,63,44],[73,155,63,45],[73,156,63,46],[73,159,64,14],[73,160,64,15],[73,161,64,16],[73,163,64,18,"rxjs_1"],[73,169,64,24],[73,170,64,25,"of"],[73,172,64,27],[73,174,64,29],[73,176,64,31],[73,177,64,32],[73,178,65,5],[73,179,65,6],[73,180,65,7,"pipe"],[73,184,65,11],[73,185,65,12],[73,186,65,13],[73,187,65,14],[73,189,65,16,"rxjs_1"],[73,195,65,22],[73,196,65,23,"map"],[73,199,65,26],[73,201,65,28,"_ref5"],[73,206,65,28],[74,6,65,28],[74,10,65,28,"_ref6"],[74,15,65,28],[74,18,65,28,"_slicedToArray"],[74,32,65,28],[74,33,65,28,"_ref5"],[74,38,65,28],[75,8,65,30,"validators"],[75,18,65,40],[75,21,65,40,"_ref6"],[75,26,65,40],[76,8,65,42,"nextElected"],[76,19,65,53],[76,22,65,53,"_ref6"],[76,27,65,53],[77,6,65,53],[77,13,65,60],[78,8,66,8,"nextElected"],[78,19,66,19],[78,21,66,21,"nextElected"],[78,32,66,32],[78,33,66,33,"length"],[78,39,66,39],[78,42,67,14,"nextElected"],[78,53,67,25],[78,56,68,14,"validators"],[78,66,68,24],[79,8,69,8,"validators"],[80,6,70,4],[80,7,70,5],[81,4,70,5],[81,5,70,6],[81,6,70,7],[81,7,70,8],[81,8,70,9],[82,2,71,0],[83,0,71,1],[83,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"}]} |