mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 21:31:02 +00:00
1 line
14 KiB
Plaintext
1 line
14 KiB
Plaintext
{"dependencies":[{"name":"@polkadot/types-codec","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":22,"index":236},"end":{"line":4,"column":54,"index":268}}],"key":"fW1yxuTjZe66ggmM4ihNuGjKSV0=","exportNames":["*"],"imports":1}},{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":15,"index":285},"end":{"line":5,"column":40,"index":310}}],"key":"u0mzEw2nilnHoUWtEdZl0JKHutA=","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.GenericConsensusEngineId = exports.CID_NMBS = exports.CID_POW = exports.CID_GRPA = exports.CID_BABE = exports.CID_AURA = void 0;\n const types_codec_1 = require(_dependencyMap[0], \"@polkadot/types-codec\");\n const util_1 = require(_dependencyMap[1], \"@polkadot/util\");\n exports.CID_AURA = (0, util_1.stringToU8a)('aura');\n exports.CID_BABE = (0, util_1.stringToU8a)('BABE');\n exports.CID_GRPA = (0, util_1.stringToU8a)('FRNK');\n exports.CID_POW = (0, util_1.stringToU8a)('pow_');\n exports.CID_NMBS = (0, util_1.stringToU8a)('nmbs');\n function getAuraAuthor(registry, bytes, sessionValidators) {\n return sessionValidators[registry.createTypeUnsafe('RawAuraPreDigest', [bytes.toU8a(true)]).slotNumber.mod(new util_1.BN(sessionValidators.length)).toNumber()];\n }\n function getBabeAuthor(registry, bytes, sessionValidators) {\n const digest = registry.createTypeUnsafe('RawBabePreDigestCompat', [bytes.toU8a(true)]);\n return sessionValidators[digest.value.toNumber()];\n }\n function getBytesAsAuthor(registry, bytes) {\n return registry.createTypeUnsafe('AccountId', [bytes]);\n }\n /**\n * @name GenericConsensusEngineId\n * @description\n * A 4-byte identifier identifying the engine\n */\n class GenericConsensusEngineId extends types_codec_1.U8aFixed {\n constructor(registry, value) {\n super(registry, (0, util_1.isNumber)(value) ? (0, util_1.bnToU8a)(value, {\n isLe: false\n }) : value, 32);\n }\n /**\n * @description `true` if the engine matches aura\n */\n get isAura() {\n return this.eq(exports.CID_AURA);\n }\n /**\n * @description `true` is the engine matches babe\n */\n get isBabe() {\n return this.eq(exports.CID_BABE);\n }\n /**\n * @description `true` is the engine matches grandpa\n */\n get isGrandpa() {\n return this.eq(exports.CID_GRPA);\n }\n /**\n * @description `true` is the engine matches pow\n */\n get isPow() {\n return this.eq(exports.CID_POW);\n }\n /**\n * @description `true` is the engine matches nimbus\n */\n get isNimbus() {\n return this.eq(exports.CID_NMBS);\n }\n /**\n * @description From the input bytes, decode into an author\n */\n extractAuthor(bytes, sessionValidators) {\n if (sessionValidators?.length) {\n if (this.isAura) {\n return getAuraAuthor(this.registry, bytes, sessionValidators);\n } else if (this.isBabe) {\n return getBabeAuthor(this.registry, bytes, sessionValidators);\n }\n }\n // For pow & Nimbus, the bytes are the actual author\n if (this.isPow || this.isNimbus) {\n return getBytesAsAuthor(this.registry, bytes);\n }\n return undefined;\n }\n /**\n * @description Converts the Object to to a human-friendly JSON, with additional fields, expansion and formatting of information\n */\n toHuman() {\n return this.toString();\n }\n /**\n * @description Returns the base runtime type name for this instance\n */\n toRawType() {\n return 'ConsensusEngineId';\n }\n /**\n * @description Override the default toString to return a 4-byte string\n */\n toString() {\n return this.isAscii ? (0, util_1.u8aToString)(this) : (0, util_1.u8aToHex)(this);\n }\n }\n exports.GenericConsensusEngineId = GenericConsensusEngineId;\n});","lineCount":103,"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,"GenericConsensusEngineId"],[7,34,3,32],[7,37,3,35,"exports"],[7,44,3,42],[7,45,3,43,"CID_NMBS"],[7,53,3,51],[7,56,3,54,"exports"],[7,63,3,61],[7,64,3,62,"CID_POW"],[7,71,3,69],[7,74,3,72,"exports"],[7,81,3,79],[7,82,3,80,"CID_GRPA"],[7,90,3,88],[7,93,3,91,"exports"],[7,100,3,98],[7,101,3,99,"CID_BABE"],[7,109,3,107],[7,112,3,110,"exports"],[7,119,3,117],[7,120,3,118,"CID_AURA"],[7,128,3,126],[7,131,3,129],[7,136,3,134],[7,137,3,135],[8,2,4,0],[8,8,4,6,"types_codec_1"],[8,21,4,19],[8,24,4,22,"require"],[8,31,4,29],[8,32,4,29,"_dependencyMap"],[8,46,4,29],[8,74,4,53],[8,75,4,54],[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,"exports"],[10,9,6,7],[10,10,6,8,"CID_AURA"],[10,18,6,16],[10,21,6,19],[10,22,6,20],[10,23,6,21],[10,25,6,23,"util_1"],[10,31,6,29],[10,32,6,30,"stringToU8a"],[10,43,6,41],[10,45,6,43],[10,51,6,49],[10,52,6,50],[11,2,7,0,"exports"],[11,9,7,7],[11,10,7,8,"CID_BABE"],[11,18,7,16],[11,21,7,19],[11,22,7,20],[11,23,7,21],[11,25,7,23,"util_1"],[11,31,7,29],[11,32,7,30,"stringToU8a"],[11,43,7,41],[11,45,7,43],[11,51,7,49],[11,52,7,50],[12,2,8,0,"exports"],[12,9,8,7],[12,10,8,8,"CID_GRPA"],[12,18,8,16],[12,21,8,19],[12,22,8,20],[12,23,8,21],[12,25,8,23,"util_1"],[12,31,8,29],[12,32,8,30,"stringToU8a"],[12,43,8,41],[12,45,8,43],[12,51,8,49],[12,52,8,50],[13,2,9,0,"exports"],[13,9,9,7],[13,10,9,8,"CID_POW"],[13,17,9,15],[13,20,9,18],[13,21,9,19],[13,22,9,20],[13,24,9,22,"util_1"],[13,30,9,28],[13,31,9,29,"stringToU8a"],[13,42,9,40],[13,44,9,42],[13,50,9,48],[13,51,9,49],[14,2,10,0,"exports"],[14,9,10,7],[14,10,10,8,"CID_NMBS"],[14,18,10,16],[14,21,10,19],[14,22,10,20],[14,23,10,21],[14,25,10,23,"util_1"],[14,31,10,29],[14,32,10,30,"stringToU8a"],[14,43,10,41],[14,45,10,43],[14,51,10,49],[14,52,10,50],[15,2,11,0],[15,11,11,9,"getAuraAuthor"],[15,24,11,22,"getAuraAuthor"],[15,25,11,23,"registry"],[15,33,11,31],[15,35,11,33,"bytes"],[15,40,11,38],[15,42,11,40,"sessionValidators"],[15,59,11,57],[15,61,11,59],[16,4,12,4],[16,11,12,11,"sessionValidators"],[16,28,12,28],[16,29,12,29,"registry"],[16,37,12,37],[16,38,12,38,"createTypeUnsafe"],[16,54,12,54],[16,55,12,55],[16,73,12,73],[16,75,12,75],[16,76,12,76,"bytes"],[16,81,12,81],[16,82,12,82,"toU8a"],[16,87,12,87],[16,88,12,88],[16,92,12,92],[16,93,12,93],[16,94,12,94],[16,95,12,95],[16,96,13,9,"slotNumber"],[16,106,13,19],[16,107,14,9,"mod"],[16,110,14,12],[16,111,14,13],[16,115,14,17,"util_1"],[16,121,14,23],[16,122,14,24,"BN"],[16,124,14,26],[16,125,14,27,"sessionValidators"],[16,142,14,44],[16,143,14,45,"length"],[16,149,14,51],[16,150,14,52],[16,151,14,53],[16,152,15,9,"toNumber"],[16,160,15,17],[16,161,15,18],[16,162,15,19],[16,163,15,20],[17,2,16,0],[18,2,17,0],[18,11,17,9,"getBabeAuthor"],[18,24,17,22,"getBabeAuthor"],[18,25,17,23,"registry"],[18,33,17,31],[18,35,17,33,"bytes"],[18,40,17,38],[18,42,17,40,"sessionValidators"],[18,59,17,57],[18,61,17,59],[19,4,18,4],[19,10,18,10,"digest"],[19,16,18,16],[19,19,18,19,"registry"],[19,27,18,27],[19,28,18,28,"createTypeUnsafe"],[19,44,18,44],[19,45,18,45],[19,69,18,69],[19,71,18,71],[19,72,18,72,"bytes"],[19,77,18,77],[19,78,18,78,"toU8a"],[19,83,18,83],[19,84,18,84],[19,88,18,88],[19,89,18,89],[19,90,18,90],[19,91,18,91],[20,4,19,4],[20,11,19,11,"sessionValidators"],[20,28,19,28],[20,29,19,29,"digest"],[20,35,19,35],[20,36,19,36,"value"],[20,41,19,41],[20,42,19,42,"toNumber"],[20,50,19,50],[20,51,19,51],[20,52,19,52],[20,53,19,53],[21,2,20,0],[22,2,21,0],[22,11,21,9,"getBytesAsAuthor"],[22,27,21,25,"getBytesAsAuthor"],[22,28,21,26,"registry"],[22,36,21,34],[22,38,21,36,"bytes"],[22,43,21,41],[22,45,21,43],[23,4,22,4],[23,11,22,11,"registry"],[23,19,22,19],[23,20,22,20,"createTypeUnsafe"],[23,36,22,36],[23,37,22,37],[23,48,22,48],[23,50,22,50],[23,51,22,51,"bytes"],[23,56,22,56],[23,57,22,57],[23,58,22,58],[24,2,23,0],[25,2,24,0],[26,0,25,0],[27,0,26,0],[28,0,27,0],[29,0,28,0],[30,2,29,0],[30,8,29,6,"GenericConsensusEngineId"],[30,32,29,30],[30,41,29,39,"types_codec_1"],[30,54,29,52],[30,55,29,53,"U8aFixed"],[30,63,29,61],[30,64,29,62],[31,4,30,4,"constructor"],[31,15,30,15,"constructor"],[31,16,30,16,"registry"],[31,24,30,24],[31,26,30,26,"value"],[31,31,30,31],[31,33,30,33],[32,6,31,8],[32,11,31,13],[32,12,31,14,"registry"],[32,20,31,22],[32,22,31,24],[32,23,31,25],[32,24,31,26],[32,26,31,28,"util_1"],[32,32,31,34],[32,33,31,35,"isNumber"],[32,41,31,43],[32,43,31,45,"value"],[32,48,31,50],[32,49,31,51],[32,52,32,14],[32,53,32,15],[32,54,32,16],[32,56,32,18,"util_1"],[32,62,32,24],[32,63,32,25,"bnToU8a"],[32,70,32,32],[32,72,32,34,"value"],[32,77,32,39],[32,79,32,41],[33,8,32,43,"isLe"],[33,12,32,47],[33,14,32,49],[34,6,32,55],[34,7,32,56],[34,8,32,57],[34,11,33,14,"value"],[34,16,33,19],[34,18,33,21],[34,20,33,23],[34,21,33,24],[35,4,34,4],[36,4,35,4],[37,0,36,0],[38,0,37,0],[39,4,38,4],[39,8,38,8,"isAura"],[39,14,38,14,"isAura"],[39,15,38,14],[39,17,38,17],[40,6,39,8],[40,13,39,15],[40,17,39,19],[40,18,39,20,"eq"],[40,20,39,22],[40,21,39,23,"exports"],[40,28,39,30],[40,29,39,31,"CID_AURA"],[40,37,39,39],[40,38,39,40],[41,4,40,4],[42,4,41,4],[43,0,42,0],[44,0,43,0],[45,4,44,4],[45,8,44,8,"isBabe"],[45,14,44,14,"isBabe"],[45,15,44,14],[45,17,44,17],[46,6,45,8],[46,13,45,15],[46,17,45,19],[46,18,45,20,"eq"],[46,20,45,22],[46,21,45,23,"exports"],[46,28,45,30],[46,29,45,31,"CID_BABE"],[46,37,45,39],[46,38,45,40],[47,4,46,4],[48,4,47,4],[49,0,48,0],[50,0,49,0],[51,4,50,4],[51,8,50,8,"isGrandpa"],[51,17,50,17,"isGrandpa"],[51,18,50,17],[51,20,50,20],[52,6,51,8],[52,13,51,15],[52,17,51,19],[52,18,51,20,"eq"],[52,20,51,22],[52,21,51,23,"exports"],[52,28,51,30],[52,29,51,31,"CID_GRPA"],[52,37,51,39],[52,38,51,40],[53,4,52,4],[54,4,53,4],[55,0,54,0],[56,0,55,0],[57,4,56,4],[57,8,56,8,"isPow"],[57,13,56,13,"isPow"],[57,14,56,13],[57,16,56,16],[58,6,57,8],[58,13,57,15],[58,17,57,19],[58,18,57,20,"eq"],[58,20,57,22],[58,21,57,23,"exports"],[58,28,57,30],[58,29,57,31,"CID_POW"],[58,36,57,38],[58,37,57,39],[59,4,58,4],[60,4,59,4],[61,0,60,0],[62,0,61,0],[63,4,62,4],[63,8,62,8,"isNimbus"],[63,16,62,16,"isNimbus"],[63,17,62,16],[63,19,62,19],[64,6,63,8],[64,13,63,15],[64,17,63,19],[64,18,63,20,"eq"],[64,20,63,22],[64,21,63,23,"exports"],[64,28,63,30],[64,29,63,31,"CID_NMBS"],[64,37,63,39],[64,38,63,40],[65,4,64,4],[66,4,65,4],[67,0,66,0],[68,0,67,0],[69,4,68,4,"extractAuthor"],[69,17,68,17,"extractAuthor"],[69,18,68,18,"bytes"],[69,23,68,23],[69,25,68,25,"sessionValidators"],[69,42,68,42],[69,44,68,44],[70,6,69,8],[70,10,69,12,"sessionValidators"],[70,27,69,29],[70,29,69,31,"length"],[70,35,69,37],[70,37,69,39],[71,8,70,12],[71,12,70,16],[71,16,70,20],[71,17,70,21,"isAura"],[71,23,70,27],[71,25,70,29],[72,10,71,16],[72,17,71,23,"getAuraAuthor"],[72,30,71,36],[72,31,71,37],[72,35,71,41],[72,36,71,42,"registry"],[72,44,71,50],[72,46,71,52,"bytes"],[72,51,71,57],[72,53,71,59,"sessionValidators"],[72,70,71,76],[72,71,71,77],[73,8,72,12],[73,9,72,13],[73,15,73,17],[73,19,73,21],[73,23,73,25],[73,24,73,26,"isBabe"],[73,30,73,32],[73,32,73,34],[74,10,74,16],[74,17,74,23,"getBabeAuthor"],[74,30,74,36],[74,31,74,37],[74,35,74,41],[74,36,74,42,"registry"],[74,44,74,50],[74,46,74,52,"bytes"],[74,51,74,57],[74,53,74,59,"sessionValidators"],[74,70,74,76],[74,71,74,77],[75,8,75,12],[76,6,76,8],[77,6,77,8],[78,6,78,8],[78,10,78,12],[78,14,78,16],[78,15,78,17,"isPow"],[78,20,78,22],[78,24,78,26],[78,28,78,30],[78,29,78,31,"isNimbus"],[78,37,78,39],[78,39,78,41],[79,8,79,12],[79,15,79,19,"getBytesAsAuthor"],[79,31,79,35],[79,32,79,36],[79,36,79,40],[79,37,79,41,"registry"],[79,45,79,49],[79,47,79,51,"bytes"],[79,52,79,56],[79,53,79,57],[80,6,80,8],[81,6,81,8],[81,13,81,15,"undefined"],[81,22,81,24],[82,4,82,4],[83,4,83,4],[84,0,84,0],[85,0,85,0],[86,4,86,4,"toHuman"],[86,11,86,11,"toHuman"],[86,12,86,11],[86,14,86,14],[87,6,87,8],[87,13,87,15],[87,17,87,19],[87,18,87,20,"toString"],[87,26,87,28],[87,27,87,29],[87,28,87,30],[88,4,88,4],[89,4,89,4],[90,0,90,0],[91,0,91,0],[92,4,92,4,"toRawType"],[92,13,92,13,"toRawType"],[92,14,92,13],[92,16,92,16],[93,6,93,8],[93,13,93,15],[93,32,93,34],[94,4,94,4],[95,4,95,4],[96,0,96,0],[97,0,97,0],[98,4,98,4,"toString"],[98,12,98,12,"toString"],[98,13,98,12],[98,15,98,15],[99,6,99,8],[99,13,99,15],[99,17,99,19],[99,18,99,20,"isAscii"],[99,25,99,27],[99,28,100,14],[99,29,100,15],[99,30,100,16],[99,32,100,18,"util_1"],[99,38,100,24],[99,39,100,25,"u8aToString"],[99,50,100,36],[99,52,100,38],[99,56,100,42],[99,57,100,43],[99,60,101,14],[99,61,101,15],[99,62,101,16],[99,64,101,18,"util_1"],[99,70,101,24],[99,71,101,25,"u8aToHex"],[99,79,101,33],[99,81,101,35],[99,85,101,39],[99,86,101,40],[100,4,102,4],[101,2,103,0],[102,2,104,0,"exports"],[102,9,104,7],[102,10,104,8,"GenericConsensusEngineId"],[102,34,104,32],[102,37,104,35,"GenericConsensusEngineId"],[102,61,104,59],[103,0,104,60],[103,3]],"functionMap":{"names":["<global>","getAuraAuthor","getBabeAuthor","getBytesAsAuthor","GenericConsensusEngineId","GenericConsensusEngineId#constructor","GenericConsensusEngineId#get__isAura","GenericConsensusEngineId#get__isBabe","GenericConsensusEngineId#get__isGrandpa","GenericConsensusEngineId#get__isPow","GenericConsensusEngineId#get__isNimbus","GenericConsensusEngineId#extractAuthor","GenericConsensusEngineId#toHuman","GenericConsensusEngineId#toRawType","GenericConsensusEngineId#toString"],"mappings":"AAA;ACU;CDK;AEC;CFG;AGC;CHE;AIM;ICC;KDI;IEI;KFE;IGI;KHE;III;KJE;IKI;KLE;IMI;KNE;IOI;KPc;IQI;KRE;ISI;KTE;IUI;KVI;CJC"},"hasCjsExports":true},"type":"js/module"}]} |