mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 16:51:02 +00:00
1 line
10 KiB
Plaintext
1 line
10 KiB
Plaintext
{"dependencies":[{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":76,"index":76}}],"key":"ISHU1ovvPMrCldqRjtd1JhW9dyo=","exportNames":["*"],"imports":1}},{"name":"./error.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":2,"column":0,"index":77},"end":{"line":2,"column":34,"index":111}}],"key":"ycPOBQoRsCJSxLowwoXjlScYLNE=","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 function _interopDefault(e) {\n return e && e.__esModule ? e : {\n default: e\n };\n }\n Object.defineProperty(exports, \"RpcCoder\", {\n enumerable: true,\n get: function () {\n return RpcCoder;\n }\n });\n var _polkadotUtil = require(_dependencyMap[0], \"@polkadot/util\");\n var _errorJs = require(_dependencyMap[1], \"./error.js\");\n var RpcError = _interopDefault(_errorJs);\n function formatErrorData(data) {\n if ((0, _polkadotUtil.isUndefined)(data)) {\n return '';\n }\n const formatted = `: ${(0, _polkadotUtil.isString)(data) ? data.replace(/Error\\(\"/g, '').replace(/\\(\"/g, '(').replace(/\"\\)/g, ')').replace(/\\(/g, ', ').replace(/\\)/g, '') : (0, _polkadotUtil.stringify)(data)}`;\n // We need some sort of cut-off here since these can be very large and\n // very nested, pick a number and trim the result display to it\n return formatted.length <= 256 ? formatted : `${formatted.substring(0, 255)}…`;\n }\n function checkError(error) {\n if (error) {\n const {\n code,\n data,\n message\n } = error;\n throw new RpcError.default(`${code}: ${message}${formatErrorData(data)}`, code, data);\n }\n }\n /** @internal */\n class RpcCoder {\n #id = 0;\n decodeResponse(response) {\n if (!response || response.jsonrpc !== '2.0') {\n throw new Error('Invalid jsonrpc field in decoded object');\n }\n const isSubscription = !(0, _polkadotUtil.isUndefined)(response.params) && !(0, _polkadotUtil.isUndefined)(response.method);\n if (!(0, _polkadotUtil.isNumber)(response.id) && (!isSubscription || !(0, _polkadotUtil.isNumber)(response.params.subscription) && !(0, _polkadotUtil.isString)(response.params.subscription))) {\n throw new Error('Invalid id field in decoded object');\n }\n checkError(response.error);\n if (response.result === undefined && !isSubscription) {\n throw new Error('No result found in jsonrpc response');\n }\n if (isSubscription) {\n checkError(response.params.error);\n return response.params.result;\n }\n return response.result;\n }\n encodeJson(method, params) {\n const [id, data] = this.encodeObject(method, params);\n return [id, (0, _polkadotUtil.stringify)(data)];\n }\n encodeObject(method, params) {\n const id = ++this.#id;\n return [id, {\n id,\n jsonrpc: '2.0',\n method,\n params\n }];\n }\n }\n});","lineCount":75,"map":[[12,2,23,0,"Object"],[12,8,23,0],[12,9,23,0,"defineProperty"],[12,23,23,0],[12,24,23,0,"exports"],[12,31,23,0],[13,4,23,0,"enumerable"],[13,14,23,0],[14,4,23,0,"get"],[14,7,23,0],[14,18,23,0,"get"],[14,19,23,0],[15,6,23,0],[15,13,23,0,"RpcCoder"],[15,21,23,0],[16,4,23,0],[17,2,23,0],[18,2,1,0],[18,6,1,0,"_polkadotUtil"],[18,19,1,0],[18,22,1,0,"require"],[18,29,1,0],[18,30,1,0,"_dependencyMap"],[18,44,1,0],[19,2,2,0],[19,6,2,0,"_errorJs"],[19,14,2,0],[19,17,2,0,"require"],[19,24,2,0],[19,25,2,0,"_dependencyMap"],[19,39,2,0],[20,2,2,0],[20,6,2,0,"RpcError"],[20,14,2,0],[20,17,2,0,"_interopDefault"],[20,32,2,0],[20,33,2,0,"_errorJs"],[20,41,2,0],[21,2,3,0],[21,11,3,9,"formatErrorData"],[21,26,3,24,"formatErrorData"],[21,27,3,25,"data"],[21,31,3,29],[21,33,3,31],[22,4,4,4],[22,8,4,8],[22,12,4,8,"isUndefined"],[22,25,4,19],[22,26,4,19,"isUndefined"],[22,37,4,19],[22,39,4,20,"data"],[22,43,4,24],[22,44,4,25],[22,46,4,27],[23,6,5,8],[23,13,5,15],[23,15,5,17],[24,4,6,4],[25,4,7,4],[25,10,7,10,"formatted"],[25,19,7,19],[25,22,7,22],[25,27,7,27],[25,31,7,27,"isString"],[25,44,7,35],[25,45,7,35,"isString"],[25,53,7,35],[25,55,7,36,"data"],[25,59,7,40],[25,60,7,41],[25,63,8,10,"data"],[25,67,8,14],[25,68,8,15,"replace"],[25,75,8,22],[25,76,8,23],[25,87,8,34],[25,89,8,36],[25,91,8,38],[25,92,8,39],[25,93,8,40,"replace"],[25,100,8,47],[25,101,8,48],[25,107,8,54],[25,109,8,56],[25,112,8,59],[25,113,8,60],[25,114,8,61,"replace"],[25,121,8,68],[25,122,8,69],[25,128,8,75],[25,130,8,77],[25,133,8,80],[25,134,8,81],[25,135,8,82,"replace"],[25,142,8,89],[25,143,8,90],[25,148,8,95],[25,150,8,97],[25,154,8,101],[25,155,8,102],[25,156,8,103,"replace"],[25,163,8,110],[25,164,8,111],[25,169,8,116],[25,171,8,118],[25,173,8,120],[25,174,8,121],[25,177,9,10],[25,181,9,10,"stringify"],[25,194,9,19],[25,195,9,19,"stringify"],[25,204,9,19],[25,206,9,20,"data"],[25,210,9,24],[25,211,9,25],[25,213,9,27],[26,4,10,4],[27,4,11,4],[28,4,12,4],[28,11,12,11,"formatted"],[28,20,12,20],[28,21,12,21,"length"],[28,27,12,27],[28,31,12,31],[28,34,12,34],[28,37,13,10,"formatted"],[28,46,13,19],[28,49,14,10],[28,52,14,13,"formatted"],[28,61,14,22],[28,62,14,23,"substring"],[28,71,14,32],[28,72,14,33],[28,73,14,34],[28,75,14,36],[28,78,14,39],[28,79,14,40],[28,82,14,43],[29,2,15,0],[30,2,16,0],[30,11,16,9,"checkError"],[30,21,16,19,"checkError"],[30,22,16,20,"error"],[30,27,16,25],[30,29,16,27],[31,4,17,4],[31,8,17,8,"error"],[31,13,17,13],[31,15,17,15],[32,6,18,8],[32,12,18,14],[33,8,18,16,"code"],[33,12,18,20],[34,8,18,22,"data"],[34,12,18,26],[35,8,18,28,"message"],[36,6,18,36],[36,7,18,37],[36,10,18,40,"error"],[36,15,18,45],[37,6,19,8],[37,12,19,14],[37,16,19,18,"RpcError"],[37,24,19,26],[37,25,19,26,"default"],[37,32,19,26],[37,33,19,27],[37,36,19,30,"code"],[37,40,19,34],[37,45,19,39,"message"],[37,52,19,46],[37,55,19,49,"formatErrorData"],[37,70,19,64],[37,71,19,65,"data"],[37,75,19,69],[37,76,19,70],[37,78,19,72],[37,80,19,74,"code"],[37,84,19,78],[37,86,19,80,"data"],[37,90,19,84],[37,91,19,85],[38,4,20,4],[39,2,21,0],[40,2,22,0],[41,2,23,7],[41,8,23,13,"RpcCoder"],[41,16,23,21],[41,17,23,22],[42,4,24,4],[42,5,24,5,"id"],[42,7,24,7],[42,10,24,10],[42,11,24,11],[43,4,25,4,"decodeResponse"],[43,18,25,18,"decodeResponse"],[43,19,25,19,"response"],[43,27,25,27],[43,29,25,29],[44,6,26,8],[44,10,26,12],[44,11,26,13,"response"],[44,19,26,21],[44,23,26,25,"response"],[44,31,26,33],[44,32,26,34,"jsonrpc"],[44,39,26,41],[44,44,26,46],[44,49,26,51],[44,51,26,53],[45,8,27,12],[45,14,27,18],[45,18,27,22,"Error"],[45,23,27,27],[45,24,27,28],[45,65,27,69],[45,66,27,70],[46,6,28,8],[47,6,29,8],[47,12,29,14,"isSubscription"],[47,26,29,28],[47,29,29,31],[47,30,29,32],[47,34,29,32,"isUndefined"],[47,47,29,43],[47,48,29,43,"isUndefined"],[47,59,29,43],[47,61,29,44,"response"],[47,69,29,52],[47,70,29,53,"params"],[47,76,29,59],[47,77,29,60],[47,81,29,64],[47,82,29,65],[47,86,29,65,"isUndefined"],[47,99,29,76],[47,100,29,76,"isUndefined"],[47,111,29,76],[47,113,29,77,"response"],[47,121,29,85],[47,122,29,86,"method"],[47,128,29,92],[47,129,29,93],[48,6,30,8],[48,10,30,12],[48,11,30,13],[48,15,30,13,"isNumber"],[48,28,30,21],[48,29,30,21,"isNumber"],[48,37,30,21],[48,39,30,22,"response"],[48,47,30,30],[48,48,30,31,"id"],[48,50,30,33],[48,51,30,34],[48,56,31,13],[48,57,31,14,"isSubscription"],[48,71,31,28],[48,75,31,33],[48,76,31,34],[48,80,31,34,"isNumber"],[48,93,31,42],[48,94,31,42,"isNumber"],[48,102,31,42],[48,104,31,43,"response"],[48,112,31,51],[48,113,31,52,"params"],[48,119,31,58],[48,120,31,59,"subscription"],[48,132,31,71],[48,133,31,72],[48,137,32,16],[48,138,32,17],[48,142,32,17,"isString"],[48,155,32,25],[48,156,32,25,"isString"],[48,164,32,25],[48,166,32,26,"response"],[48,174,32,34],[48,175,32,35,"params"],[48,181,32,41],[48,182,32,42,"subscription"],[48,194,32,54],[48,195,32,56],[48,196,32,57],[48,198,32,59],[49,8,33,12],[49,14,33,18],[49,18,33,22,"Error"],[49,23,33,27],[49,24,33,28],[49,60,33,64],[49,61,33,65],[50,6,34,8],[51,6,35,8,"checkError"],[51,16,35,18],[51,17,35,19,"response"],[51,25,35,27],[51,26,35,28,"error"],[51,31,35,33],[51,32,35,34],[52,6,36,8],[52,10,36,12,"response"],[52,18,36,20],[52,19,36,21,"result"],[52,25,36,27],[52,30,36,32,"undefined"],[52,39,36,41],[52,43,36,45],[52,44,36,46,"isSubscription"],[52,58,36,60],[52,60,36,62],[53,8,37,12],[53,14,37,18],[53,18,37,22,"Error"],[53,23,37,27],[53,24,37,28],[53,61,37,65],[53,62,37,66],[54,6,38,8],[55,6,39,8],[55,10,39,12,"isSubscription"],[55,24,39,26],[55,26,39,28],[56,8,40,12,"checkError"],[56,18,40,22],[56,19,40,23,"response"],[56,27,40,31],[56,28,40,32,"params"],[56,34,40,38],[56,35,40,39,"error"],[56,40,40,44],[56,41,40,45],[57,8,41,12],[57,15,41,19,"response"],[57,23,41,27],[57,24,41,28,"params"],[57,30,41,34],[57,31,41,35,"result"],[57,37,41,41],[58,6,42,8],[59,6,43,8],[59,13,43,15,"response"],[59,21,43,23],[59,22,43,24,"result"],[59,28,43,30],[60,4,44,4],[61,4,45,4,"encodeJson"],[61,14,45,14,"encodeJson"],[61,15,45,15,"method"],[61,21,45,21],[61,23,45,23,"params"],[61,29,45,29],[61,31,45,31],[62,6,46,8],[62,12,46,14],[62,13,46,15,"id"],[62,15,46,17],[62,17,46,19,"data"],[62,21,46,23],[62,22,46,24],[62,25,46,27],[62,29,46,31],[62,30,46,32,"encodeObject"],[62,42,46,44],[62,43,46,45,"method"],[62,49,46,51],[62,51,46,53,"params"],[62,57,46,59],[62,58,46,60],[63,6,47,8],[63,13,47,15],[63,14,47,16,"id"],[63,16,47,18],[63,18,47,20],[63,22,47,20,"stringify"],[63,35,47,29],[63,36,47,29,"stringify"],[63,45,47,29],[63,47,47,30,"data"],[63,51,47,34],[63,52,47,35],[63,53,47,36],[64,4,48,4],[65,4,49,4,"encodeObject"],[65,16,49,16,"encodeObject"],[65,17,49,17,"method"],[65,23,49,23],[65,25,49,25,"params"],[65,31,49,31],[65,33,49,33],[66,6,50,8],[66,12,50,14,"id"],[66,14,50,16],[66,17,50,19],[66,19,50,21],[66,23,50,25],[66,24,50,26],[66,25,50,27,"id"],[66,27,50,29],[67,6,51,8],[67,13,51,15],[67,14,51,16,"id"],[67,16,51,18],[67,18,51,20],[68,8,52,16,"id"],[68,10,52,18],[69,8,53,16,"jsonrpc"],[69,15,53,23],[69,17,53,25],[69,22,53,30],[70,8,54,16,"method"],[70,14,54,22],[71,8,55,16,"params"],[72,6,56,12],[72,7,56,13],[72,8,56,14],[73,4,57,4],[74,2,58,0],[75,0,58,1],[75,3]],"functionMap":{"names":["<global>","formatErrorData","checkError","RpcCoder","RpcCoder#decodeResponse","RpcCoder#encodeJson","RpcCoder#encodeObject"],"mappings":"AAA;ACE;CDY;AEC;CFK;OGE;ICE;KDmB;IEC;KFG;IGC;KHQ;CHC"},"hasCjsExports":false},"type":"js/module"}]} |