mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 08:51:01 +00:00
1 line
10 KiB
Plaintext
1 line
10 KiB
Plaintext
{"dependencies":[{"name":"rxjs","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":6,"column":15,"index":213},"end":{"line":6,"column":30,"index":228}}],"key":"atDzfUGaJNRNtwyVumomzH/5ygw=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":7,"column":19,"index":249},"end":{"line":7,"column":46,"index":276}}],"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 Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.stakerExposure = void 0;\n exports._stakerExposures = _stakerExposures;\n exports.stakerExposures = stakerExposures;\n const rxjs_1 = require(_dependencyMap[0], \"rxjs\");\n const index_js_1 = require(_dependencyMap[1], \"../util/index.js\");\n function _stakerExposures(instanceId, api) {\n return (0, index_js_1.memo)(instanceId, (accountIds, eras, withActive = false) => {\n const stakerIds = accountIds.map(a => api.registry.createType('AccountId', a).toString());\n return api.derive.staking._erasExposure(eras, withActive).pipe((0, rxjs_1.map)(exposures => stakerIds.map(stakerId => exposures.map(({\n era,\n nominators: allNominators,\n validators: allValidators\n }) => {\n const isValidator = !!allValidators[stakerId];\n const validators = {};\n const nominating = allNominators[stakerId] || [];\n if (isValidator) {\n validators[stakerId] = allValidators[stakerId];\n } else if (nominating) {\n nominating.forEach(({\n validatorId\n }) => {\n validators[validatorId] = allValidators[validatorId];\n });\n }\n return {\n era,\n isEmpty: !Object.keys(validators).length,\n isValidator,\n nominating,\n validators\n };\n }))));\n });\n }\n /**\n * @name stakerExposures\n * @param { (Uint8Array | string)[] } accountIds List of validator stash accounts.\n * @param { boolean } withActive Whether to include the active era.\n * @description Retrieves staking exposure for multiple accounts across historical eras.\n * @example\n * ```javascript\n * const exposure = await api.derive.staking.stakerExposures(\n * [ALICE, BOB],\n * true\n * );\n * ```\n */\n function stakerExposures(instanceId, api) {\n return (0, index_js_1.memo)(instanceId, (accountIds, withActive = false) => api.derive.staking.erasHistoric(withActive).pipe((0, rxjs_1.switchMap)(eras => api.derive.staking._stakerExposures(accountIds, eras, withActive))));\n }\n /**\n * @name stakerExposure\n * @param { Uint8Array | string } accountId The validator stash account.\n * @param { boolean } withActive Whether to include the active era.\n * @description Retrieves staking exposure for a single account across historical eras. Exposure refers to the total stake associated with a validator.\n * @example\n * ```javascript\n * const exposure = await api.derive.staking.stakerExposure(\n * ALICE,\n * true\n * );\n * ```\n */\n exports.stakerExposure = (0, index_js_1.firstMemo)((api, accountId, withActive) => api.derive.staking.stakerExposures([accountId], withActive));\n});","lineCount":72,"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,"stakerExposure"],[7,24,3,22],[7,27,3,25],[7,32,3,30],[7,33,3,31],[8,2,4,0,"exports"],[8,9,4,7],[8,10,4,8,"_stakerExposures"],[8,26,4,24],[8,29,4,27,"_stakerExposures"],[8,45,4,43],[9,2,5,0,"exports"],[9,9,5,7],[9,10,5,8,"stakerExposures"],[9,25,5,23],[9,28,5,26,"stakerExposures"],[9,43,5,41],[10,2,6,0],[10,8,6,6,"rxjs_1"],[10,14,6,12],[10,17,6,15,"require"],[10,24,6,22],[10,25,6,22,"_dependencyMap"],[10,39,6,22],[10,50,6,29],[10,51,6,30],[11,2,7,0],[11,8,7,6,"index_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,66,7,45],[11,67,7,46],[12,2,8,0],[12,11,8,9,"_stakerExposures"],[12,27,8,25,"_stakerExposures"],[12,28,8,26,"instanceId"],[12,38,8,36],[12,40,8,38,"api"],[12,43,8,41],[12,45,8,43],[13,4,9,4],[13,11,9,11],[13,12,9,12],[13,13,9,13],[13,15,9,15,"index_js_1"],[13,25,9,25],[13,26,9,26,"memo"],[13,30,9,30],[13,32,9,32,"instanceId"],[13,42,9,42],[13,44,9,44],[13,45,9,45,"accountIds"],[13,55,9,55],[13,57,9,57,"eras"],[13,61,9,61],[13,63,9,63,"withActive"],[13,73,9,73],[13,76,9,76],[13,81,9,81],[13,86,9,86],[14,6,10,8],[14,12,10,14,"stakerIds"],[14,21,10,23],[14,24,10,26,"accountIds"],[14,34,10,36],[14,35,10,37,"map"],[14,38,10,40],[14,39,10,42,"a"],[14,40,10,43],[14,44,10,48,"api"],[14,47,10,51],[14,48,10,52,"registry"],[14,56,10,60],[14,57,10,61,"createType"],[14,67,10,71],[14,68,10,72],[14,79,10,83],[14,81,10,85,"a"],[14,82,10,86],[14,83,10,87],[14,84,10,88,"toString"],[14,92,10,96],[14,93,10,97],[14,94,10,98],[14,95,10,99],[15,6,11,8],[15,13,11,15,"api"],[15,16,11,18],[15,17,11,19,"derive"],[15,23,11,25],[15,24,11,26,"staking"],[15,31,11,33],[15,32,11,34,"_erasExposure"],[15,45,11,47],[15,46,11,48,"eras"],[15,50,11,52],[15,52,11,54,"withActive"],[15,62,11,64],[15,63,11,65],[15,64,11,66,"pipe"],[15,68,11,70],[15,69,11,71],[15,70,11,72],[15,71,11,73],[15,73,11,75,"rxjs_1"],[15,79,11,81],[15,80,11,82,"map"],[15,83,11,85],[15,85,11,88,"exposures"],[15,94,11,97],[15,98,11,102,"stakerIds"],[15,107,11,111],[15,108,11,112,"map"],[15,111,11,115],[15,112,11,117,"stakerId"],[15,120,11,125],[15,124,11,130,"exposures"],[15,133,11,139],[15,134,11,140,"map"],[15,137,11,143],[15,138,11,144],[15,139,11,145],[16,8,11,147,"era"],[16,11,11,150],[17,8,11,152,"nominators"],[17,18,11,162],[17,20,11,164,"allNominators"],[17,33,11,177],[18,8,11,179,"validators"],[18,18,11,189],[18,20,11,191,"allValidators"],[19,6,11,205],[19,7,11,206],[19,12,11,211],[20,8,12,12],[20,14,12,18,"isValidator"],[20,25,12,29],[20,28,12,32],[20,29,12,33],[20,30,12,34,"allValidators"],[20,43,12,47],[20,44,12,48,"stakerId"],[20,52,12,56],[20,53,12,57],[21,8,13,12],[21,14,13,18,"validators"],[21,24,13,28],[21,27,13,31],[21,28,13,32],[21,29,13,33],[22,8,14,12],[22,14,14,18,"nominating"],[22,24,14,28],[22,27,14,31,"allNominators"],[22,40,14,44],[22,41,14,45,"stakerId"],[22,49,14,53],[22,50,14,54],[22,54,14,58],[22,56,14,60],[23,8,15,12],[23,12,15,16,"isValidator"],[23,23,15,27],[23,25,15,29],[24,10,16,16,"validators"],[24,20,16,26],[24,21,16,27,"stakerId"],[24,29,16,35],[24,30,16,36],[24,33,16,39,"allValidators"],[24,46,16,52],[24,47,16,53,"stakerId"],[24,55,16,61],[24,56,16,62],[25,8,17,12],[25,9,17,13],[25,15,18,17],[25,19,18,21,"nominating"],[25,29,18,31],[25,31,18,33],[26,10,19,16,"nominating"],[26,20,19,26],[26,21,19,27,"forEach"],[26,28,19,34],[26,29,19,35],[26,30,19,36],[27,12,19,38,"validatorId"],[28,10,19,50],[28,11,19,51],[28,16,19,56],[29,12,20,20,"validators"],[29,22,20,30],[29,23,20,31,"validatorId"],[29,34,20,42],[29,35,20,43],[29,38,20,46,"allValidators"],[29,51,20,59],[29,52,20,60,"validatorId"],[29,63,20,71],[29,64,20,72],[30,10,21,16],[30,11,21,17],[30,12,21,18],[31,8,22,12],[32,8,23,12],[32,15,23,19],[33,10,23,21,"era"],[33,13,23,24],[34,10,23,26,"isEmpty"],[34,17,23,33],[34,19,23,35],[34,20,23,36,"Object"],[34,26,23,42],[34,27,23,43,"keys"],[34,31,23,47],[34,32,23,48,"validators"],[34,42,23,58],[34,43,23,59],[34,44,23,60,"length"],[34,50,23,66],[35,10,23,68,"isValidator"],[35,21,23,79],[36,10,23,81,"nominating"],[36,20,23,91],[37,10,23,93,"validators"],[38,8,23,104],[38,9,23,105],[39,6,24,8],[39,7,24,9],[39,8,24,10],[39,9,24,11],[39,10,24,12],[39,11,24,13],[40,4,25,4],[40,5,25,5],[40,6,25,6],[41,2,26,0],[42,2,27,0],[43,0,28,0],[44,0,29,0],[45,0,30,0],[46,0,31,0],[47,0,32,0],[48,0,33,0],[49,0,34,0],[50,0,35,0],[51,0,36,0],[52,0,37,0],[53,0,38,0],[54,0,39,0],[55,2,40,0],[55,11,40,9,"stakerExposures"],[55,26,40,24,"stakerExposures"],[55,27,40,25,"instanceId"],[55,37,40,35],[55,39,40,37,"api"],[55,42,40,40],[55,44,40,42],[56,4,41,4],[56,11,41,11],[56,12,41,12],[56,13,41,13],[56,15,41,15,"index_js_1"],[56,25,41,25],[56,26,41,26,"memo"],[56,30,41,30],[56,32,41,32,"instanceId"],[56,42,41,42],[56,44,41,44],[56,45,41,45,"accountIds"],[56,55,41,55],[56,57,41,57,"withActive"],[56,67,41,67],[56,70,41,70],[56,75,41,75],[56,80,41,80,"api"],[56,83,41,83],[56,84,41,84,"derive"],[56,90,41,90],[56,91,41,91,"staking"],[56,98,41,98],[56,99,41,99,"erasHistoric"],[56,111,41,111],[56,112,41,112,"withActive"],[56,122,41,122],[56,123,41,123],[56,124,41,124,"pipe"],[56,128,41,128],[56,129,41,129],[56,130,41,130],[56,131,41,131],[56,133,41,133,"rxjs_1"],[56,139,41,139],[56,140,41,140,"switchMap"],[56,149,41,149],[56,151,41,152,"eras"],[56,155,41,156],[56,159,41,161,"api"],[56,162,41,164],[56,163,41,165,"derive"],[56,169,41,171],[56,170,41,172,"staking"],[56,177,41,179],[56,178,41,180,"_stakerExposures"],[56,194,41,196],[56,195,41,197,"accountIds"],[56,205,41,207],[56,207,41,209,"eras"],[56,211,41,213],[56,213,41,215,"withActive"],[56,223,41,225],[56,224,41,226],[56,225,41,227],[56,226,41,228],[56,227,41,229],[57,2,42,0],[58,2,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,0,54,0],[70,0,55,0],[71,2,56,0,"exports"],[71,9,56,7],[71,10,56,8,"stakerExposure"],[71,24,56,22],[71,27,56,25],[71,28,56,26],[71,29,56,27],[71,31,56,29,"index_js_1"],[71,41,56,39],[71,42,56,40,"firstMemo"],[71,51,56,49],[71,53,56,51],[71,54,56,52,"api"],[71,57,56,55],[71,59,56,57,"accountId"],[71,68,56,66],[71,70,56,68,"withActive"],[71,80,56,78],[71,85,56,83,"api"],[71,88,56,86],[71,89,56,87,"derive"],[71,95,56,93],[71,96,56,94,"staking"],[71,103,56,101],[71,104,56,102,"stakerExposures"],[71,119,56,117],[71,120,56,118],[71,121,56,119,"accountId"],[71,130,56,128],[71,131,56,129],[71,133,56,131,"withActive"],[71,143,56,141],[71,144,56,142],[71,145,56,143],[72,0,56,144],[72,3]],"functionMap":{"names":["<global>","_stakerExposures","<anonymous>","accountIds.map$argument_0","stakerIds.map$argument_0","exposures.map$argument_0","nominating.forEach$argument_0","stakerExposures"],"mappings":"AAA;ACO;4CCC;yCCC,yDD;oHEC,4BC;mCCQ;iBDE;SDG,CF;KDC;CDC;AOc;4CLC,wLK;CPC;mDEc,2FF"},"hasCjsExports":true},"type":"js/module"}]} |