Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/ed/b82351cc5c35bcdcfcd08f714a12b15fadb843226b1d39bdd9a761b5c9409053871b1f
T
2025-11-08 07:19:17 +00:00

1 line
13 KiB
Plaintext

{"dependencies":[{"name":"rxjs","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":15,"index":196},"end":{"line":5,"column":30,"index":211}}],"key":"atDzfUGaJNRNtwyVumomzH/5ygw=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":6,"column":19,"index":232},"end":{"line":6,"column":46,"index":259}}],"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.createBlockNumberDerive = createBlockNumberDerive;\n exports.getAuthorDetails = getAuthorDetails;\n const rxjs_1 = require(_dependencyMap[0], \"rxjs\");\n const index_js_1 = require(_dependencyMap[1], \"../util/index.js\");\n function createBlockNumberDerive(fn) {\n return (instanceId, api) => (0, index_js_1.memo)(instanceId, () => fn(api).pipe((0, rxjs_1.map)(index_js_1.unwrapBlockNumber)));\n }\n /** @internal */\n function getAuthorDetailsWithAt(header, queryAt) {\n const validators = queryAt.session?.validators ? queryAt.session.validators() : (0, rxjs_1.of)(null);\n // nimbus consensus stores the session key of the block author in header logs\n const {\n logs: [log]\n } = header.digest;\n const loggedAuthor = log && (log.isConsensus && log.asConsensus[0].isNimbus && log.asConsensus[1] || log.isPreRuntime && log.asPreRuntime[0].isNimbus && log.asPreRuntime[1]);\n if (loggedAuthor) {\n // use the author mapping pallet, if available (ie: moonbeam, moonriver), to map session (nimbus) key to author (collator/validator) key\n if (queryAt['authorMapping']?.['mappingWithDeposit']) {\n return (0, rxjs_1.combineLatest)([(0, rxjs_1.of)(header), validators, queryAt['authorMapping']['mappingWithDeposit'](loggedAuthor).pipe((0, rxjs_1.map)(o => o.unwrapOr({\n account: null\n }).account))]);\n }\n // fall back to session and parachain staking pallets, if available (ie: manta, calamari), to map session (nimbus) key to author (collator) key\n if (queryAt['parachainStaking']?.['selectedCandidates'] && queryAt.session?.nextKeys) {\n const loggedHex = loggedAuthor.toHex();\n return (0, rxjs_1.combineLatest)([(0, rxjs_1.of)(header), validators, queryAt['parachainStaking']['selectedCandidates']().pipe((0, rxjs_1.mergeMap)(selectedCandidates => (0, rxjs_1.combineLatest)([(0, rxjs_1.of)(selectedCandidates), queryAt.session.nextKeys.multi(selectedCandidates).pipe((0, rxjs_1.map)(nextKeys => nextKeys.findIndex(o => o.unwrapOrDefault().nimbus.toHex() === loggedHex)))])), (0, rxjs_1.map)(([selectedCandidates, index]) => index === -1 ? null : selectedCandidates[index]))]);\n }\n }\n // normal operation, non-mapping\n return (0, rxjs_1.combineLatest)([(0, rxjs_1.of)(header), validators, (0, rxjs_1.of)(null)]);\n }\n function getAuthorDetails(api, header, blockHash) {\n // For on-chain state, we need to retrieve it as per the start\n // of the block being constructed, i.e. session validators would\n // be at the point of the block construction, not when all operations\n // has been supplied.\n //\n // However for the first block (no parentHash available), we would\n // just use the as-is\n return api.queryAt(header.parentHash.isEmpty ? blockHash || header.hash : header.parentHash).pipe((0, rxjs_1.switchMap)(queryAt => getAuthorDetailsWithAt(header, queryAt)));\n }\n});","lineCount":48,"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,"createBlockNumberDerive"],[7,33,3,31],[7,36,3,34,"createBlockNumberDerive"],[7,59,3,57],[8,2,4,0,"exports"],[8,9,4,7],[8,10,4,8,"getAuthorDetails"],[8,26,4,24],[8,29,4,27,"getAuthorDetails"],[8,45,4,43],[9,2,5,0],[9,8,5,6,"rxjs_1"],[9,14,5,12],[9,17,5,15,"require"],[9,24,5,22],[9,25,5,22,"_dependencyMap"],[9,39,5,22],[9,50,5,29],[9,51,5,30],[10,2,6,0],[10,8,6,6,"index_js_1"],[10,18,6,16],[10,21,6,19,"require"],[10,28,6,26],[10,29,6,26,"_dependencyMap"],[10,43,6,26],[10,66,6,45],[10,67,6,46],[11,2,7,0],[11,11,7,9,"createBlockNumberDerive"],[11,34,7,32,"createBlockNumberDerive"],[11,35,7,33,"fn"],[11,37,7,35],[11,39,7,37],[12,4,8,4],[12,11,8,11],[12,12,8,12,"instanceId"],[12,22,8,22],[12,24,8,24,"api"],[12,27,8,27],[12,32,8,32],[12,33,8,33],[12,34,8,34],[12,36,8,36,"index_js_1"],[12,46,8,46],[12,47,8,47,"memo"],[12,51,8,51],[12,53,8,53,"instanceId"],[12,63,8,63],[12,65,8,65],[12,71,8,71,"fn"],[12,73,8,73],[12,74,8,74,"api"],[12,77,8,77],[12,78,8,78],[12,79,8,79,"pipe"],[12,83,8,83],[12,84,8,84],[12,85,8,85],[12,86,8,86],[12,88,8,88,"rxjs_1"],[12,94,8,94],[12,95,8,95,"map"],[12,98,8,98],[12,100,8,100,"index_js_1"],[12,110,8,110],[12,111,8,111,"unwrapBlockNumber"],[12,128,8,128],[12,129,8,129],[12,130,8,130],[12,131,8,131],[13,2,9,0],[14,2,10,0],[15,2,11,0],[15,11,11,9,"getAuthorDetailsWithAt"],[15,33,11,31,"getAuthorDetailsWithAt"],[15,34,11,32,"header"],[15,40,11,38],[15,42,11,40,"queryAt"],[15,49,11,47],[15,51,11,49],[16,4,12,4],[16,10,12,10,"validators"],[16,20,12,20],[16,23,12,23,"queryAt"],[16,30,12,30],[16,31,12,31,"session"],[16,38,12,38],[16,40,12,40,"validators"],[16,50,12,50],[16,53,13,10,"queryAt"],[16,60,13,17],[16,61,13,18,"session"],[16,68,13,25],[16,69,13,26,"validators"],[16,79,13,36],[16,80,13,37],[16,81,13,38],[16,84,14,10],[16,85,14,11],[16,86,14,12],[16,88,14,14,"rxjs_1"],[16,94,14,20],[16,95,14,21,"of"],[16,97,14,23],[16,99,14,25],[16,103,14,29],[16,104,14,30],[17,4,15,4],[18,4,16,4],[18,10,16,10],[19,6,16,12,"logs"],[19,10,16,16],[19,12,16,18],[19,13,16,19,"log"],[19,16,16,22],[20,4,16,24],[20,5,16,25],[20,8,16,28,"header"],[20,14,16,34],[20,15,16,35,"digest"],[20,21,16,41],[21,4,17,4],[21,10,17,10,"loggedAuthor"],[21,22,17,22],[21,25,17,26,"log"],[21,28,17,29],[21,33,17,35,"log"],[21,36,17,38],[21,37,17,39,"isConsensus"],[21,48,17,50],[21,52,17,54,"log"],[21,55,17,57],[21,56,17,58,"asConsensus"],[21,67,17,69],[21,68,17,70],[21,69,17,71],[21,70,17,72],[21,71,17,73,"isNimbus"],[21,79,17,81],[21,83,17,85,"log"],[21,86,17,88],[21,87,17,89,"asConsensus"],[21,98,17,100],[21,99,17,101],[21,100,17,102],[21,101,17,103],[21,105,18,9,"log"],[21,108,18,12],[21,109,18,13,"isPreRuntime"],[21,121,18,25],[21,125,18,29,"log"],[21,128,18,32],[21,129,18,33,"asPreRuntime"],[21,141,18,45],[21,142,18,46],[21,143,18,47],[21,144,18,48],[21,145,18,49,"isNimbus"],[21,153,18,57],[21,157,18,61,"log"],[21,160,18,64],[21,161,18,65,"asPreRuntime"],[21,173,18,77],[21,174,18,78],[21,175,18,79],[21,176,18,81],[21,177,18,83],[22,4,19,4],[22,8,19,8,"loggedAuthor"],[22,20,19,20],[22,22,19,22],[23,6,20,8],[24,6,21,8],[24,10,21,12,"queryAt"],[24,17,21,19],[24,18,21,20],[24,33,21,35],[24,34,21,36],[24,37,21,39],[24,57,21,59],[24,58,21,60],[24,60,21,62],[25,8,22,12],[25,15,22,19],[25,16,22,20],[25,17,22,21],[25,19,22,23,"rxjs_1"],[25,25,22,29],[25,26,22,30,"combineLatest"],[25,39,22,43],[25,41,22,45],[25,42,23,16],[25,43,23,17],[25,44,23,18],[25,46,23,20,"rxjs_1"],[25,52,23,26],[25,53,23,27,"of"],[25,55,23,29],[25,57,23,31,"header"],[25,63,23,37],[25,64,23,38],[25,66,24,16,"validators"],[25,76,24,26],[25,78,25,16,"queryAt"],[25,85,25,23],[25,86,25,24],[25,101,25,39],[25,102,25,40],[25,103,25,41],[25,123,25,61],[25,124,25,62],[25,125,25,63,"loggedAuthor"],[25,137,25,75],[25,138,25,76],[25,139,25,77,"pipe"],[25,143,25,81],[25,144,25,82],[25,145,25,83],[25,146,25,84],[25,148,25,86,"rxjs_1"],[25,154,25,92],[25,155,25,93,"map"],[25,158,25,96],[25,160,25,99,"o"],[25,161,25,100],[25,165,25,105,"o"],[25,166,25,106],[25,167,25,107,"unwrapOr"],[25,175,25,115],[25,176,25,116],[26,10,25,118,"account"],[26,17,25,125],[26,19,25,127],[27,8,25,132],[27,9,25,133],[27,10,25,134],[27,11,25,135,"account"],[27,18,25,142],[27,19,25,143],[27,20,25,144],[27,21,26,13],[27,22,26,14],[28,6,27,8],[29,6,28,8],[30,6,29,8],[30,10,29,12,"queryAt"],[30,17,29,19],[30,18,29,20],[30,36,29,38],[30,37,29,39],[30,40,29,42],[30,60,29,62],[30,61,29,63],[30,65,29,67,"queryAt"],[30,72,29,74],[30,73,29,75,"session"],[30,80,29,82],[30,82,29,84,"nextKeys"],[30,90,29,92],[30,92,29,94],[31,8,30,12],[31,14,30,18,"loggedHex"],[31,23,30,27],[31,26,30,30,"loggedAuthor"],[31,38,30,42],[31,39,30,43,"toHex"],[31,44,30,48],[31,45,30,49],[31,46,30,50],[32,8,31,12],[32,15,31,19],[32,16,31,20],[32,17,31,21],[32,19,31,23,"rxjs_1"],[32,25,31,29],[32,26,31,30,"combineLatest"],[32,39,31,43],[32,41,31,45],[32,42,32,16],[32,43,32,17],[32,44,32,18],[32,46,32,20,"rxjs_1"],[32,52,32,26],[32,53,32,27,"of"],[32,55,32,29],[32,57,32,31,"header"],[32,63,32,37],[32,64,32,38],[32,66,33,16,"validators"],[32,76,33,26],[32,78,34,16,"queryAt"],[32,85,34,23],[32,86,34,24],[32,104,34,42],[32,105,34,43],[32,106,34,44],[32,126,34,64],[32,127,34,65],[32,128,34,66],[32,129,34,67],[32,130,34,68,"pipe"],[32,134,34,72],[32,135,34,73],[32,136,34,74],[32,137,34,75],[32,139,34,77,"rxjs_1"],[32,145,34,83],[32,146,34,84,"mergeMap"],[32,154,34,92],[32,156,34,95,"selectedCandidates"],[32,174,34,113],[32,178,34,118],[32,179,34,119],[32,180,34,120],[32,182,34,122,"rxjs_1"],[32,188,34,128],[32,189,34,129,"combineLatest"],[32,202,34,142],[32,204,34,144],[32,205,35,20],[32,206,35,21],[32,207,35,22],[32,209,35,24,"rxjs_1"],[32,215,35,30],[32,216,35,31,"of"],[32,218,35,33],[32,220,35,35,"selectedCandidates"],[32,238,35,53],[32,239,35,54],[32,241,36,20,"queryAt"],[32,248,36,27],[32,249,36,28,"session"],[32,256,36,35],[32,257,36,36,"nextKeys"],[32,265,36,44],[32,266,36,45,"multi"],[32,271,36,50],[32,272,36,51,"selectedCandidates"],[32,290,36,69],[32,291,36,70],[32,292,36,71,"pipe"],[32,296,36,75],[32,297,36,76],[32,298,36,77],[32,299,36,78],[32,301,36,80,"rxjs_1"],[32,307,36,86],[32,308,36,87,"map"],[32,311,36,90],[32,313,36,93,"nextKeys"],[32,321,36,101],[32,325,36,106,"nextKeys"],[32,333,36,114],[32,334,36,115,"findIndex"],[32,343,36,124],[32,344,36,126,"o"],[32,345,36,127],[32,349,36,132,"o"],[32,350,36,133],[32,351,36,134,"unwrapOrDefault"],[32,366,36,149],[32,367,36,150],[32,368,36,151],[32,369,36,152,"nimbus"],[32,375,36,158],[32,376,36,159,"toHex"],[32,381,36,164],[32,382,36,165],[32,383,36,166],[32,388,36,171,"loggedHex"],[32,397,36,180],[32,398,36,181],[32,399,36,182],[32,400,36,183],[32,401,37,17],[32,402,37,18],[32,403,37,19],[32,405,37,21],[32,406,37,22],[32,407,37,23],[32,409,37,25,"rxjs_1"],[32,415,37,31],[32,416,37,32,"map"],[32,419,37,35],[32,421,37,37],[32,422,37,38],[32,423,37,39,"selectedCandidates"],[32,441,37,57],[32,443,37,59,"index"],[32,448,37,64],[32,449,37,65],[32,454,37,70,"index"],[32,459,37,75],[32,464,37,80],[32,465,37,81],[32,466,37,82],[32,469,38,22],[32,473,38,26],[32,476,39,22,"selectedCandidates"],[32,494,39,40],[32,495,39,41,"index"],[32,500,39,46],[32,501,39,47],[32,502,39,48],[32,503,39,49],[32,504,40,13],[32,505,40,14],[33,6,41,8],[34,4,42,4],[35,4,43,4],[36,4,44,4],[36,11,44,11],[36,12,44,12],[36,13,44,13],[36,15,44,15,"rxjs_1"],[36,21,44,21],[36,22,44,22,"combineLatest"],[36,35,44,35],[36,37,44,37],[36,38,45,8],[36,39,45,9],[36,40,45,10],[36,42,45,12,"rxjs_1"],[36,48,45,18],[36,49,45,19,"of"],[36,51,45,21],[36,53,45,23,"header"],[36,59,45,29],[36,60,45,30],[36,62,46,8,"validators"],[36,72,46,18],[36,74,47,8],[36,75,47,9],[36,76,47,10],[36,78,47,12,"rxjs_1"],[36,84,47,18],[36,85,47,19,"of"],[36,87,47,21],[36,89,47,23],[36,93,47,27],[36,94,47,28],[36,95,48,5],[36,96,48,6],[37,2,49,0],[38,2,50,0],[38,11,50,9,"getAuthorDetails"],[38,27,50,25,"getAuthorDetails"],[38,28,50,26,"api"],[38,31,50,29],[38,33,50,31,"header"],[38,39,50,37],[38,41,50,39,"blockHash"],[38,50,50,48],[38,52,50,50],[39,4,51,4],[40,4,52,4],[41,4,53,4],[42,4,54,4],[43,4,55,4],[44,4,56,4],[45,4,57,4],[46,4,58,4],[46,11,58,11,"api"],[46,14,58,14],[46,15,58,15,"queryAt"],[46,22,58,22],[46,23,58,23,"header"],[46,29,58,29],[46,30,58,30,"parentHash"],[46,40,58,40],[46,41,58,41,"isEmpty"],[46,48,58,48],[46,51,59,10,"blockHash"],[46,60,59,19],[46,64,59,23,"header"],[46,70,59,29],[46,71,59,30,"hash"],[46,75,59,34],[46,78,60,10,"header"],[46,84,60,16],[46,85,60,17,"parentHash"],[46,95,60,27],[46,96,60,28],[46,97,60,29,"pipe"],[46,101,60,33],[46,102,60,34],[46,103,60,35],[46,104,60,36],[46,106,60,38,"rxjs_1"],[46,112,60,44],[46,113,60,45,"switchMap"],[46,122,60,54],[46,124,60,57,"queryAt"],[46,131,60,64],[46,135,60,69,"getAuthorDetailsWithAt"],[46,157,60,91],[46,158,60,92,"header"],[46,164,60,98],[46,166,60,100,"queryAt"],[46,173,60,107],[46,174,60,108],[46,175,60,109],[46,176,60,110],[47,2,61,0],[48,0,61,1],[48,3]],"functionMap":{"names":["<global>","createBlockNumberDerive","<anonymous>","getAuthorDetailsWithAt","nextKeys.findIndex$argument_0","getAuthorDetails"],"mappings":"AAA;ACM;WCC,wHD;CDC;AGE;kGDc,4CC;8FDS;6HEE,uDF;kBCC,mBD;+CCE;CHU;AKC;wDHU,oDG;CLC"},"hasCjsExports":true},"type":"js/module"}]}