mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 14:31:02 +00:00
1 line
10 KiB
Plaintext
1 line
10 KiB
Plaintext
{"dependencies":[{"name":"rxjs","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":38,"index":38}}],"key":"PnOMrhZAPWoeW3ygrvUJ7ff768Y=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":2,"column":0,"index":39},"end":{"line":2,"column":51,"index":90}}],"key":"GRJlO1cmIj14nBxcasNpiq30og4=","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._stakerExposures = _stakerExposures;\n exports.stakerExposures = stakerExposures;\n Object.defineProperty(exports, \"stakerExposure\", {\n enumerable: true,\n get: function () {\n return stakerExposure;\n }\n });\n var _rxjs = require(_dependencyMap[0], \"rxjs\");\n var _utilIndexJs = require(_dependencyMap[1], \"../util/index.js\");\n function _stakerExposures(instanceId, api) {\n return (0, _utilIndexJs.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.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, _utilIndexJs.memo)(instanceId, (accountIds, withActive = false) => api.derive.staking.erasHistoric(withActive).pipe((0, _rxjs.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 const stakerExposure = /*#__PURE__*/(0, _utilIndexJs.firstMemo)((api, accountId, withActive) => api.derive.staking.stakerExposures([accountId], withActive));\n});","lineCount":77,"map":[[7,2,3,0,"exports"],[7,9,3,0],[7,10,3,0,"_stakerExposures"],[7,26,3,0],[7,29,3,0,"_stakerExposures"],[7,45,3,0],[8,2,35,0,"exports"],[8,9,35,0],[8,10,35,0,"stakerExposures"],[8,25,35,0],[8,28,35,0,"stakerExposures"],[8,43,35,0],[9,2,51,0,"Object"],[9,8,51,0],[9,9,51,0,"defineProperty"],[9,23,51,0],[9,24,51,0,"exports"],[9,31,51,0],[10,4,51,0,"enumerable"],[10,14,51,0],[11,4,51,0,"get"],[11,7,51,0],[11,18,51,0,"get"],[11,19,51,0],[12,6,51,0],[12,13,51,0,"stakerExposure"],[12,27,51,0],[13,4,51,0],[14,2,51,0],[15,2,1,0],[15,6,1,0,"_rxjs"],[15,11,1,0],[15,14,1,0,"require"],[15,21,1,0],[15,22,1,0,"_dependencyMap"],[15,36,1,0],[16,2,2,0],[16,6,2,0,"_utilIndexJs"],[16,18,2,0],[16,21,2,0,"require"],[16,28,2,0],[16,29,2,0,"_dependencyMap"],[16,43,2,0],[17,2,3,7],[17,11,3,16,"_stakerExposures"],[17,27,3,32,"_stakerExposures"],[17,28,3,33,"instanceId"],[17,38,3,43],[17,40,3,45,"api"],[17,43,3,48],[17,45,3,50],[18,4,4,4],[18,11,4,11],[18,15,4,11,"memo"],[18,27,4,15],[18,28,4,15,"memo"],[18,32,4,15],[18,34,4,16,"instanceId"],[18,44,4,26],[18,46,4,28],[18,47,4,29,"accountIds"],[18,57,4,39],[18,59,4,41,"eras"],[18,63,4,45],[18,65,4,47,"withActive"],[18,75,4,57],[18,78,4,60],[18,83,4,65],[18,88,4,70],[19,6,5,8],[19,12,5,14,"stakerIds"],[19,21,5,23],[19,24,5,26,"accountIds"],[19,34,5,36],[19,35,5,37,"map"],[19,38,5,40],[19,39,5,42,"a"],[19,40,5,43],[19,44,5,48,"api"],[19,47,5,51],[19,48,5,52,"registry"],[19,56,5,60],[19,57,5,61,"createType"],[19,67,5,71],[19,68,5,72],[19,79,5,83],[19,81,5,85,"a"],[19,82,5,86],[19,83,5,87],[19,84,5,88,"toString"],[19,92,5,96],[19,93,5,97],[19,94,5,98],[19,95,5,99],[20,6,6,8],[20,13,6,15,"api"],[20,16,6,18],[20,17,6,19,"derive"],[20,23,6,25],[20,24,6,26,"staking"],[20,31,6,33],[20,32,6,34,"_erasExposure"],[20,45,6,47],[20,46,6,48,"eras"],[20,50,6,52],[20,52,6,54,"withActive"],[20,62,6,64],[20,63,6,65],[20,64,6,66,"pipe"],[20,68,6,70],[20,69,6,71],[20,73,6,71,"map"],[20,78,6,74],[20,79,6,74,"map"],[20,82,6,74],[20,84,6,76,"exposures"],[20,93,6,85],[20,97,6,90,"stakerIds"],[20,106,6,99],[20,107,6,100,"map"],[20,110,6,103],[20,111,6,105,"stakerId"],[20,119,6,113],[20,123,6,118,"exposures"],[20,132,6,127],[20,133,6,128,"map"],[20,136,6,131],[20,137,6,132],[20,138,6,133],[21,8,6,135,"era"],[21,11,6,138],[22,8,6,140,"nominators"],[22,18,6,150],[22,20,6,152,"allNominators"],[22,33,6,165],[23,8,6,167,"validators"],[23,18,6,177],[23,20,6,179,"allValidators"],[24,6,6,193],[24,7,6,194],[24,12,6,199],[25,8,7,12],[25,14,7,18,"isValidator"],[25,25,7,29],[25,28,7,32],[25,29,7,33],[25,30,7,34,"allValidators"],[25,43,7,47],[25,44,7,48,"stakerId"],[25,52,7,56],[25,53,7,57],[26,8,8,12],[26,14,8,18,"validators"],[26,24,8,28],[26,27,8,31],[26,28,8,32],[26,29,8,33],[27,8,9,12],[27,14,9,18,"nominating"],[27,24,9,28],[27,27,9,31,"allNominators"],[27,40,9,44],[27,41,9,45,"stakerId"],[27,49,9,53],[27,50,9,54],[27,54,9,58],[27,56,9,60],[28,8,10,12],[28,12,10,16,"isValidator"],[28,23,10,27],[28,25,10,29],[29,10,11,16,"validators"],[29,20,11,26],[29,21,11,27,"stakerId"],[29,29,11,35],[29,30,11,36],[29,33,11,39,"allValidators"],[29,46,11,52],[29,47,11,53,"stakerId"],[29,55,11,61],[29,56,11,62],[30,8,12,12],[30,9,12,13],[30,15,13,17],[30,19,13,21,"nominating"],[30,29,13,31],[30,31,13,33],[31,10,14,16,"nominating"],[31,20,14,26],[31,21,14,27,"forEach"],[31,28,14,34],[31,29,14,35],[31,30,14,36],[32,12,14,38,"validatorId"],[33,10,14,50],[33,11,14,51],[33,16,14,56],[34,12,15,20,"validators"],[34,22,15,30],[34,23,15,31,"validatorId"],[34,34,15,42],[34,35,15,43],[34,38,15,46,"allValidators"],[34,51,15,59],[34,52,15,60,"validatorId"],[34,63,15,71],[34,64,15,72],[35,10,16,16],[35,11,16,17],[35,12,16,18],[36,8,17,12],[37,8,18,12],[37,15,18,19],[38,10,18,21,"era"],[38,13,18,24],[39,10,18,26,"isEmpty"],[39,17,18,33],[39,19,18,35],[39,20,18,36,"Object"],[39,26,18,42],[39,27,18,43,"keys"],[39,31,18,47],[39,32,18,48,"validators"],[39,42,18,58],[39,43,18,59],[39,44,18,60,"length"],[39,50,18,66],[40,10,18,68,"isValidator"],[40,21,18,79],[41,10,18,81,"nominating"],[41,20,18,91],[42,10,18,93,"validators"],[43,8,18,104],[43,9,18,105],[44,6,19,8],[44,7,19,9],[44,8,19,10],[44,9,19,11],[44,10,19,12],[44,11,19,13],[45,4,20,4],[45,5,20,5],[45,6,20,6],[46,2,21,0],[47,2,22,0],[48,0,23,0],[49,0,24,0],[50,0,25,0],[51,0,26,0],[52,0,27,0],[53,0,28,0],[54,0,29,0],[55,0,30,0],[56,0,31,0],[57,0,32,0],[58,0,33,0],[59,0,34,0],[60,2,35,7],[60,11,35,16,"stakerExposures"],[60,26,35,31,"stakerExposures"],[60,27,35,32,"instanceId"],[60,37,35,42],[60,39,35,44,"api"],[60,42,35,47],[60,44,35,49],[61,4,36,4],[61,11,36,11],[61,15,36,11,"memo"],[61,27,36,15],[61,28,36,15,"memo"],[61,32,36,15],[61,34,36,16,"instanceId"],[61,44,36,26],[61,46,36,28],[61,47,36,29,"accountIds"],[61,57,36,39],[61,59,36,41,"withActive"],[61,69,36,51],[61,72,36,54],[61,77,36,59],[61,82,36,64,"api"],[61,85,36,67],[61,86,36,68,"derive"],[61,92,36,74],[61,93,36,75,"staking"],[61,100,36,82],[61,101,36,83,"erasHistoric"],[61,113,36,95],[61,114,36,96,"withActive"],[61,124,36,106],[61,125,36,107],[61,126,36,108,"pipe"],[61,130,36,112],[61,131,36,113],[61,135,36,113,"switchMap"],[61,140,36,122],[61,141,36,122,"switchMap"],[61,150,36,122],[61,152,36,124,"eras"],[61,156,36,128],[61,160,36,133,"api"],[61,163,36,136],[61,164,36,137,"derive"],[61,170,36,143],[61,171,36,144,"staking"],[61,178,36,151],[61,179,36,152,"_stakerExposures"],[61,195,36,168],[61,196,36,169,"accountIds"],[61,206,36,179],[61,208,36,181,"eras"],[61,212,36,185],[61,214,36,187,"withActive"],[61,224,36,197],[61,225,36,198],[61,226,36,199],[61,227,36,200],[61,228,36,201],[62,2,37,0],[63,2,38,0],[64,0,39,0],[65,0,40,0],[66,0,41,0],[67,0,42,0],[68,0,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,2,51,7],[76,8,51,13,"stakerExposure"],[76,22,51,27],[76,25,51,30],[76,38,51,44],[76,42,51,44,"firstMemo"],[76,54,51,53],[76,55,51,53,"firstMemo"],[76,64,51,53],[76,66,51,54],[76,67,51,55,"api"],[76,70,51,58],[76,72,51,60,"accountId"],[76,81,51,69],[76,83,51,71,"withActive"],[76,93,51,81],[76,98,51,86,"api"],[76,101,51,89],[76,102,51,90,"derive"],[76,108,51,96],[76,109,51,97,"staking"],[76,116,51,104],[76,117,51,105,"stakerExposures"],[76,132,51,120],[76,133,51,121],[76,134,51,122,"accountId"],[76,143,51,131],[76,144,51,132],[76,146,51,134,"withActive"],[76,156,51,144],[76,157,51,145],[76,158,51,146],[77,0,51,147],[77,3]],"functionMap":{"names":["<global>","_stakerExposures","memo$argument_1","accountIds.map$argument_0","map$argument_0","stakerIds.map$argument_0","exposures.map$argument_0","nominating.forEach$argument_0","stakerExposures","switchMap$argument_0","firstMemo$argument_0"],"mappings":"AAA;OCE;4BCC;yCCC,yDD;2EEC,6BC,4BC;mCCQ;iBDE;SDG,CD,CF;KDC;CDC;OQc;4BNC,+FO,2EP,EM;CRC;sDUc,2FV"},"hasCjsExports":false},"type":"js/module"}]} |