Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/d7/6e070bcf6f34dd3c0b44396b6058b08265240e3c82cc82cdcd731f5d89db23c8aa0a3e
T
2025-10-24 02:50:33 +00:00

1 line
16 KiB
Plaintext

{"dependencies":[{"name":"rxjs","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":15,"index":127},"end":{"line":4,"column":30,"index":142}}],"key":"atDzfUGaJNRNtwyVumomzH/5ygw=","exportNames":["*"],"imports":1}},{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":15,"index":159},"end":{"line":5,"column":40,"index":184}}],"key":"u0mzEw2nilnHoUWtEdZl0JKHutA=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":6,"column":19,"index":205},"end":{"line":6,"column":46,"index":232}}],"key":"H94lp+EitftSFqDHaenrSs5zKB0=","exportNames":["*"],"imports":1}},{"name":"./constants.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":7,"column":23,"index":257},"end":{"line":7,"column":48,"index":282}}],"key":"GyCTB975X6u9hfNjUsMXB4zkCjA=","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.signingInfo = signingInfo;\n const rxjs_1 = require(_dependencyMap[0], \"rxjs\");\n const util_1 = require(_dependencyMap[1], \"@polkadot/util\");\n const index_js_1 = require(_dependencyMap[2], \"../util/index.js\");\n const constants_js_1 = require(_dependencyMap[3], \"./constants.js\");\n function latestNonce(api, address) {\n return api.derive.balances.account(address).pipe((0, rxjs_1.map)(({\n accountNonce\n }) => accountNonce));\n }\n function nextNonce(api, address) {\n if (api.call.accountNonceApi) {\n return api.call.accountNonceApi.accountNonce(address);\n } else {\n return api.rpc.system?.accountNextIndex ? api.rpc.system.accountNextIndex(address) : latestNonce(api, address);\n }\n }\n function signingHeader(api) {\n return (0, rxjs_1.combineLatest)([api.rpc.chain.getHeader().pipe((0, rxjs_1.switchMap)(header =>\n // check for chains at genesis (until block 1 is produced, e.g. 6s), since\n // we do need to allow transactions at chain start (also dev/seal chains)\n header.parentHash.isEmpty ? (0, rxjs_1.of)(header)\n // in the case of the current block, we use the parent to minimize the\n // impact of forks on the system, but not completely remove it\n : api.rpc.chain.getHeader(header.parentHash).pipe((0, rxjs_1.catchError)(() => (0, rxjs_1.of)(header))))), api.rpc.chain.getFinalizedHead().pipe((0, rxjs_1.switchMap)(hash => api.rpc.chain.getHeader(hash).pipe((0, rxjs_1.catchError)(() => (0, rxjs_1.of)(null)))))]).pipe((0, rxjs_1.map)(([current, finalized]) =>\n // determine the hash to use, current when lag > max, else finalized\n !finalized || (0, index_js_1.unwrapBlockNumber)(current).sub((0, index_js_1.unwrapBlockNumber)(finalized)).gt(constants_js_1.MAX_FINALITY_LAG) ? current : finalized));\n }\n function babeOrAuraPeriod(api) {\n const period = api.consts.babe?.expectedBlockTime ||\n // this will be present ones https://github.com/paritytech/polkadot-sdk/pull/3732 is merged\n // eslint-disable-next-line\n api.consts['aura']?.['slotDuration'] || api.consts.timestamp?.minimumPeriod.muln(2);\n return period && period.isZero && !period.isZero() ? period : undefined;\n }\n /**\n * @name signingInfo\n * @description Retrieves signing-related information for an account, including the nonce, block header, and mortal length.\n * @param {string} address The account address for which signing information is needed.\n * @param { BN | bigint | Uint8Array | number | string } nonce? (Optional) The nonce to use. If `undefined`, the latest nonce is retrieved.\n * @param { IExtrinsicEra | number } era? (Optional) The transaction era.\n * @example\n * ```javascript\n * const info = await api.derive.tx.signingInfo(\n * \"14mM9FRDDtwSYicjNxSvMfQkap8o4m9zHq7hNW4JpbSL4PPU\"\n * );\n * console.log(info);\n * ```\n */\n function signingInfo(_instanceId, api) {\n // no memo, we want to do this fresh on each run\n return (address, nonce, era) => (0, rxjs_1.combineLatest)([\n // retrieve nonce if none was specified\n (0, util_1.isUndefined)(nonce) ? latestNonce(api, address) : nonce === -1 ? nextNonce(api, address) : (0, rxjs_1.of)(api.registry.createType('Index', nonce)),\n // if no era (create) or era > 0 (mortal), do block retrieval\n (0, util_1.isUndefined)(era) || (0, util_1.isNumber)(era) && era > 0 ? signingHeader(api) : (0, rxjs_1.of)(null)]).pipe((0, rxjs_1.map)(([nonce, header]) => ({\n header,\n mortalLength: Math.min(api.consts.system?.blockHashCount?.toNumber() || constants_js_1.FALLBACK_MAX_HASH_COUNT, constants_js_1.MORTAL_PERIOD.div(babeOrAuraPeriod(api) || constants_js_1.FALLBACK_PERIOD).iadd(constants_js_1.MAX_FINALITY_LAG).toNumber()),\n nonce\n })));\n }\n});","lineCount":68,"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,"signingInfo"],[7,21,3,19],[7,24,3,22,"signingInfo"],[7,35,3,33],[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,"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,8,7,6,"constants_js_1"],[11,22,7,20],[11,25,7,23,"require"],[11,32,7,30],[11,33,7,30,"_dependencyMap"],[11,47,7,30],[11,68,7,47],[11,69,7,48],[12,2,8,0],[12,11,8,9,"latestNonce"],[12,22,8,20,"latestNonce"],[12,23,8,21,"api"],[12,26,8,24],[12,28,8,26,"address"],[12,35,8,33],[12,37,8,35],[13,4,9,4],[13,11,9,11,"api"],[13,14,9,14],[13,15,9,15,"derive"],[13,21,9,21],[13,22,9,22,"balances"],[13,30,9,30],[13,31,9,31,"account"],[13,38,9,38],[13,39,9,39,"address"],[13,46,9,46],[13,47,9,47],[13,48,9,48,"pipe"],[13,52,9,52],[13,53,9,53],[13,54,9,54],[13,55,9,55],[13,57,9,57,"rxjs_1"],[13,63,9,63],[13,64,9,64,"map"],[13,67,9,67],[13,69,9,69],[13,70,9,70],[14,6,9,72,"accountNonce"],[15,4,9,85],[15,5,9,86],[15,10,9,91,"accountNonce"],[15,22,9,103],[15,23,9,104],[15,24,9,105],[16,2,10,0],[17,2,11,0],[17,11,11,9,"nextNonce"],[17,20,11,18,"nextNonce"],[17,21,11,19,"api"],[17,24,11,22],[17,26,11,24,"address"],[17,33,11,31],[17,35,11,33],[18,4,12,4],[18,8,12,8,"api"],[18,11,12,11],[18,12,12,12,"call"],[18,16,12,16],[18,17,12,17,"accountNonceApi"],[18,32,12,32],[18,34,12,34],[19,6,13,8],[19,13,13,15,"api"],[19,16,13,18],[19,17,13,19,"call"],[19,21,13,23],[19,22,13,24,"accountNonceApi"],[19,37,13,39],[19,38,13,40,"accountNonce"],[19,50,13,52],[19,51,13,53,"address"],[19,58,13,60],[19,59,13,61],[20,4,14,4],[20,5,14,5],[20,11,15,9],[21,6,16,8],[21,13,16,15,"api"],[21,16,16,18],[21,17,16,19,"rpc"],[21,20,16,22],[21,21,16,23,"system"],[21,27,16,29],[21,29,16,31,"accountNextIndex"],[21,45,16,47],[21,48,17,14,"api"],[21,51,17,17],[21,52,17,18,"rpc"],[21,55,17,21],[21,56,17,22,"system"],[21,62,17,28],[21,63,17,29,"accountNextIndex"],[21,79,17,45],[21,80,17,46,"address"],[21,87,17,53],[21,88,17,54],[21,91,18,14,"latestNonce"],[21,102,18,25],[21,103,18,26,"api"],[21,106,18,29],[21,108,18,31,"address"],[21,115,18,38],[21,116,18,39],[22,4,19,4],[23,2,20,0],[24,2,21,0],[24,11,21,9,"signingHeader"],[24,24,21,22,"signingHeader"],[24,25,21,23,"api"],[24,28,21,26],[24,30,21,28],[25,4,22,4],[25,11,22,11],[25,12,22,12],[25,13,22,13],[25,15,22,15,"rxjs_1"],[25,21,22,21],[25,22,22,22,"combineLatest"],[25,35,22,35],[25,37,22,37],[25,38,23,8,"api"],[25,41,23,11],[25,42,23,12,"rpc"],[25,45,23,15],[25,46,23,16,"chain"],[25,51,23,21],[25,52,23,22,"getHeader"],[25,61,23,31],[25,62,23,32],[25,63,23,33],[25,64,23,34,"pipe"],[25,68,23,38],[25,69,23,39],[25,70,23,40],[25,71,23,41],[25,73,23,43,"rxjs_1"],[25,79,23,49],[25,80,23,50,"switchMap"],[25,89,23,59],[25,91,23,62,"header"],[25,97,23,68],[26,4,24,8],[27,4,25,8],[28,4,26,8,"header"],[28,10,26,14],[28,11,26,15,"parentHash"],[28,21,26,25],[28,22,26,26,"isEmpty"],[28,29,26,33],[28,32,27,14],[28,33,27,15],[28,34,27,16],[28,36,27,18,"rxjs_1"],[28,42,27,24],[28,43,27,25,"of"],[28,45,27,27],[28,47,27,29,"header"],[28,53,27,35],[29,4,28,12],[30,4,29,12],[31,4,29,12],[31,6,30,14,"api"],[31,9,30,17],[31,10,30,18,"rpc"],[31,13,30,21],[31,14,30,22,"chain"],[31,19,30,27],[31,20,30,28,"getHeader"],[31,29,30,37],[31,30,30,38,"header"],[31,36,30,44],[31,37,30,45,"parentHash"],[31,47,30,55],[31,48,30,56],[31,49,30,57,"pipe"],[31,53,30,61],[31,54,30,62],[31,55,30,63],[31,56,30,64],[31,58,30,66,"rxjs_1"],[31,64,30,72],[31,65,30,73,"catchError"],[31,75,30,83],[31,77,30,85],[31,83,30,91],[31,84,30,92],[31,85,30,93],[31,87,30,95,"rxjs_1"],[31,93,30,101],[31,94,30,102,"of"],[31,96,30,104],[31,98,30,106,"header"],[31,104,30,112],[31,105,30,113],[31,106,30,114],[31,107,30,115],[31,108,30,116],[31,109,30,117],[31,111,31,8,"api"],[31,114,31,11],[31,115,31,12,"rpc"],[31,118,31,15],[31,119,31,16,"chain"],[31,124,31,21],[31,125,31,22,"getFinalizedHead"],[31,141,31,38],[31,142,31,39],[31,143,31,40],[31,144,31,41,"pipe"],[31,148,31,45],[31,149,31,46],[31,150,31,47],[31,151,31,48],[31,153,31,50,"rxjs_1"],[31,159,31,56],[31,160,31,57,"switchMap"],[31,169,31,66],[31,171,31,69,"hash"],[31,175,31,73],[31,179,31,78,"api"],[31,182,31,81],[31,183,31,82,"rpc"],[31,186,31,85],[31,187,31,86,"chain"],[31,192,31,91],[31,193,31,92,"getHeader"],[31,202,31,101],[31,203,31,102,"hash"],[31,207,31,106],[31,208,31,107],[31,209,31,108,"pipe"],[31,213,31,112],[31,214,31,113],[31,215,31,114],[31,216,31,115],[31,218,31,117,"rxjs_1"],[31,224,31,123],[31,225,31,124,"catchError"],[31,235,31,134],[31,237,31,136],[31,243,31,142],[31,244,31,143],[31,245,31,144],[31,247,31,146,"rxjs_1"],[31,253,31,152],[31,254,31,153,"of"],[31,256,31,155],[31,258,31,157],[31,262,31,161],[31,263,31,162],[31,264,31,163],[31,265,31,164],[31,266,31,165],[31,267,31,166],[31,268,32,5],[31,269,32,6],[31,270,32,7,"pipe"],[31,274,32,11],[31,275,32,12],[31,276,32,13],[31,277,32,14],[31,279,32,16,"rxjs_1"],[31,285,32,22],[31,286,32,23,"map"],[31,289,32,26],[31,291,32,28],[31,292,32,29],[31,293,32,30,"current"],[31,300,32,37],[31,302,32,39,"finalized"],[31,311,32,48],[31,312,32,49],[32,4,33,4],[33,4,34,4],[33,5,34,5,"finalized"],[33,14,34,14],[33,18,34,18],[33,19,34,19],[33,20,34,20],[33,22,34,22,"index_js_1"],[33,32,34,32],[33,33,34,33,"unwrapBlockNumber"],[33,50,34,50],[33,52,34,52,"current"],[33,59,34,59],[33,60,34,60],[33,61,34,61,"sub"],[33,64,34,64],[33,65,34,65],[33,66,34,66],[33,67,34,67],[33,69,34,69,"index_js_1"],[33,79,34,79],[33,80,34,80,"unwrapBlockNumber"],[33,97,34,97],[33,99,34,99,"finalized"],[33,108,34,108],[33,109,34,109],[33,110,34,110],[33,111,34,111,"gt"],[33,113,34,113],[33,114,34,114,"constants_js_1"],[33,128,34,128],[33,129,34,129,"MAX_FINALITY_LAG"],[33,145,34,145],[33,146,34,146],[33,149,35,10,"current"],[33,156,35,17],[33,159,36,10,"finalized"],[33,168,36,19],[33,169,36,20],[33,170,36,21],[34,2,37,0],[35,2,38,0],[35,11,38,9,"babeOrAuraPeriod"],[35,27,38,25,"babeOrAuraPeriod"],[35,28,38,26,"api"],[35,31,38,29],[35,33,38,31],[36,4,39,4],[36,10,39,10,"period"],[36,16,39,16],[36,19,39,19,"api"],[36,22,39,22],[36,23,39,23,"consts"],[36,29,39,29],[36,30,39,30,"babe"],[36,34,39,34],[36,36,39,36,"expectedBlockTime"],[36,53,39,53],[37,4,40,8],[38,4,41,8],[39,4,42,8,"api"],[39,7,42,11],[39,8,42,12,"consts"],[39,14,42,18],[39,15,42,19],[39,21,42,25],[39,22,42,26],[39,25,42,29],[39,39,42,43],[39,40,42,44],[39,44,43,8,"api"],[39,47,43,11],[39,48,43,12,"consts"],[39,54,43,18],[39,55,43,19,"timestamp"],[39,64,43,28],[39,66,43,30,"minimumPeriod"],[39,79,43,43],[39,80,43,44,"muln"],[39,84,43,48],[39,85,43,49],[39,86,43,50],[39,87,43,51],[40,4,44,4],[40,11,44,11,"period"],[40,17,44,17],[40,21,44,21,"period"],[40,27,44,27],[40,28,44,28,"isZero"],[40,34,44,34],[40,38,44,38],[40,39,44,39,"period"],[40,45,44,45],[40,46,44,46,"isZero"],[40,52,44,52],[40,53,44,53],[40,54,44,54],[40,57,44,57,"period"],[40,63,44,63],[40,66,44,66,"undefined"],[40,75,44,75],[41,2,45,0],[42,2,46,0],[43,0,47,0],[44,0,48,0],[45,0,49,0],[46,0,50,0],[47,0,51,0],[48,0,52,0],[49,0,53,0],[50,0,54,0],[51,0,55,0],[52,0,56,0],[53,0,57,0],[54,0,58,0],[55,0,59,0],[56,2,60,0],[56,11,60,9,"signingInfo"],[56,22,60,20,"signingInfo"],[56,23,60,21,"_instanceId"],[56,34,60,32],[56,36,60,34,"api"],[56,39,60,37],[56,41,60,39],[57,4,61,4],[58,4,62,4],[58,11,62,11],[58,12,62,12,"address"],[58,19,62,19],[58,21,62,21,"nonce"],[58,26,62,26],[58,28,62,28,"era"],[58,31,62,31],[58,36,62,36],[58,37,62,37],[58,38,62,38],[58,40,62,40,"rxjs_1"],[58,46,62,46],[58,47,62,47,"combineLatest"],[58,60,62,60],[58,62,62,62],[59,4,63,8],[60,4,64,8],[60,5,64,9],[60,6,64,10],[60,8,64,12,"util_1"],[60,14,64,18],[60,15,64,19,"isUndefined"],[60,26,64,30],[60,28,64,32,"nonce"],[60,33,64,37],[60,34,64,38],[60,37,65,14,"latestNonce"],[60,48,65,25],[60,49,65,26,"api"],[60,52,65,29],[60,54,65,31,"address"],[60,61,65,38],[60,62,65,39],[60,65,66,14,"nonce"],[60,70,66,19],[60,75,66,24],[60,76,66,25],[60,77,66,26],[60,80,67,18,"nextNonce"],[60,89,67,27],[60,90,67,28,"api"],[60,93,67,31],[60,95,67,33,"address"],[60,102,67,40],[60,103,67,41],[60,106,68,18],[60,107,68,19],[60,108,68,20],[60,110,68,22,"rxjs_1"],[60,116,68,28],[60,117,68,29,"of"],[60,119,68,31],[60,121,68,33,"api"],[60,124,68,36],[60,125,68,37,"registry"],[60,133,68,45],[60,134,68,46,"createType"],[60,144,68,56],[60,145,68,57],[60,152,68,64],[60,154,68,66,"nonce"],[60,159,68,71],[60,160,68,72],[60,161,68,73],[61,4,69,8],[62,4,70,9],[62,5,70,10],[62,6,70,11],[62,8,70,13,"util_1"],[62,14,70,19],[62,15,70,20,"isUndefined"],[62,26,70,31],[62,28,70,33,"era"],[62,31,70,36],[62,32,70,37],[62,36,70,42],[62,37,70,43],[62,38,70,44],[62,40,70,46,"util_1"],[62,46,70,52],[62,47,70,53,"isNumber"],[62,55,70,61],[62,57,70,63,"era"],[62,60,70,66],[62,61,70,67],[62,65,70,71,"era"],[62,68,70,74],[62,71,70,77],[62,72,70,79],[62,75,71,14,"signingHeader"],[62,88,71,27],[62,89,71,28,"api"],[62,92,71,31],[62,93,71,32],[62,96,72,14],[62,97,72,15],[62,98,72,16],[62,100,72,18,"rxjs_1"],[62,106,72,24],[62,107,72,25,"of"],[62,109,72,27],[62,111,72,29],[62,115,72,33],[62,116,72,34],[62,117,73,5],[62,118,73,6],[62,119,73,7,"pipe"],[62,123,73,11],[62,124,73,12],[62,125,73,13],[62,126,73,14],[62,128,73,16,"rxjs_1"],[62,134,73,22],[62,135,73,23,"map"],[62,138,73,26],[62,140,73,28],[62,141,73,29],[62,142,73,30,"nonce"],[62,147,73,35],[62,149,73,37,"header"],[62,155,73,43],[62,156,73,44],[62,162,73,50],[63,6,74,8,"header"],[63,12,74,14],[64,6,75,8,"mortalLength"],[64,18,75,20],[64,20,75,22,"Math"],[64,24,75,26],[64,25,75,27,"min"],[64,28,75,30],[64,29,75,31,"api"],[64,32,75,34],[64,33,75,35,"consts"],[64,39,75,41],[64,40,75,42,"system"],[64,46,75,48],[64,48,75,50,"blockHashCount"],[64,62,75,64],[64,64,75,66,"toNumber"],[64,72,75,74],[64,73,75,75],[64,74,75,76],[64,78,75,80,"constants_js_1"],[64,92,75,94],[64,93,75,95,"FALLBACK_MAX_HASH_COUNT"],[64,116,75,118],[64,118,75,120,"constants_js_1"],[64,132,75,134],[64,133,75,135,"MORTAL_PERIOD"],[64,146,75,148],[64,147,76,13,"div"],[64,150,76,16],[64,151,76,17,"babeOrAuraPeriod"],[64,167,76,33],[64,168,76,34,"api"],[64,171,76,37],[64,172,76,38],[64,176,76,42,"constants_js_1"],[64,190,76,56],[64,191,76,57,"FALLBACK_PERIOD"],[64,206,76,72],[64,207,76,73],[64,208,77,13,"iadd"],[64,212,77,17],[64,213,77,18,"constants_js_1"],[64,227,77,32],[64,228,77,33,"MAX_FINALITY_LAG"],[64,244,77,49],[64,245,77,50],[64,246,78,13,"toNumber"],[64,254,78,21],[64,255,78,22],[64,256,78,23],[64,257,78,24],[65,6,79,8,"nonce"],[66,4,80,4],[66,5,80,5],[66,6,80,6],[66,7,80,7],[66,8,80,8],[67,2,81,0],[68,0,81,1],[68,3]],"functionMap":{"names":["<global>","latestNonce","<anonymous>","nextNonce","signingHeader","babeOrAuraPeriod","signingInfo"],"mappings":"AAA;ACO;qECC,kCD;CDC;AGC;CHS;AIC;6DFE;mHEO;oEFC,gGE;4BFC;mBEI;CJC;AKC;CLO;AMe;WJE;QIkB;CNC"},"hasCjsExports":true},"type":"js/module"}]}