mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 11:11:01 +00:00
1 line
12 KiB
Plaintext
1 line
12 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 var rxjs_1 = require(_dependencyMap[0], \"rxjs\");\n var index_js_1 = require(_dependencyMap[1], \"../util/index.js\");\n function _stakerExposures(instanceId, api) {\n return (0, index_js_1.memo)(instanceId, function (accountIds, eras) {\n var withActive = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;\n var stakerIds = accountIds.map(function (a) {\n return api.registry.createType('AccountId', a).toString();\n });\n return api.derive.staking._erasExposure(eras, withActive).pipe((0, rxjs_1.map)(function (exposures) {\n return stakerIds.map(function (stakerId) {\n return exposures.map(function (_ref) {\n var era = _ref.era,\n allNominators = _ref.nominators,\n allValidators = _ref.validators;\n var isValidator = !!allValidators[stakerId];\n var validators = {};\n var nominating = allNominators[stakerId] || [];\n if (isValidator) {\n validators[stakerId] = allValidators[stakerId];\n } else if (nominating) {\n nominating.forEach(function (_ref2) {\n var validatorId = _ref2.validatorId;\n validators[validatorId] = allValidators[validatorId];\n });\n }\n return {\n era: era,\n isEmpty: !Object.keys(validators).length,\n isValidator: isValidator,\n nominating: nominating,\n validators: validators\n };\n });\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, function (accountIds) {\n var withActive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n return api.derive.staking.erasHistoric(withActive).pipe((0, rxjs_1.switchMap)(function (eras) {\n return api.derive.staking._stakerExposures(accountIds, eras, withActive);\n }));\n });\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)(function (api, accountId, withActive) {\n return api.derive.staking.stakerExposures([accountId], withActive);\n });\n});","lineCount":84,"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,6,6,6,"rxjs_1"],[10,12,6,12],[10,15,6,15,"require"],[10,22,6,22],[10,23,6,22,"_dependencyMap"],[10,37,6,22],[10,48,6,29],[10,49,6,30],[11,2,7,0],[11,6,7,6,"index_js_1"],[11,16,7,16],[11,19,7,19,"require"],[11,26,7,26],[11,27,7,26,"_dependencyMap"],[11,41,7,26],[11,64,7,45],[11,65,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,54,9,45,"accountIds"],[13,64,9,55],[13,66,9,57,"eras"],[13,70,9,61],[13,72,9,86],[14,6,9,86],[14,10,9,63,"withActive"],[14,20,9,73],[14,23,9,73,"arguments"],[14,32,9,73],[14,33,9,73,"length"],[14,39,9,73],[14,47,9,73,"arguments"],[14,56,9,73],[14,64,9,73,"undefined"],[14,73,9,73],[14,76,9,73,"arguments"],[14,85,9,73],[14,91,9,76],[14,96,9,81],[15,6,10,8],[15,10,10,14,"stakerIds"],[15,19,10,23],[15,22,10,26,"accountIds"],[15,32,10,36],[15,33,10,37,"map"],[15,36,10,40],[15,37,10,41],[15,47,10,42,"a"],[15,48,10,43],[16,8,10,43],[16,15,10,48,"api"],[16,18,10,51],[16,19,10,52,"registry"],[16,27,10,60],[16,28,10,61,"createType"],[16,38,10,71],[16,39,10,72],[16,50,10,83],[16,52,10,85,"a"],[16,53,10,86],[16,54,10,87],[16,55,10,88,"toString"],[16,63,10,96],[16,64,10,97],[16,65,10,98],[17,6,10,98],[17,8,10,99],[18,6,11,8],[18,13,11,15,"api"],[18,16,11,18],[18,17,11,19,"derive"],[18,23,11,25],[18,24,11,26,"staking"],[18,31,11,33],[18,32,11,34,"_erasExposure"],[18,45,11,47],[18,46,11,48,"eras"],[18,50,11,52],[18,52,11,54,"withActive"],[18,62,11,64],[18,63,11,65],[18,64,11,66,"pipe"],[18,68,11,70],[18,69,11,71],[18,70,11,72],[18,71,11,73],[18,73,11,75,"rxjs_1"],[18,79,11,81],[18,80,11,82,"map"],[18,83,11,85],[18,85,11,87],[18,95,11,88,"exposures"],[18,104,11,97],[19,8,11,97],[19,15,11,102,"stakerIds"],[19,24,11,111],[19,25,11,112,"map"],[19,28,11,115],[19,29,11,116],[19,39,11,117,"stakerId"],[19,47,11,125],[20,10,11,125],[20,17,11,130,"exposures"],[20,26,11,139],[20,27,11,140,"map"],[20,30,11,143],[20,31,11,144],[20,41,11,144,"_ref"],[20,45,11,144],[20,47,11,211],[21,12,11,211],[21,16,11,147,"era"],[21,19,11,150],[21,22,11,150,"_ref"],[21,26,11,150],[21,27,11,147,"era"],[21,30,11,150],[22,14,11,164,"allNominators"],[22,27,11,177],[22,30,11,177,"_ref"],[22,34,11,177],[22,35,11,152,"nominators"],[22,45,11,162],[23,14,11,191,"allValidators"],[23,27,11,204],[23,30,11,204,"_ref"],[23,34,11,204],[23,35,11,179,"validators"],[23,45,11,189],[24,12,12,12],[24,16,12,18,"isValidator"],[24,27,12,29],[24,30,12,32],[24,31,12,33],[24,32,12,34,"allValidators"],[24,45,12,47],[24,46,12,48,"stakerId"],[24,54,12,56],[24,55,12,57],[25,12,13,12],[25,16,13,18,"validators"],[25,26,13,28],[25,29,13,31],[25,30,13,32],[25,31,13,33],[26,12,14,12],[26,16,14,18,"nominating"],[26,26,14,28],[26,29,14,31,"allNominators"],[26,42,14,44],[26,43,14,45,"stakerId"],[26,51,14,53],[26,52,14,54],[26,56,14,58],[26,58,14,60],[27,12,15,12],[27,16,15,16,"isValidator"],[27,27,15,27],[27,29,15,29],[28,14,16,16,"validators"],[28,24,16,26],[28,25,16,27,"stakerId"],[28,33,16,35],[28,34,16,36],[28,37,16,39,"allValidators"],[28,50,16,52],[28,51,16,53,"stakerId"],[28,59,16,61],[28,60,16,62],[29,12,17,12],[29,13,17,13],[29,19,18,17],[29,23,18,21,"nominating"],[29,33,18,31],[29,35,18,33],[30,14,19,16,"nominating"],[30,24,19,26],[30,25,19,27,"forEach"],[30,32,19,34],[30,33,19,35],[30,43,19,35,"_ref2"],[30,48,19,35],[30,50,19,56],[31,16,19,56],[31,20,19,38,"validatorId"],[31,31,19,49],[31,34,19,49,"_ref2"],[31,39,19,49],[31,40,19,38,"validatorId"],[31,51,19,49],[32,16,20,20,"validators"],[32,26,20,30],[32,27,20,31,"validatorId"],[32,38,20,42],[32,39,20,43],[32,42,20,46,"allValidators"],[32,55,20,59],[32,56,20,60,"validatorId"],[32,67,20,71],[32,68,20,72],[33,14,21,16],[33,15,21,17],[33,16,21,18],[34,12,22,12],[35,12,23,12],[35,19,23,19],[36,14,23,21,"era"],[36,17,23,24],[36,19,23,21,"era"],[36,22,23,24],[37,14,23,26,"isEmpty"],[37,21,23,33],[37,23,23,35],[37,24,23,36,"Object"],[37,30,23,42],[37,31,23,43,"keys"],[37,35,23,47],[37,36,23,48,"validators"],[37,46,23,58],[37,47,23,59],[37,48,23,60,"length"],[37,54,23,66],[38,14,23,68,"isValidator"],[38,25,23,79],[38,27,23,68,"isValidator"],[38,38,23,79],[39,14,23,81,"nominating"],[39,24,23,91],[39,26,23,81,"nominating"],[39,36,23,91],[40,14,23,93,"validators"],[40,24,23,103],[40,26,23,93,"validators"],[41,12,23,104],[41,13,23,105],[42,10,24,8],[42,11,24,9],[42,12,24,10],[43,8,24,10],[43,10,24,11],[44,6,24,11],[44,8,24,12],[44,9,24,13],[45,4,25,4],[45,5,25,5],[45,6,25,6],[46,2,26,0],[47,2,27,0],[48,0,28,0],[49,0,29,0],[50,0,30,0],[51,0,31,0],[52,0,32,0],[53,0,33,0],[54,0,34,0],[55,0,35,0],[56,0,36,0],[57,0,37,0],[58,0,38,0],[59,0,39,0],[60,2,40,0],[60,11,40,9,"stakerExposures"],[60,26,40,24,"stakerExposures"],[60,27,40,25,"instanceId"],[60,37,40,35],[60,39,40,37,"api"],[60,42,40,40],[60,44,40,42],[61,4,41,4],[61,11,41,11],[61,12,41,12],[61,13,41,13],[61,15,41,15,"index_js_1"],[61,25,41,25],[61,26,41,26,"memo"],[61,30,41,30],[61,32,41,32,"instanceId"],[61,42,41,42],[61,44,41,44],[61,54,41,45,"accountIds"],[61,64,41,55],[62,6,41,55],[62,10,41,57,"withActive"],[62,20,41,67],[62,23,41,67,"arguments"],[62,32,41,67],[62,33,41,67,"length"],[62,39,41,67],[62,47,41,67,"arguments"],[62,56,41,67],[62,64,41,67,"undefined"],[62,73,41,67],[62,76,41,67,"arguments"],[62,85,41,67],[62,91,41,70],[62,96,41,75],[63,6,41,75],[63,13,41,80,"api"],[63,16,41,83],[63,17,41,84,"derive"],[63,23,41,90],[63,24,41,91,"staking"],[63,31,41,98],[63,32,41,99,"erasHistoric"],[63,44,41,111],[63,45,41,112,"withActive"],[63,55,41,122],[63,56,41,123],[63,57,41,124,"pipe"],[63,61,41,128],[63,62,41,129],[63,63,41,130],[63,64,41,131],[63,66,41,133,"rxjs_1"],[63,72,41,139],[63,73,41,140,"switchMap"],[63,82,41,149],[63,84,41,151],[63,94,41,152,"eras"],[63,98,41,156],[64,8,41,156],[64,15,41,161,"api"],[64,18,41,164],[64,19,41,165,"derive"],[64,25,41,171],[64,26,41,172,"staking"],[64,33,41,179],[64,34,41,180,"_stakerExposures"],[64,50,41,196],[64,51,41,197,"accountIds"],[64,61,41,207],[64,63,41,209,"eras"],[64,67,41,213],[64,69,41,215,"withActive"],[64,79,41,225],[64,80,41,226],[65,6,41,226],[65,8,41,227],[65,9,41,228],[66,4,41,228],[66,6,41,229],[67,2,42,0],[68,2,43,0],[69,0,44,0],[70,0,45,0],[71,0,46,0],[72,0,47,0],[73,0,48,0],[74,0,49,0],[75,0,50,0],[76,0,51,0],[77,0,52,0],[78,0,53,0],[79,0,54,0],[80,0,55,0],[81,2,56,0,"exports"],[81,9,56,7],[81,10,56,8,"stakerExposure"],[81,24,56,22],[81,27,56,25],[81,28,56,26],[81,29,56,27],[81,31,56,29,"index_js_1"],[81,41,56,39],[81,42,56,40,"firstMemo"],[81,51,56,49],[81,53,56,51],[81,63,56,52,"api"],[81,66,56,55],[81,68,56,57,"accountId"],[81,77,56,66],[81,79,56,68,"withActive"],[81,89,56,78],[82,4,56,78],[82,11,56,83,"api"],[82,14,56,86],[82,15,56,87,"derive"],[82,21,56,93],[82,22,56,94,"staking"],[82,29,56,101],[82,30,56,102,"stakerExposures"],[82,45,56,117],[82,46,56,118],[82,47,56,119,"accountId"],[82,56,56,128],[82,57,56,129],[82,59,56,131,"withActive"],[82,69,56,141],[82,70,56,142],[83,2,56,142],[83,4,56,143],[84,0,56,144],[84,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"}]} |