mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 13:31:00 +00:00
1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
{"dependencies":[{"name":"rxjs","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":69,"index":69}}],"key":"PnOMrhZAPWoeW3ygrvUJ7ff768Y=","exportNames":["*"],"imports":1}},{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":2,"column":0,"index":70},"end":{"line":2,"column":55,"index":125}}],"key":"ISHU1ovvPMrCldqRjtd1JhW9dyo=","exportNames":["*"],"imports":1}},{"name":"../util/index.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":126},"end":{"line":3,"column":53,"index":179}}],"key":"GRJlO1cmIj14nBxcasNpiq30og4=","exportNames":["*"],"imports":1}},{"name":"./constants.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":4,"column":0,"index":180},"end":{"line":4,"column":107,"index":287}}],"key":"46QfplZMuoT7/1B4GqMDknw8q/g=","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 var _rxjs = require(_dependencyMap[0], \"rxjs\");\n var _polkadotUtil = require(_dependencyMap[1], \"@polkadot/util\");\n var _utilIndexJs = require(_dependencyMap[2], \"../util/index.js\");\n var _constantsJs = require(_dependencyMap[3], \"./constants.js\");\n function latestNonce(api, address) {\n return api.derive.balances.account(address).pipe((0, _rxjs.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.combineLatest)([api.rpc.chain.getHeader().pipe((0, _rxjs.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.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.catchError)(() => (0, _rxjs.of)(header))))), api.rpc.chain.getFinalizedHead().pipe((0, _rxjs.switchMap)(hash => api.rpc.chain.getHeader(hash).pipe((0, _rxjs.catchError)(() => (0, _rxjs.of)(null)))))]).pipe((0, _rxjs.map)(([current, finalized]) =>\n // determine the hash to use, current when lag > max, else finalized\n !finalized || (0, _utilIndexJs.unwrapBlockNumber)(current).sub((0, _utilIndexJs.unwrapBlockNumber)(finalized)).gt(_constantsJs.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.combineLatest)([\n // retrieve nonce if none was specified\n (0, _polkadotUtil.isUndefined)(nonce) ? latestNonce(api, address) : nonce === -1 ? nextNonce(api, address) : (0, _rxjs.of)(api.registry.createType('Index', nonce)),\n // if no era (create) or era > 0 (mortal), do block retrieval\n (0, _polkadotUtil.isUndefined)(era) || (0, _polkadotUtil.isNumber)(era) && era > 0 ? signingHeader(api) : (0, _rxjs.of)(null)]).pipe((0, _rxjs.map)(([nonce, header]) => ({\n header,\n mortalLength: Math.min(api.consts.system?.blockHashCount?.toNumber() || _constantsJs.FALLBACK_MAX_HASH_COUNT, _constantsJs.MORTAL_PERIOD.div(babeOrAuraPeriod(api) || _constantsJs.FALLBACK_PERIOD).iadd(_constantsJs.MAX_FINALITY_LAG).toNumber()),\n nonce\n })));\n }\n});","lineCount":68,"map":[[7,2,57,0,"exports"],[7,9,57,0],[7,10,57,0,"signingInfo"],[7,21,57,0],[7,24,57,0,"signingInfo"],[7,35,57,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,"_utilIndexJs"],[10,18,3,0],[10,21,3,0,"require"],[10,28,3,0],[10,29,3,0,"_dependencyMap"],[10,43,3,0],[11,2,4,0],[11,6,4,0,"_constantsJs"],[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],[12,11,5,9,"latestNonce"],[12,22,5,20,"latestNonce"],[12,23,5,21,"api"],[12,26,5,24],[12,28,5,26,"address"],[12,35,5,33],[12,37,5,35],[13,4,6,4],[13,11,6,11,"api"],[13,14,6,14],[13,15,6,15,"derive"],[13,21,6,21],[13,22,6,22,"balances"],[13,30,6,30],[13,31,6,31,"account"],[13,38,6,38],[13,39,6,39,"address"],[13,46,6,46],[13,47,6,47],[13,48,6,48,"pipe"],[13,52,6,52],[13,53,6,53],[13,57,6,53,"map"],[13,62,6,56],[13,63,6,56,"map"],[13,66,6,56],[13,68,6,57],[13,69,6,58],[14,6,6,60,"accountNonce"],[15,4,6,73],[15,5,6,74],[15,10,6,79,"accountNonce"],[15,22,6,91],[15,23,6,92],[15,24,6,93],[16,2,7,0],[17,2,8,0],[17,11,8,9,"nextNonce"],[17,20,8,18,"nextNonce"],[17,21,8,19,"api"],[17,24,8,22],[17,26,8,24,"address"],[17,33,8,31],[17,35,8,33],[18,4,9,4],[18,8,9,8,"api"],[18,11,9,11],[18,12,9,12,"call"],[18,16,9,16],[18,17,9,17,"accountNonceApi"],[18,32,9,32],[18,34,9,34],[19,6,10,8],[19,13,10,15,"api"],[19,16,10,18],[19,17,10,19,"call"],[19,21,10,23],[19,22,10,24,"accountNonceApi"],[19,37,10,39],[19,38,10,40,"accountNonce"],[19,50,10,52],[19,51,10,53,"address"],[19,58,10,60],[19,59,10,61],[20,4,11,4],[20,5,11,5],[20,11,12,9],[21,6,13,8],[21,13,13,15,"api"],[21,16,13,18],[21,17,13,19,"rpc"],[21,20,13,22],[21,21,13,23,"system"],[21,27,13,29],[21,29,13,31,"accountNextIndex"],[21,45,13,47],[21,48,14,14,"api"],[21,51,14,17],[21,52,14,18,"rpc"],[21,55,14,21],[21,56,14,22,"system"],[21,62,14,28],[21,63,14,29,"accountNextIndex"],[21,79,14,45],[21,80,14,46,"address"],[21,87,14,53],[21,88,14,54],[21,91,15,14,"latestNonce"],[21,102,15,25],[21,103,15,26,"api"],[21,106,15,29],[21,108,15,31,"address"],[21,115,15,38],[21,116,15,39],[22,4,16,4],[23,2,17,0],[24,2,18,0],[24,11,18,9,"signingHeader"],[24,24,18,22,"signingHeader"],[24,25,18,23,"api"],[24,28,18,26],[24,30,18,28],[25,4,19,4],[25,11,19,11],[25,15,19,11,"combineLatest"],[25,20,19,24],[25,21,19,24,"combineLatest"],[25,34,19,24],[25,36,19,25],[25,37,20,8,"api"],[25,40,20,11],[25,41,20,12,"rpc"],[25,44,20,15],[25,45,20,16,"chain"],[25,50,20,21],[25,51,20,22,"getHeader"],[25,60,20,31],[25,61,20,32],[25,62,20,33],[25,63,20,34,"pipe"],[25,67,20,38],[25,68,20,39],[25,72,20,39,"switchMap"],[25,77,20,48],[25,78,20,48,"switchMap"],[25,87,20,48],[25,89,20,50,"header"],[25,95,20,56],[26,4,21,8],[27,4,22,8],[28,4,23,8,"header"],[28,10,23,14],[28,11,23,15,"parentHash"],[28,21,23,25],[28,22,23,26,"isEmpty"],[28,29,23,33],[28,32,24,14],[28,36,24,14,"of"],[28,41,24,16],[28,42,24,16,"of"],[28,44,24,16],[28,46,24,17,"header"],[28,52,24,23],[29,4,25,12],[30,4,26,12],[31,4,26,12],[31,6,27,14,"api"],[31,9,27,17],[31,10,27,18,"rpc"],[31,13,27,21],[31,14,27,22,"chain"],[31,19,27,27],[31,20,27,28,"getHeader"],[31,29,27,37],[31,30,27,38,"header"],[31,36,27,44],[31,37,27,45,"parentHash"],[31,47,27,55],[31,48,27,56],[31,49,27,57,"pipe"],[31,53,27,61],[31,54,27,62],[31,58,27,62,"catchError"],[31,63,27,72],[31,64,27,72,"catchError"],[31,74,27,72],[31,76,27,73],[31,82,27,79],[31,86,27,79,"of"],[31,91,27,81],[31,92,27,81,"of"],[31,94,27,81],[31,96,27,82,"header"],[31,102,27,88],[31,103,27,89],[31,104,27,90],[31,105,27,91],[31,106,27,92],[31,107,27,93],[31,109,28,8,"api"],[31,112,28,11],[31,113,28,12,"rpc"],[31,116,28,15],[31,117,28,16,"chain"],[31,122,28,21],[31,123,28,22,"getFinalizedHead"],[31,139,28,38],[31,140,28,39],[31,141,28,40],[31,142,28,41,"pipe"],[31,146,28,45],[31,147,28,46],[31,151,28,46,"switchMap"],[31,156,28,55],[31,157,28,55,"switchMap"],[31,166,28,55],[31,168,28,57,"hash"],[31,172,28,61],[31,176,28,66,"api"],[31,179,28,69],[31,180,28,70,"rpc"],[31,183,28,73],[31,184,28,74,"chain"],[31,189,28,79],[31,190,28,80,"getHeader"],[31,199,28,89],[31,200,28,90,"hash"],[31,204,28,94],[31,205,28,95],[31,206,28,96,"pipe"],[31,210,28,100],[31,211,28,101],[31,215,28,101,"catchError"],[31,220,28,111],[31,221,28,111,"catchError"],[31,231,28,111],[31,233,28,112],[31,239,28,118],[31,243,28,118,"of"],[31,248,28,120],[31,249,28,120,"of"],[31,251,28,120],[31,253,28,121],[31,257,28,125],[31,258,28,126],[31,259,28,127],[31,260,28,128],[31,261,28,129],[31,262,28,130],[31,263,29,5],[31,264,29,6],[31,265,29,7,"pipe"],[31,269,29,11],[31,270,29,12],[31,274,29,12,"map"],[31,279,29,15],[31,280,29,15,"map"],[31,283,29,15],[31,285,29,16],[31,286,29,17],[31,287,29,18,"current"],[31,294,29,25],[31,296,29,27,"finalized"],[31,305,29,36],[31,306,29,37],[32,4,30,4],[33,4,31,4],[33,5,31,5,"finalized"],[33,14,31,14],[33,18,31,18],[33,22,31,18,"unwrapBlockNumber"],[33,34,31,35],[33,35,31,35,"unwrapBlockNumber"],[33,52,31,35],[33,54,31,36,"current"],[33,61,31,43],[33,62,31,44],[33,63,31,45,"sub"],[33,66,31,48],[33,67,31,49],[33,71,31,49,"unwrapBlockNumber"],[33,83,31,66],[33,84,31,66,"unwrapBlockNumber"],[33,101,31,66],[33,103,31,67,"finalized"],[33,112,31,76],[33,113,31,77],[33,114,31,78],[33,115,31,79,"gt"],[33,117,31,81],[33,118,31,82,"MAX_FINALITY_LAG"],[33,130,31,98],[33,131,31,98,"MAX_FINALITY_LAG"],[33,147,31,98],[33,148,31,99],[33,151,32,10,"current"],[33,158,32,17],[33,161,33,10,"finalized"],[33,170,33,19],[33,171,33,20],[33,172,33,21],[34,2,34,0],[35,2,35,0],[35,11,35,9,"babeOrAuraPeriod"],[35,27,35,25,"babeOrAuraPeriod"],[35,28,35,26,"api"],[35,31,35,29],[35,33,35,31],[36,4,36,4],[36,10,36,10,"period"],[36,16,36,16],[36,19,36,19,"api"],[36,22,36,22],[36,23,36,23,"consts"],[36,29,36,29],[36,30,36,30,"babe"],[36,34,36,34],[36,36,36,36,"expectedBlockTime"],[36,53,36,53],[37,4,37,8],[38,4,38,8],[39,4,39,8,"api"],[39,7,39,11],[39,8,39,12,"consts"],[39,14,39,18],[39,15,39,19],[39,21,39,25],[39,22,39,26],[39,25,39,29],[39,39,39,43],[39,40,39,44],[39,44,40,8,"api"],[39,47,40,11],[39,48,40,12,"consts"],[39,54,40,18],[39,55,40,19,"timestamp"],[39,64,40,28],[39,66,40,30,"minimumPeriod"],[39,79,40,43],[39,80,40,44,"muln"],[39,84,40,48],[39,85,40,49],[39,86,40,50],[39,87,40,51],[40,4,41,4],[40,11,41,11,"period"],[40,17,41,17],[40,21,41,21,"period"],[40,27,41,27],[40,28,41,28,"isZero"],[40,34,41,34],[40,38,41,38],[40,39,41,39,"period"],[40,45,41,45],[40,46,41,46,"isZero"],[40,52,41,52],[40,53,41,53],[40,54,41,54],[40,57,41,57,"period"],[40,63,41,63],[40,66,41,66,"undefined"],[40,75,41,75],[41,2,42,0],[42,2,43,0],[43,0,44,0],[44,0,45,0],[45,0,46,0],[46,0,47,0],[47,0,48,0],[48,0,49,0],[49,0,50,0],[50,0,51,0],[51,0,52,0],[52,0,53,0],[53,0,54,0],[54,0,55,0],[55,0,56,0],[56,2,57,7],[56,11,57,16,"signingInfo"],[56,22,57,27,"signingInfo"],[56,23,57,28,"_instanceId"],[56,34,57,39],[56,36,57,41,"api"],[56,39,57,44],[56,41,57,46],[57,4,58,4],[58,4,59,4],[58,11,59,11],[58,12,59,12,"address"],[58,19,59,19],[58,21,59,21,"nonce"],[58,26,59,26],[58,28,59,28,"era"],[58,31,59,31],[58,36,59,36],[58,40,59,36,"combineLatest"],[58,45,59,49],[58,46,59,49,"combineLatest"],[58,59,59,49],[58,61,59,50],[59,4,60,8],[60,4,61,8],[60,8,61,8,"isUndefined"],[60,21,61,19],[60,22,61,19,"isUndefined"],[60,33,61,19],[60,35,61,20,"nonce"],[60,40,61,25],[60,41,61,26],[60,44,62,14,"latestNonce"],[60,55,62,25],[60,56,62,26,"api"],[60,59,62,29],[60,61,62,31,"address"],[60,68,62,38],[60,69,62,39],[60,72,63,14,"nonce"],[60,77,63,19],[60,82,63,24],[60,83,63,25],[60,84,63,26],[60,87,64,18,"nextNonce"],[60,96,64,27],[60,97,64,28,"api"],[60,100,64,31],[60,102,64,33,"address"],[60,109,64,40],[60,110,64,41],[60,113,65,18],[60,117,65,18,"of"],[60,122,65,20],[60,123,65,20,"of"],[60,125,65,20],[60,127,65,21,"api"],[60,130,65,24],[60,131,65,25,"registry"],[60,139,65,33],[60,140,65,34,"createType"],[60,150,65,44],[60,151,65,45],[60,158,65,52],[60,160,65,54,"nonce"],[60,165,65,59],[60,166,65,60],[60,167,65,61],[61,4,66,8],[62,4,67,9],[62,8,67,9,"isUndefined"],[62,21,67,20],[62,22,67,20,"isUndefined"],[62,33,67,20],[62,35,67,21,"era"],[62,38,67,24],[62,39,67,25],[62,43,67,30],[62,47,67,30,"isNumber"],[62,60,67,38],[62,61,67,38,"isNumber"],[62,69,67,38],[62,71,67,39,"era"],[62,74,67,42],[62,75,67,43],[62,79,67,47,"era"],[62,82,67,50],[62,85,67,53],[62,86,67,55],[62,89,68,14,"signingHeader"],[62,102,68,27],[62,103,68,28,"api"],[62,106,68,31],[62,107,68,32],[62,110,69,14],[62,114,69,14,"of"],[62,119,69,16],[62,120,69,16,"of"],[62,122,69,16],[62,124,69,17],[62,128,69,21],[62,129,69,22],[62,130,70,5],[62,131,70,6],[62,132,70,7,"pipe"],[62,136,70,11],[62,137,70,12],[62,141,70,12,"map"],[62,146,70,15],[62,147,70,15,"map"],[62,150,70,15],[62,152,70,16],[62,153,70,17],[62,154,70,18,"nonce"],[62,159,70,23],[62,161,70,25,"header"],[62,167,70,31],[62,168,70,32],[62,174,70,38],[63,6,71,8,"header"],[63,12,71,14],[64,6,72,8,"mortalLength"],[64,18,72,20],[64,20,72,22,"Math"],[64,24,72,26],[64,25,72,27,"min"],[64,28,72,30],[64,29,72,31,"api"],[64,32,72,34],[64,33,72,35,"consts"],[64,39,72,41],[64,40,72,42,"system"],[64,46,72,48],[64,48,72,50,"blockHashCount"],[64,62,72,64],[64,64,72,66,"toNumber"],[64,72,72,74],[64,73,72,75],[64,74,72,76],[64,78,72,80,"FALLBACK_MAX_HASH_COUNT"],[64,90,72,103],[64,91,72,103,"FALLBACK_MAX_HASH_COUNT"],[64,114,72,103],[64,116,72,105,"MORTAL_PERIOD"],[64,128,72,118],[64,129,72,118,"MORTAL_PERIOD"],[64,142,72,118],[64,143,73,13,"div"],[64,146,73,16],[64,147,73,17,"babeOrAuraPeriod"],[64,163,73,33],[64,164,73,34,"api"],[64,167,73,37],[64,168,73,38],[64,172,73,42,"FALLBACK_PERIOD"],[64,184,73,57],[64,185,73,57,"FALLBACK_PERIOD"],[64,200,73,57],[64,201,73,58],[64,202,74,13,"iadd"],[64,206,74,17],[64,207,74,18,"MAX_FINALITY_LAG"],[64,219,74,34],[64,220,74,34,"MAX_FINALITY_LAG"],[64,236,74,34],[64,237,74,35],[64,238,75,13,"toNumber"],[64,246,75,21],[64,247,75,22],[64,248,75,23],[64,249,75,24],[65,6,76,8,"nonce"],[66,4,77,4],[66,5,77,5],[66,6,77,6],[66,7,77,7],[66,8,77,8],[67,2,78,0],[68,0,78,1],[68,3]],"functionMap":{"names":["<global>","latestNonce","map$argument_0","nextNonce","signingHeader","switchMap$argument_0","catchError$argument_0","babeOrAuraPeriod","signingInfo","<anonymous>"],"mappings":"AAA;ACI;yDCC,kCD;CDC;AGC;CHS;AIC;iDCE;yECO,gBD,ED;wDCC,wDC,cD,ED;gBFC;mBEI;CJC;AOC;CPO;OQe;WCE;gBPW;MOO,ED;CRC"},"hasCjsExports":false},"type":"js/module"}]} |