mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 07:41:01 +00:00
1 line
7.2 KiB
Plaintext
1 line
7.2 KiB
Plaintext
{"dependencies":[{"name":"rxjs","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":15,"index":125},"end":{"line":4,"column":30,"index":140}}],"key":"atDzfUGaJNRNtwyVumomzH/5ygw=","exportNames":["*"],"imports":1}},{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":15,"index":157},"end":{"line":5,"column":40,"index":182}}],"key":"u0mzEw2nilnHoUWtEdZl0JKHutA=","exportNames":["*"],"imports":1}},{"name":"@polkadot/util-crypto","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":6,"column":22,"index":206},"end":{"line":6,"column":54,"index":238}}],"key":"ZJJnwX+B+oj5JQmnkWFMF+4Lj2M=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":7,"column":19,"index":259},"end":{"line":7,"column":46,"index":286}}],"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.idAndIndex = idAndIndex;\n const rxjs_1 = require(_dependencyMap[0], \"rxjs\");\n const util_1 = require(_dependencyMap[1], \"@polkadot/util\");\n const util_crypto_1 = require(_dependencyMap[2], \"@polkadot/util-crypto\");\n const index_js_1 = require(_dependencyMap[3], \"../util/index.js\");\n /**\n * @name idAndIndex\n * @param {(Address | AccountId | AccountIndex | Uint8Array | string | null)} address An accounts address in various formats.\n * @description An array containing the [[AccountId]] and [[AccountIndex]] as optional values.\n * @example\n * ```javascript\n * api.derive.accounts.idAndIndex('F7Hs', ([id, ix]) => {\n * console.log(`AccountId #${id} with corresponding AccountIndex ${ix}`);\n * });\n * ```\n */\n function idAndIndex(instanceId, api) {\n return (0, index_js_1.memo)(instanceId, address => {\n try {\n // yes, this can fail, don't care too much, catch will catch it\n const decoded = (0, util_1.isU8a)(address) ? address : (0, util_crypto_1.decodeAddress)((address || '').toString());\n if (decoded.length > 8) {\n const accountId = api.registry.createType(decoded.length === 20 ? 'AccountId20' : 'AccountId', decoded);\n return api.derive.accounts.idToIndex(accountId).pipe((0, rxjs_1.map)(accountIndex => [accountId, accountIndex]));\n }\n const accountIndex = api.registry.createType('AccountIndex', decoded);\n return api.derive.accounts.indexToId(accountIndex.toString()).pipe((0, rxjs_1.map)(accountId => [accountId, accountIndex]));\n } catch {\n return (0, rxjs_1.of)([undefined, undefined]);\n }\n });\n }\n});","lineCount":39,"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,"idAndIndex"],[7,20,3,18],[7,23,3,21,"idAndIndex"],[7,33,3,31],[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,"util_1"],[9,14,5,12],[9,17,5,15,"require"],[9,24,5,22],[9,25,5,22,"_dependencyMap"],[9,39,5,22],[9,60,5,39],[9,61,5,40],[10,2,6,0],[10,8,6,6,"util_crypto_1"],[10,21,6,19],[10,24,6,22,"require"],[10,31,6,29],[10,32,6,29,"_dependencyMap"],[10,46,6,29],[10,74,6,53],[10,75,6,54],[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],[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,0,18,0],[23,2,19,0],[23,11,19,9,"idAndIndex"],[23,21,19,19,"idAndIndex"],[23,22,19,20,"instanceId"],[23,32,19,30],[23,34,19,32,"api"],[23,37,19,35],[23,39,19,37],[24,4,20,4],[24,11,20,11],[24,12,20,12],[24,13,20,13],[24,15,20,15,"index_js_1"],[24,25,20,25],[24,26,20,26,"memo"],[24,30,20,30],[24,32,20,32,"instanceId"],[24,42,20,42],[24,44,20,45,"address"],[24,51,20,52],[24,55,20,57],[25,6,21,8],[25,10,21,12],[26,8,22,12],[27,8,23,12],[27,14,23,18,"decoded"],[27,21,23,25],[27,24,23,28],[27,25,23,29],[27,26,23,30],[27,28,23,32,"util_1"],[27,34,23,38],[27,35,23,39,"isU8a"],[27,40,23,44],[27,42,23,46,"address"],[27,49,23,53],[27,50,23,54],[27,53,24,18,"address"],[27,60,24,25],[27,63,25,18],[27,64,25,19],[27,65,25,20],[27,67,25,22,"util_crypto_1"],[27,80,25,35],[27,81,25,36,"decodeAddress"],[27,94,25,49],[27,96,25,51],[27,97,25,52,"address"],[27,104,25,59],[27,108,25,63],[27,110,25,65],[27,112,25,67,"toString"],[27,120,25,75],[27,121,25,76],[27,122,25,77],[27,123,25,78],[28,8,26,12],[28,12,26,16,"decoded"],[28,19,26,23],[28,20,26,24,"length"],[28,26,26,30],[28,29,26,33],[28,30,26,34],[28,32,26,36],[29,10,27,16],[29,16,27,22,"accountId"],[29,25,27,31],[29,28,27,34,"api"],[29,31,27,37],[29,32,27,38,"registry"],[29,40,27,46],[29,41,27,47,"createType"],[29,51,27,57],[29,52,27,58,"decoded"],[29,59,27,65],[29,60,27,66,"length"],[29,66,27,72],[29,71,27,77],[29,73,27,79],[29,76,27,82],[29,89,27,95],[29,92,27,98],[29,103,27,109],[29,105,27,111,"decoded"],[29,112,27,118],[29,113,27,119],[30,10,28,16],[30,17,28,23,"api"],[30,20,28,26],[30,21,28,27,"derive"],[30,27,28,33],[30,28,28,34,"accounts"],[30,36,28,42],[30,37,28,43,"idToIndex"],[30,46,28,52],[30,47,28,53,"accountId"],[30,56,28,62],[30,57,28,63],[30,58,28,64,"pipe"],[30,62,28,68],[30,63,28,69],[30,64,28,70],[30,65,28,71],[30,67,28,73,"rxjs_1"],[30,73,28,79],[30,74,28,80,"map"],[30,77,28,83],[30,79,28,86,"accountIndex"],[30,91,28,98],[30,95,28,103],[30,96,28,104,"accountId"],[30,105,28,113],[30,107,28,115,"accountIndex"],[30,119,28,127],[30,120,28,128],[30,121,28,129],[30,122,28,130],[31,8,29,12],[32,8,30,12],[32,14,30,18,"accountIndex"],[32,26,30,30],[32,29,30,33,"api"],[32,32,30,36],[32,33,30,37,"registry"],[32,41,30,45],[32,42,30,46,"createType"],[32,52,30,56],[32,53,30,57],[32,67,30,71],[32,69,30,73,"decoded"],[32,76,30,80],[32,77,30,81],[33,8,31,12],[33,15,31,19,"api"],[33,18,31,22],[33,19,31,23,"derive"],[33,25,31,29],[33,26,31,30,"accounts"],[33,34,31,38],[33,35,31,39,"indexToId"],[33,44,31,48],[33,45,31,49,"accountIndex"],[33,57,31,61],[33,58,31,62,"toString"],[33,66,31,70],[33,67,31,71],[33,68,31,72],[33,69,31,73],[33,70,31,74,"pipe"],[33,74,31,78],[33,75,31,79],[33,76,31,80],[33,77,31,81],[33,79,31,83,"rxjs_1"],[33,85,31,89],[33,86,31,90,"map"],[33,89,31,93],[33,91,31,96,"accountId"],[33,100,31,105],[33,104,31,110],[33,105,31,111,"accountId"],[33,114,31,120],[33,116,31,122,"accountIndex"],[33,128,31,134],[33,129,31,135],[33,130,31,136],[33,131,31,137],[34,6,32,8],[34,7,32,9],[34,8,33,8],[34,14,33,14],[35,8,34,12],[35,15,34,19],[35,16,34,20],[35,17,34,21],[35,19,34,23,"rxjs_1"],[35,25,34,29],[35,26,34,30,"of"],[35,28,34,32],[35,30,34,34],[35,31,34,35,"undefined"],[35,40,34,44],[35,42,34,46,"undefined"],[35,51,34,55],[35,52,34,56],[35,53,34,57],[36,6,35,8],[37,4,36,4],[37,5,36,5],[37,6,36,6],[38,2,37,0],[39,0,37,1],[39,3]],"functionMap":{"names":["<global>","idAndIndex","<anonymous>"],"mappings":"AAA;ACkB;4CCC;KDgB;CDC"},"hasCjsExports":true},"type":"js/module"}]} |