mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 15:41:01 +00:00
1 line
14 KiB
Plaintext
1 line
14 KiB
Plaintext
{"dependencies":[{"name":"rxjs","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":15,"index":206},"end":{"line":5,"column":30,"index":221}}],"key":"atDzfUGaJNRNtwyVumomzH/5ygw=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":6,"column":19,"index":242},"end":{"line":6,"column":46,"index":269}}],"key":"H94lp+EitftSFqDHaenrSs5zKB0=","exportNames":["*"],"imports":1}},{"name":"./cache.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":7,"column":19,"index":290},"end":{"line":7,"column":40,"index":311}}],"key":"j07H5gZzqUTkzaDscxaQqJUlcmI=","exportNames":["*"],"imports":1}},{"name":"./util.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":8,"column":18,"index":331},"end":{"line":8,"column":38,"index":351}}],"key":"RHtkf1pyimtRfZWAvWBZ833kE8E=","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.erasExposure = exports._erasExposure = exports.eraExposure = void 0;\n exports._eraExposure = _eraExposure;\n const rxjs_1 = require(_dependencyMap[0], \"rxjs\");\n const index_js_1 = require(_dependencyMap[1], \"../util/index.js\");\n const cache_js_1 = require(_dependencyMap[2], \"./cache.js\");\n const util_js_1 = require(_dependencyMap[3], \"./util.js\");\n const CACHE_KEY = 'eraExposure';\n function mapStakersClipped(era, stakers) {\n const nominators = {};\n const validators = {};\n stakers.forEach(([key, exposure]) => {\n const validatorId = key.args[1].toString();\n validators[validatorId] = exposure;\n exposure.others.forEach(({\n who\n }, validatorIndex) => {\n const nominatorId = who.toString();\n nominators[nominatorId] = nominators[nominatorId] || [];\n nominators[nominatorId].push({\n validatorId,\n validatorIndex\n });\n });\n });\n return {\n era,\n nominators,\n validators\n };\n }\n function mapStakersPaged(era, stakers) {\n const nominators = {};\n const validators = {};\n stakers.forEach(([key, exposureOpt]) => {\n if (exposureOpt.isSome) {\n const validatorId = key.args[1].toString();\n const exposure = exposureOpt.unwrap();\n validators[validatorId] = exposure;\n exposure.others.forEach(({\n who\n }, validatorIndex) => {\n const nominatorId = who.toString();\n nominators[nominatorId] = nominators[nominatorId] || [];\n nominators[nominatorId].push({\n validatorId,\n validatorIndex\n });\n });\n }\n });\n return {\n era,\n nominators,\n validators\n };\n }\n /**\n * erasStakersClipped will be deprecated and replaced with erasStakersPaged. Therefore support is given for both\n * storage queries until erasStakersClipped has been completely out of use.\n */\n function _eraExposure(instanceId, api) {\n return (0, index_js_1.memo)(instanceId, (era, withActive = false) => {\n const [cacheKey, cached] = (0, cache_js_1.getEraCache)(CACHE_KEY, era, withActive);\n return cached ? (0, rxjs_1.of)(cached) : api.query.staking.erasStakersPaged ? api.query.staking.erasStakersPaged.entries(era).pipe((0, rxjs_1.map)(r => (0, cache_js_1.setEraCache)(cacheKey, withActive, mapStakersPaged(era, r)))) : api.query.staking.erasStakersClipped.entries(era).pipe((0, rxjs_1.map)(r => (0, cache_js_1.setEraCache)(cacheKey, withActive, mapStakersClipped(era, r))));\n });\n }\n /**\n * @name eraExposure\n * @description Retrieves the staking exposure (nominators and total stake) for a specific era.\n * @param {EraIndex} eras The staking era to query.\n * @example\n * ```javascript\n * const era = api.createType(\"EraIndex\", 1000);\n * const exposure = await api.derive.staking.eraExposure(era);\n * ```\n */\n exports.eraExposure = (0, util_js_1.singleEra)('_eraExposure');\n exports._erasExposure = (0, util_js_1.combineEras)('_eraExposure');\n /**\n * @name erasExposure\n * @description Retrieves staking exposure details for multiple past eras.\n * @param {boolean} withActive? (Optional) Whether to include the active era in the result.\n * @example\n * ```javascript\n * const exposure = await api.derive.staking.erasExposure(true);\n * ```\n */\n exports.erasExposure = (0, util_js_1.erasHistoricApply)('_erasExposure');\n});","lineCount":95,"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,"erasExposure"],[7,22,3,20],[7,25,3,23,"exports"],[7,32,3,30],[7,33,3,31,"_erasExposure"],[7,46,3,44],[7,49,3,47,"exports"],[7,56,3,54],[7,57,3,55,"eraExposure"],[7,68,3,66],[7,71,3,69],[7,76,3,74],[7,77,3,75],[8,2,4,0,"exports"],[8,9,4,7],[8,10,4,8,"_eraExposure"],[8,22,4,20],[8,25,4,23,"_eraExposure"],[8,37,4,35],[9,2,5,0],[9,8,5,6,"rxjs_1"],[9,14,5,12],[9,17,5,15,"require"],[9,24,5,22],[9,25,5,22,"_dependencyMap"],[9,39,5,22],[9,50,5,29],[9,51,5,30],[10,2,6,0],[10,8,6,6,"index_js_1"],[10,18,6,16],[10,21,6,19,"require"],[10,28,6,26],[10,29,6,26,"_dependencyMap"],[10,43,6,26],[10,66,6,45],[10,67,6,46],[11,2,7,0],[11,8,7,6,"cache_js_1"],[11,18,7,16],[11,21,7,19,"require"],[11,28,7,26],[11,29,7,26,"_dependencyMap"],[11,43,7,26],[11,60,7,39],[11,61,7,40],[12,2,8,0],[12,8,8,6,"util_js_1"],[12,17,8,15],[12,20,8,18,"require"],[12,27,8,25],[12,28,8,25,"_dependencyMap"],[12,42,8,25],[12,58,8,37],[12,59,8,38],[13,2,9,0],[13,8,9,6,"CACHE_KEY"],[13,17,9,15],[13,20,9,18],[13,33,9,31],[14,2,10,0],[14,11,10,9,"mapStakersClipped"],[14,28,10,26,"mapStakersClipped"],[14,29,10,27,"era"],[14,32,10,30],[14,34,10,32,"stakers"],[14,41,10,39],[14,43,10,41],[15,4,11,4],[15,10,11,10,"nominators"],[15,20,11,20],[15,23,11,23],[15,24,11,24],[15,25,11,25],[16,4,12,4],[16,10,12,10,"validators"],[16,20,12,20],[16,23,12,23],[16,24,12,24],[16,25,12,25],[17,4,13,4,"stakers"],[17,11,13,11],[17,12,13,12,"forEach"],[17,19,13,19],[17,20,13,20],[17,21,13,21],[17,22,13,22,"key"],[17,25,13,25],[17,27,13,27,"exposure"],[17,35,13,35],[17,36,13,36],[17,41,13,41],[18,6,14,8],[18,12,14,14,"validatorId"],[18,23,14,25],[18,26,14,28,"key"],[18,29,14,31],[18,30,14,32,"args"],[18,34,14,36],[18,35,14,37],[18,36,14,38],[18,37,14,39],[18,38,14,40,"toString"],[18,46,14,48],[18,47,14,49],[18,48,14,50],[19,6,15,8,"validators"],[19,16,15,18],[19,17,15,19,"validatorId"],[19,28,15,30],[19,29,15,31],[19,32,15,34,"exposure"],[19,40,15,42],[20,6,16,8,"exposure"],[20,14,16,16],[20,15,16,17,"others"],[20,21,16,23],[20,22,16,24,"forEach"],[20,29,16,31],[20,30,16,32],[20,31,16,33],[21,8,16,35,"who"],[22,6,16,39],[22,7,16,40],[22,9,16,42,"validatorIndex"],[22,23,16,56],[22,28,16,61],[23,8,17,12],[23,14,17,18,"nominatorId"],[23,25,17,29],[23,28,17,32,"who"],[23,31,17,35],[23,32,17,36,"toString"],[23,40,17,44],[23,41,17,45],[23,42,17,46],[24,8,18,12,"nominators"],[24,18,18,22],[24,19,18,23,"nominatorId"],[24,30,18,34],[24,31,18,35],[24,34,18,38,"nominators"],[24,44,18,48],[24,45,18,49,"nominatorId"],[24,56,18,60],[24,57,18,61],[24,61,18,65],[24,63,18,67],[25,8,19,12,"nominators"],[25,18,19,22],[25,19,19,23,"nominatorId"],[25,30,19,34],[25,31,19,35],[25,32,19,36,"push"],[25,36,19,40],[25,37,19,41],[26,10,19,43,"validatorId"],[26,21,19,54],[27,10,19,56,"validatorIndex"],[28,8,19,71],[28,9,19,72],[28,10,19,73],[29,6,20,8],[29,7,20,9],[29,8,20,10],[30,4,21,4],[30,5,21,5],[30,6,21,6],[31,4,22,4],[31,11,22,11],[32,6,22,13,"era"],[32,9,22,16],[33,6,22,18,"nominators"],[33,16,22,28],[34,6,22,30,"validators"],[35,4,22,41],[35,5,22,42],[36,2,23,0],[37,2,24,0],[37,11,24,9,"mapStakersPaged"],[37,26,24,24,"mapStakersPaged"],[37,27,24,25,"era"],[37,30,24,28],[37,32,24,30,"stakers"],[37,39,24,37],[37,41,24,39],[38,4,25,4],[38,10,25,10,"nominators"],[38,20,25,20],[38,23,25,23],[38,24,25,24],[38,25,25,25],[39,4,26,4],[39,10,26,10,"validators"],[39,20,26,20],[39,23,26,23],[39,24,26,24],[39,25,26,25],[40,4,27,4,"stakers"],[40,11,27,11],[40,12,27,12,"forEach"],[40,19,27,19],[40,20,27,20],[40,21,27,21],[40,22,27,22,"key"],[40,25,27,25],[40,27,27,27,"exposureOpt"],[40,38,27,38],[40,39,27,39],[40,44,27,44],[41,6,28,8],[41,10,28,12,"exposureOpt"],[41,21,28,23],[41,22,28,24,"isSome"],[41,28,28,30],[41,30,28,32],[42,8,29,12],[42,14,29,18,"validatorId"],[42,25,29,29],[42,28,29,32,"key"],[42,31,29,35],[42,32,29,36,"args"],[42,36,29,40],[42,37,29,41],[42,38,29,42],[42,39,29,43],[42,40,29,44,"toString"],[42,48,29,52],[42,49,29,53],[42,50,29,54],[43,8,30,12],[43,14,30,18,"exposure"],[43,22,30,26],[43,25,30,29,"exposureOpt"],[43,36,30,40],[43,37,30,41,"unwrap"],[43,43,30,47],[43,44,30,48],[43,45,30,49],[44,8,31,12,"validators"],[44,18,31,22],[44,19,31,23,"validatorId"],[44,30,31,34],[44,31,31,35],[44,34,31,38,"exposure"],[44,42,31,46],[45,8,32,12,"exposure"],[45,16,32,20],[45,17,32,21,"others"],[45,23,32,27],[45,24,32,28,"forEach"],[45,31,32,35],[45,32,32,36],[45,33,32,37],[46,10,32,39,"who"],[47,8,32,43],[47,9,32,44],[47,11,32,46,"validatorIndex"],[47,25,32,60],[47,30,32,65],[48,10,33,16],[48,16,33,22,"nominatorId"],[48,27,33,33],[48,30,33,36,"who"],[48,33,33,39],[48,34,33,40,"toString"],[48,42,33,48],[48,43,33,49],[48,44,33,50],[49,10,34,16,"nominators"],[49,20,34,26],[49,21,34,27,"nominatorId"],[49,32,34,38],[49,33,34,39],[49,36,34,42,"nominators"],[49,46,34,52],[49,47,34,53,"nominatorId"],[49,58,34,64],[49,59,34,65],[49,63,34,69],[49,65,34,71],[50,10,35,16,"nominators"],[50,20,35,26],[50,21,35,27,"nominatorId"],[50,32,35,38],[50,33,35,39],[50,34,35,40,"push"],[50,38,35,44],[50,39,35,45],[51,12,35,47,"validatorId"],[51,23,35,58],[52,12,35,60,"validatorIndex"],[53,10,35,75],[53,11,35,76],[53,12,35,77],[54,8,36,12],[54,9,36,13],[54,10,36,14],[55,6,37,8],[56,4,38,4],[56,5,38,5],[56,6,38,6],[57,4,39,4],[57,11,39,11],[58,6,39,13,"era"],[58,9,39,16],[59,6,39,18,"nominators"],[59,16,39,28],[60,6,39,30,"validators"],[61,4,39,41],[61,5,39,42],[62,2,40,0],[63,2,41,0],[64,0,42,0],[65,0,43,0],[66,0,44,0],[67,2,45,0],[67,11,45,9,"_eraExposure"],[67,23,45,21,"_eraExposure"],[67,24,45,22,"instanceId"],[67,34,45,32],[67,36,45,34,"api"],[67,39,45,37],[67,41,45,39],[68,4,46,4],[68,11,46,11],[68,12,46,12],[68,13,46,13],[68,15,46,15,"index_js_1"],[68,25,46,25],[68,26,46,26,"memo"],[68,30,46,30],[68,32,46,32,"instanceId"],[68,42,46,42],[68,44,46,44],[68,45,46,45,"era"],[68,48,46,48],[68,50,46,50,"withActive"],[68,60,46,60],[68,63,46,63],[68,68,46,68],[68,73,46,73],[69,6,47,8],[69,12,47,14],[69,13,47,15,"cacheKey"],[69,21,47,23],[69,23,47,25,"cached"],[69,29,47,31],[69,30,47,32],[69,33,47,35],[69,34,47,36],[69,35,47,37],[69,37,47,39,"cache_js_1"],[69,47,47,49],[69,48,47,50,"getEraCache"],[69,59,47,61],[69,61,47,63,"CACHE_KEY"],[69,70,47,72],[69,72,47,74,"era"],[69,75,47,77],[69,77,47,79,"withActive"],[69,87,47,89],[69,88,47,90],[70,6,48,8],[70,13,48,15,"cached"],[70,19,48,21],[70,22,49,14],[70,23,49,15],[70,24,49,16],[70,26,49,18,"rxjs_1"],[70,32,49,24],[70,33,49,25,"of"],[70,35,49,27],[70,37,49,29,"cached"],[70,43,49,35],[70,44,49,36],[70,47,50,14,"api"],[70,50,50,17],[70,51,50,18,"query"],[70,56,50,23],[70,57,50,24,"staking"],[70,64,50,31],[70,65,50,32,"erasStakersPaged"],[70,81,50,48],[70,84,51,18,"api"],[70,87,51,21],[70,88,51,22,"query"],[70,93,51,27],[70,94,51,28,"staking"],[70,101,51,35],[70,102,51,36,"erasStakersPaged"],[70,118,51,52],[70,119,51,53,"entries"],[70,126,51,60],[70,127,51,61,"era"],[70,130,51,64],[70,131,51,65],[70,132,51,66,"pipe"],[70,136,51,70],[70,137,51,71],[70,138,51,72],[70,139,51,73],[70,141,51,75,"rxjs_1"],[70,147,51,81],[70,148,51,82,"map"],[70,151,51,85],[70,153,51,88,"r"],[70,154,51,89],[70,158,51,94],[70,159,51,95],[70,160,51,96],[70,162,51,98,"cache_js_1"],[70,172,51,108],[70,173,51,109,"setEraCache"],[70,184,51,120],[70,186,51,122,"cacheKey"],[70,194,51,130],[70,196,51,132,"withActive"],[70,206,51,142],[70,208,51,144,"mapStakersPaged"],[70,223,51,159],[70,224,51,160,"era"],[70,227,51,163],[70,229,51,165,"r"],[70,230,51,166],[70,231,51,167],[70,232,51,168],[70,233,51,169],[70,234,51,170],[70,237,52,18,"api"],[70,240,52,21],[70,241,52,22,"query"],[70,246,52,27],[70,247,52,28,"staking"],[70,254,52,35],[70,255,52,36,"erasStakersClipped"],[70,273,52,54],[70,274,52,55,"entries"],[70,281,52,62],[70,282,52,63,"era"],[70,285,52,66],[70,286,52,67],[70,287,52,68,"pipe"],[70,291,52,72],[70,292,52,73],[70,293,52,74],[70,294,52,75],[70,296,52,77,"rxjs_1"],[70,302,52,83],[70,303,52,84,"map"],[70,306,52,87],[70,308,52,90,"r"],[70,309,52,91],[70,313,52,96],[70,314,52,97],[70,315,52,98],[70,317,52,100,"cache_js_1"],[70,327,52,110],[70,328,52,111,"setEraCache"],[70,339,52,122],[70,341,52,124,"cacheKey"],[70,349,52,132],[70,351,52,134,"withActive"],[70,361,52,144],[70,363,52,146,"mapStakersClipped"],[70,380,52,163],[70,381,52,164,"era"],[70,384,52,167],[70,386,52,169,"r"],[70,387,52,170],[70,388,52,171],[70,389,52,172],[70,390,52,173],[70,391,52,174],[71,4,53,4],[71,5,53,5],[71,6,53,6],[72,2,54,0],[73,2,55,0],[74,0,56,0],[75,0,57,0],[76,0,58,0],[77,0,59,0],[78,0,60,0],[79,0,61,0],[80,0,62,0],[81,0,63,0],[82,0,64,0],[83,2,65,0,"exports"],[83,9,65,7],[83,10,65,8,"eraExposure"],[83,21,65,19],[83,24,65,22],[83,25,65,23],[83,26,65,24],[83,28,65,26,"util_js_1"],[83,37,65,35],[83,38,65,36,"singleEra"],[83,47,65,45],[83,49,65,47],[83,63,65,61],[83,64,65,62],[84,2,66,0,"exports"],[84,9,66,7],[84,10,66,8,"_erasExposure"],[84,23,66,21],[84,26,66,24],[84,27,66,25],[84,28,66,26],[84,30,66,28,"util_js_1"],[84,39,66,37],[84,40,66,38,"combineEras"],[84,51,66,49],[84,53,66,51],[84,67,66,65],[84,68,66,66],[85,2,67,0],[86,0,68,0],[87,0,69,0],[88,0,70,0],[89,0,71,0],[90,0,72,0],[91,0,73,0],[92,0,74,0],[93,0,75,0],[94,2,76,0,"exports"],[94,9,76,7],[94,10,76,8,"erasExposure"],[94,22,76,20],[94,25,76,23],[94,26,76,24],[94,27,76,25],[94,29,76,27,"util_js_1"],[94,38,76,36],[94,39,76,37,"erasHistoricApply"],[94,56,76,54],[94,58,76,56],[94,73,76,71],[94,74,76,72],[95,0,76,73],[95,3]],"functionMap":{"names":["<global>","mapStakersClipped","stakers.forEach$argument_0","exposure.others.forEach$argument_0","mapStakersPaged","_eraExposure","<anonymous>"],"mappings":"AAA;ACS;oBCG;gCCG;SDI;KDC;CDE;AIC;oBFG;oCCK;aDI;KEE;CJE;AKK;4CCC;KDO;CLC"},"hasCjsExports":true},"type":"js/module"}]} |