mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 12:21:01 +00:00
1 line
6.8 KiB
Plaintext
1 line
6.8 KiB
Plaintext
{"dependencies":[{"name":"rxjs","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":31,"index":31}}],"key":"PnOMrhZAPWoeW3ygrvUJ7ff768Y=","exportNames":["*"],"imports":1}},{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":2,"column":0,"index":32},"end":{"line":2,"column":39,"index":71}}],"key":"ISHU1ovvPMrCldqRjtd1JhW9dyo=","exportNames":["*"],"imports":1}},{"name":"@polkadot/util-crypto","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":72},"end":{"line":3,"column":54,"index":126}}],"key":"i6n5nZx9jV9OWiqinE0v9Jgj+DA=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":4,"column":0,"index":127},"end":{"line":4,"column":40,"index":167}}],"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.idAndIndex = idAndIndex;\n var _rxjs = require(_dependencyMap[0], \"rxjs\");\n var _polkadotUtil = require(_dependencyMap[1], \"@polkadot/util\");\n var _polkadotUtilCrypto = require(_dependencyMap[2], \"@polkadot/util-crypto\");\n var _utilIndexJs = 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, _utilIndexJs.memo)(instanceId, address => {\n try {\n // yes, this can fail, don't care too much, catch will catch it\n const decoded = (0, _polkadotUtil.isU8a)(address) ? address : (0, _polkadotUtilCrypto.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.map)(accountIndex => [accountId, accountIndex]));\n }\n const accountIndex = api.registry.createType('AccountIndex', decoded);\n return api.derive.accounts.indexToId(accountIndex.toString()).pipe((0, _rxjs.map)(accountId => [accountId, accountIndex]));\n } catch {\n return (0, _rxjs.of)([undefined, undefined]);\n }\n });\n }\n});","lineCount":39,"map":[[7,2,16,0,"exports"],[7,9,16,0],[7,10,16,0,"idAndIndex"],[7,20,16,0],[7,23,16,0,"idAndIndex"],[7,33,16,0],[8,2,1,0],[8,6,1,0,"_rxjs"],[8,11,1,0],[8,14,1,0,"require"],[8,21,1,0],[8,22,1,0,"_dependencyMap"],[8,36,1,0],[9,2,2,0],[9,6,2,0,"_polkadotUtil"],[9,19,2,0],[9,22,2,0,"require"],[9,29,2,0],[9,30,2,0,"_dependencyMap"],[9,44,2,0],[10,2,3,0],[10,6,3,0,"_polkadotUtilCrypto"],[10,25,3,0],[10,28,3,0,"require"],[10,35,3,0],[10,36,3,0,"_dependencyMap"],[10,50,3,0],[11,2,4,0],[11,6,4,0,"_utilIndexJs"],[11,18,4,0],[11,21,4,0,"require"],[11,28,4,0],[11,29,4,0,"_dependencyMap"],[11,43,4,0],[12,2,5,0],[13,0,6,0],[14,0,7,0],[15,0,8,0],[16,0,9,0],[17,0,10,0],[18,0,11,0],[19,0,12,0],[20,0,13,0],[21,0,14,0],[22,0,15,0],[23,2,16,7],[23,11,16,16,"idAndIndex"],[23,21,16,26,"idAndIndex"],[23,22,16,27,"instanceId"],[23,32,16,37],[23,34,16,39,"api"],[23,37,16,42],[23,39,16,44],[24,4,17,4],[24,11,17,11],[24,15,17,11,"memo"],[24,27,17,15],[24,28,17,15,"memo"],[24,32,17,15],[24,34,17,16,"instanceId"],[24,44,17,26],[24,46,17,29,"address"],[24,53,17,36],[24,57,17,41],[25,6,18,8],[25,10,18,12],[26,8,19,12],[27,8,20,12],[27,14,20,18,"decoded"],[27,21,20,25],[27,24,20,28],[27,28,20,28,"isU8a"],[27,41,20,33],[27,42,20,33,"isU8a"],[27,47,20,33],[27,49,20,34,"address"],[27,56,20,41],[27,57,20,42],[27,60,21,18,"address"],[27,67,21,25],[27,70,22,18],[27,74,22,18,"decodeAddress"],[27,93,22,31],[27,94,22,31,"decodeAddress"],[27,107,22,31],[27,109,22,32],[27,110,22,33,"address"],[27,117,22,40],[27,121,22,44],[27,123,22,46],[27,125,22,48,"toString"],[27,133,22,56],[27,134,22,57],[27,135,22,58],[27,136,22,59],[28,8,23,12],[28,12,23,16,"decoded"],[28,19,23,23],[28,20,23,24,"length"],[28,26,23,30],[28,29,23,33],[28,30,23,34],[28,32,23,36],[29,10,24,16],[29,16,24,22,"accountId"],[29,25,24,31],[29,28,24,34,"api"],[29,31,24,37],[29,32,24,38,"registry"],[29,40,24,46],[29,41,24,47,"createType"],[29,51,24,57],[29,52,24,58,"decoded"],[29,59,24,65],[29,60,24,66,"length"],[29,66,24,72],[29,71,24,77],[29,73,24,79],[29,76,24,82],[29,89,24,95],[29,92,24,98],[29,103,24,109],[29,105,24,111,"decoded"],[29,112,24,118],[29,113,24,119],[30,10,25,16],[30,17,25,23,"api"],[30,20,25,26],[30,21,25,27,"derive"],[30,27,25,33],[30,28,25,34,"accounts"],[30,36,25,42],[30,37,25,43,"idToIndex"],[30,46,25,52],[30,47,25,53,"accountId"],[30,56,25,62],[30,57,25,63],[30,58,25,64,"pipe"],[30,62,25,68],[30,63,25,69],[30,67,25,69,"map"],[30,72,25,72],[30,73,25,72,"map"],[30,76,25,72],[30,78,25,74,"accountIndex"],[30,90,25,86],[30,94,25,91],[30,95,25,92,"accountId"],[30,104,25,101],[30,106,25,103,"accountIndex"],[30,118,25,115],[30,119,25,116],[30,120,25,117],[30,121,25,118],[31,8,26,12],[32,8,27,12],[32,14,27,18,"accountIndex"],[32,26,27,30],[32,29,27,33,"api"],[32,32,27,36],[32,33,27,37,"registry"],[32,41,27,45],[32,42,27,46,"createType"],[32,52,27,56],[32,53,27,57],[32,67,27,71],[32,69,27,73,"decoded"],[32,76,27,80],[32,77,27,81],[33,8,28,12],[33,15,28,19,"api"],[33,18,28,22],[33,19,28,23,"derive"],[33,25,28,29],[33,26,28,30,"accounts"],[33,34,28,38],[33,35,28,39,"indexToId"],[33,44,28,48],[33,45,28,49,"accountIndex"],[33,57,28,61],[33,58,28,62,"toString"],[33,66,28,70],[33,67,28,71],[33,68,28,72],[33,69,28,73],[33,70,28,74,"pipe"],[33,74,28,78],[33,75,28,79],[33,79,28,79,"map"],[33,84,28,82],[33,85,28,82,"map"],[33,88,28,82],[33,90,28,84,"accountId"],[33,99,28,93],[33,103,28,98],[33,104,28,99,"accountId"],[33,113,28,108],[33,115,28,110,"accountIndex"],[33,127,28,122],[33,128,28,123],[33,129,28,124],[33,130,28,125],[34,6,29,8],[34,7,29,9],[34,8,30,8],[34,14,30,14],[35,8,31,12],[35,15,31,19],[35,19,31,19,"of"],[35,24,31,21],[35,25,31,21,"of"],[35,27,31,21],[35,29,31,22],[35,30,31,23,"undefined"],[35,39,31,32],[35,41,31,34,"undefined"],[35,50,31,43],[35,51,31,44],[35,52,31,45],[36,6,32,8],[37,4,33,4],[37,5,33,5],[37,6,33,6],[38,2,34,0],[39,0,34,1],[39,3]],"functionMap":{"names":["<global>","idAndIndex","memo$argument_1","map$argument_0"],"mappings":"AAA;OCe;4BCC;yECQ,2CD;mFCG,wCD;KDK;CDC"},"hasCjsExports":false},"type":"js/module"}]} |