mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 01:51:03 +00:00
1 line
4.9 KiB
Plaintext
1 line
4.9 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":4,"column":15,"index":119},"end":{"line":4,"column":30,"index":134}}],"key":"atDzfUGaJNRNtwyVumomzH/5ygw=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":19,"index":155},"end":{"line":5,"column":46,"index":182}}],"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.votesOf = votesOf;\n var rxjs_1 = require(_dependencyMap[1], \"rxjs\");\n var index_js_1 = require(_dependencyMap[2], \"../util/index.js\");\n /**\n * @name votesOf\n * @description Retrieves the council votes associated with a given account.\n * @returns The stake and the list of candidates the account has voted for.\n * @param {string | Uint8Array | AccountId} accountId The accountId to retrieve votes for.\n * @example\n * ```javascript\n * const accountId = \"5Gw3s7qQ9Z...\"; // Replace with a valid account ID\n * const votes = await api.derive.council.votesOf(accountId);\n * console.log(\"Account votes:\", votes);\n * ```\n */\n function votesOf(instanceId, api) {\n return (0, index_js_1.memo)(instanceId, function (accountId) {\n return api.derive.council.votes().pipe((0, rxjs_1.map)(function (votes) {\n return (votes.find(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 1),\n from = _ref2[0];\n return from.eq(accountId);\n }) || [null, {\n stake: api.registry.createType('Balance'),\n votes: []\n }])[1];\n }));\n });\n }\n});","lineCount":37,"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,"votesOf"],[8,17,3,15],[8,20,3,18,"votesOf"],[8,27,3,25],[9,2,4,0],[9,6,4,6,"rxjs_1"],[9,12,4,12],[9,15,4,15,"require"],[9,22,4,22],[9,23,4,22,"_dependencyMap"],[9,37,4,22],[9,48,4,29],[9,49,4,30],[10,2,5,0],[10,6,5,6,"index_js_1"],[10,16,5,16],[10,19,5,19,"require"],[10,26,5,26],[10,27,5,26,"_dependencyMap"],[10,41,5,26],[10,64,5,45],[10,65,5,46],[11,2,6,0],[12,0,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,2,18,0],[23,11,18,9,"votesOf"],[23,18,18,16,"votesOf"],[23,19,18,17,"instanceId"],[23,29,18,27],[23,31,18,29,"api"],[23,34,18,32],[23,36,18,34],[24,4,19,4],[24,11,19,11],[24,12,19,12],[24,13,19,13],[24,15,19,15,"index_js_1"],[24,25,19,25],[24,26,19,26,"memo"],[24,30,19,30],[24,32,19,32,"instanceId"],[24,42,19,42],[24,44,19,44],[24,54,19,45,"accountId"],[24,63,19,54],[25,6,19,54],[25,13,19,59,"api"],[25,16,19,62],[25,17,19,63,"derive"],[25,23,19,69],[25,24,19,70,"council"],[25,31,19,77],[25,32,19,78,"votes"],[25,37,19,83],[25,38,19,84],[25,39,19,85],[25,40,19,86,"pipe"],[25,44,19,90],[25,45,19,91],[25,46,19,92],[25,47,19,93],[25,49,19,95,"rxjs_1"],[25,55,19,101],[25,56,19,102,"map"],[25,59,19,105],[25,61,19,107],[25,71,19,108,"votes"],[25,76,19,113],[26,8,19,113],[26,15,19,118],[26,16,19,119,"votes"],[26,21,19,124],[26,22,19,125,"find"],[26,26,19,129],[26,27,19,130],[26,37,19,130,"_ref"],[26,41,19,130],[27,10,19,130],[27,14,19,130,"_ref2"],[27,19,19,130],[27,22,19,130,"_slicedToArray"],[27,36,19,130],[27,37,19,130,"_ref"],[27,41,19,130],[28,12,19,132,"from"],[28,16,19,136],[28,19,19,136,"_ref2"],[28,24,19,136],[29,10,19,136],[29,17,19,142,"from"],[29,21,19,146],[29,22,19,147,"eq"],[29,24,19,149],[29,25,19,150,"accountId"],[29,34,19,159],[29,35,19,160],[30,8,19,160],[30,10,19,161],[30,14,20,8],[30,15,20,9],[30,19,20,13],[30,21,20,15],[31,10,20,17,"stake"],[31,15,20,22],[31,17,20,24,"api"],[31,20,20,27],[31,21,20,28,"registry"],[31,29,20,36],[31,30,20,37,"createType"],[31,40,20,47],[31,41,20,48],[31,50,20,57],[31,51,20,58],[32,10,20,60,"votes"],[32,15,20,65],[32,17,20,67],[33,8,20,70],[33,9,20,71],[33,10,20,72],[33,12,20,74],[33,13,20,75],[33,14,20,76],[34,6,20,76],[34,8,20,77],[34,9,20,78],[35,4,20,78],[35,6,20,79],[36,2,21,0],[37,0,21,1],[37,3]],"functionMap":{"names":["<global>","votesOf","<anonymous>","votes.find$argument_0"],"mappings":"AAA;ACiB;4CCC,sFC,8BD;8EDC;CDC"},"hasCjsExports":true},"type":"js/module"}]} |