Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/30/463624723762edc24927627522e5f672f918933f3f85c6a066c4ed845ec435e49f9f24
T
2025-11-08 10:46:19 +00:00

1 line
4.9 KiB
Plaintext

{"dependencies":[{"name":"./sshash.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":37,"index":37}}],"key":"iAW3BPkeW4gOhrHer7UhHNL+K9k=","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.checkAddressChecksum = checkAddressChecksum;\n var _sshashJs = require(_dependencyMap[0], \"./sshash.js\");\n function checkAddressChecksum(decoded) {\n var ss58Length = decoded[0] & 64 ? 2 : 1;\n var ss58Decoded = ss58Length === 1 ? decoded[0] : (decoded[0] & 63) << 2 | decoded[1] >> 6 | (decoded[1] & 63) << 8;\n // 32/33 bytes public + 2 bytes checksum + prefix\n var isPublicKey = [34 + ss58Length, 35 + ss58Length].includes(decoded.length);\n var length = decoded.length - (isPublicKey ? 2 : 1);\n // calculate the hash and do the checksum byte checks\n var hash = (0, _sshashJs.sshash)(decoded.subarray(0, length));\n var isValid = (decoded[0] & 128) === 0 && ![46, 47].includes(decoded[0]) && (isPublicKey ? decoded[decoded.length - 2] === hash[0] && decoded[decoded.length - 1] === hash[1] : decoded[decoded.length - 1] === hash[0]);\n return [isValid, length, ss58Length, ss58Decoded];\n }\n});","lineCount":20,"map":[[7,2,2,0,"exports"],[7,9,2,0],[7,10,2,0,"checkAddressChecksum"],[7,30,2,0],[7,33,2,0,"checkAddressChecksum"],[7,53,2,0],[8,2,1,0],[8,6,1,0,"_sshashJs"],[8,15,1,0],[8,18,1,0,"require"],[8,25,1,0],[8,26,1,0,"_dependencyMap"],[8,40,1,0],[9,2,2,7],[9,11,2,16,"checkAddressChecksum"],[9,31,2,36,"checkAddressChecksum"],[9,32,2,37,"decoded"],[9,39,2,44],[9,41,2,46],[10,4,3,4],[10,8,3,10,"ss58Length"],[10,18,3,20],[10,21,3,24,"decoded"],[10,28,3,31],[10,29,3,32],[10,30,3,33],[10,31,3,34],[10,34,3,37],[10,36,3,48],[10,39,3,52],[10,40,3,53],[10,43,3,56],[10,44,3,57],[11,4,4,4],[11,8,4,10,"ss58Decoded"],[11,19,4,21],[11,22,4,24,"ss58Length"],[11,32,4,34],[11,37,4,39],[11,38,4,40],[11,41,5,10,"decoded"],[11,48,5,17],[11,49,5,18],[11,50,5,19],[11,51,5,20],[11,54,6,11],[11,55,6,12,"decoded"],[11,62,6,19],[11,63,6,20],[11,64,6,21],[11,65,6,22],[11,68,6,25],[11,70,6,36],[11,75,6,41],[11,76,6,42],[11,79,6,47,"decoded"],[11,86,6,54],[11,87,6,55],[11,88,6,56],[11,89,6,57],[11,93,6,61],[11,94,6,63],[11,97,6,67],[11,98,6,68,"decoded"],[11,105,6,75],[11,106,6,76],[11,107,6,77],[11,108,6,78],[11,111,6,81],[11,113,6,92],[11,118,6,97],[11,119,6,99],[12,4,7,4],[13,4,8,4],[13,8,8,10,"isPublicKey"],[13,19,8,21],[13,22,8,24],[13,23,8,25],[13,25,8,27],[13,28,8,30,"ss58Length"],[13,38,8,40],[13,40,8,42],[13,42,8,44],[13,45,8,47,"ss58Length"],[13,55,8,57],[13,56,8,58],[13,57,8,59,"includes"],[13,65,8,67],[13,66,8,68,"decoded"],[13,73,8,75],[13,74,8,76,"length"],[13,80,8,82],[13,81,8,83],[14,4,9,4],[14,8,9,10,"length"],[14,14,9,16],[14,17,9,19,"decoded"],[14,24,9,26],[14,25,9,27,"length"],[14,31,9,33],[14,35,9,37,"isPublicKey"],[14,46,9,48],[14,49,9,51],[14,50,9,52],[14,53,9,55],[14,54,9,56],[14,55,9,57],[15,4,10,4],[16,4,11,4],[16,8,11,10,"hash"],[16,12,11,14],[16,15,11,17],[16,19,11,17,"sshash"],[16,28,11,23],[16,29,11,23,"sshash"],[16,35,11,23],[16,37,11,24,"decoded"],[16,44,11,31],[16,45,11,32,"subarray"],[16,53,11,40],[16,54,11,41],[16,55,11,42],[16,57,11,44,"length"],[16,63,11,50],[16,64,11,51],[16,65,11,52],[17,4,12,4],[17,8,12,10,"isValid"],[17,15,12,17],[17,18,12,20],[17,19,12,21,"decoded"],[17,26,12,28],[17,27,12,29],[17,28,12,30],[17,29,12,31],[17,32,12,34],[17,35,12,45],[17,41,12,51],[17,42,12,52],[17,46,12,56],[17,47,12,57],[17,48,12,58],[17,50,12,60],[17,52,12,62],[17,54,12,64],[17,55,12,65],[17,56,12,66,"includes"],[17,64,12,74],[17,65,12,75,"decoded"],[17,72,12,82],[17,73,12,83],[17,74,12,84],[17,75,12,85],[17,76,12,86],[17,81,12,91,"isPublicKey"],[17,92,12,102],[17,95,13,10,"decoded"],[17,102,13,17],[17,103,13,18,"decoded"],[17,110,13,25],[17,111,13,26,"length"],[17,117,13,32],[17,120,13,35],[17,121,13,36],[17,122,13,37],[17,127,13,42,"hash"],[17,131,13,46],[17,132,13,47],[17,133,13,48],[17,134,13,49],[17,138,13,53,"decoded"],[17,145,13,60],[17,146,13,61,"decoded"],[17,153,13,68],[17,154,13,69,"length"],[17,160,13,75],[17,163,13,78],[17,164,13,79],[17,165,13,80],[17,170,13,85,"hash"],[17,174,13,89],[17,175,13,90],[17,176,13,91],[17,177,13,92],[17,180,14,10,"decoded"],[17,187,14,17],[17,188,14,18,"decoded"],[17,195,14,25],[17,196,14,26,"length"],[17,202,14,32],[17,205,14,35],[17,206,14,36],[17,207,14,37],[17,212,14,42,"hash"],[17,216,14,46],[17,217,14,47],[17,218,14,48],[17,219,14,49],[17,220,14,50],[18,4,15,4],[18,11,15,11],[18,12,15,12,"isValid"],[18,19,15,19],[18,21,15,21,"length"],[18,27,15,27],[18,29,15,29,"ss58Length"],[18,39,15,39],[18,41,15,41,"ss58Decoded"],[18,52,15,52],[18,53,15,53],[19,2,16,0],[20,0,16,1],[20,3]],"functionMap":{"names":["<global>","checkAddressChecksum"],"mappings":"AAA;OCC;CDc"},"hasCjsExports":false},"type":"js/module"}]}