mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 01:51:03 +00:00
1 line
4.1 KiB
Plaintext
1 line
4.1 KiB
Plaintext
{"dependencies":[{"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 Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.votesOf = votesOf;\n const rxjs_1 = require(_dependencyMap[0], \"rxjs\");\n const index_js_1 = require(_dependencyMap[1], \"../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, accountId => api.derive.council.votes().pipe((0, rxjs_1.map)(votes => (votes.find(([from]) => from.eq(accountId)) || [null, {\n stake: api.registry.createType('Balance'),\n votes: []\n }])[1])));\n }\n});","lineCount":28,"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,"votesOf"],[7,17,3,15],[7,20,3,18,"votesOf"],[7,27,3,25],[8,2,4,0],[8,8,4,6,"rxjs_1"],[8,14,4,12],[8,17,4,15,"require"],[8,24,4,22],[8,25,4,22,"_dependencyMap"],[8,39,4,22],[8,50,4,29],[8,51,4,30],[9,2,5,0],[9,8,5,6,"index_js_1"],[9,18,5,16],[9,21,5,19,"require"],[9,28,5,26],[9,29,5,26,"_dependencyMap"],[9,43,5,26],[9,66,5,45],[9,67,5,46],[10,2,6,0],[11,0,7,0],[12,0,8,0],[13,0,9,0],[14,0,10,0],[15,0,11,0],[16,0,12,0],[17,0,13,0],[18,0,14,0],[19,0,15,0],[20,0,16,0],[21,0,17,0],[22,2,18,0],[22,11,18,9,"votesOf"],[22,18,18,16,"votesOf"],[22,19,18,17,"instanceId"],[22,29,18,27],[22,31,18,29,"api"],[22,34,18,32],[22,36,18,34],[23,4,19,4],[23,11,19,11],[23,12,19,12],[23,13,19,13],[23,15,19,15,"index_js_1"],[23,25,19,25],[23,26,19,26,"memo"],[23,30,19,30],[23,32,19,32,"instanceId"],[23,42,19,42],[23,44,19,45,"accountId"],[23,53,19,54],[23,57,19,59,"api"],[23,60,19,62],[23,61,19,63,"derive"],[23,67,19,69],[23,68,19,70,"council"],[23,75,19,77],[23,76,19,78,"votes"],[23,81,19,83],[23,82,19,84],[23,83,19,85],[23,84,19,86,"pipe"],[23,88,19,90],[23,89,19,91],[23,90,19,92],[23,91,19,93],[23,93,19,95,"rxjs_1"],[23,99,19,101],[23,100,19,102,"map"],[23,103,19,105],[23,105,19,108,"votes"],[23,110,19,113],[23,114,19,118],[23,115,19,119,"votes"],[23,120,19,124],[23,121,19,125,"find"],[23,125,19,129],[23,126,19,130],[23,127,19,131],[23,128,19,132,"from"],[23,132,19,136],[23,133,19,137],[23,138,19,142,"from"],[23,142,19,146],[23,143,19,147,"eq"],[23,145,19,149],[23,146,19,150,"accountId"],[23,155,19,159],[23,156,19,160],[23,157,19,161],[23,161,20,8],[23,162,20,9],[23,166,20,13],[23,168,20,15],[24,6,20,17,"stake"],[24,11,20,22],[24,13,20,24,"api"],[24,16,20,27],[24,17,20,28,"registry"],[24,25,20,36],[24,26,20,37,"createType"],[24,36,20,47],[24,37,20,48],[24,46,20,57],[24,47,20,58],[25,6,20,60,"votes"],[25,11,20,65],[25,13,20,67],[26,4,20,70],[26,5,20,71],[26,6,20,72],[26,8,20,74],[26,9,20,75],[26,10,20,76],[26,11,20,77],[26,12,20,78],[26,13,20,79],[27,2,21,0],[28,0,21,1],[28,3]],"functionMap":{"names":["<global>","votesOf","<anonymous>","votes.find$argument_0"],"mappings":"AAA;ACiB;4CCC,sFC,8BD;8EDC;CDC"},"hasCjsExports":true},"type":"js/module"}]} |