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

1 line
5.3 KiB
Plaintext

{"dependencies":[{"name":"./sshash.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":20,"index":150},"end":{"line":4,"column":42,"index":172}}],"key":"yKOX9JE+W9LG2F3uOwO9nYueYk8=","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 const sshash_js_1 = require(_dependencyMap[0], \"./sshash.js\");\n function checkAddressChecksum(decoded) {\n const ss58Length = decoded[0] & 0b0100_0000 ? 2 : 1;\n const ss58Decoded = ss58Length === 1 ? decoded[0] : (decoded[0] & 0b0011_1111) << 2 | decoded[1] >> 6 | (decoded[1] & 0b0011_1111) << 8;\n // 32/33 bytes public + 2 bytes checksum + prefix\n const isPublicKey = [34 + ss58Length, 35 + ss58Length].includes(decoded.length);\n const length = decoded.length - (isPublicKey ? 2 : 1);\n // calculate the hash and do the checksum byte checks\n const hash = (0, sshash_js_1.sshash)(decoded.subarray(0, length));\n const isValid = (decoded[0] & 0b1000_0000) === 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":[[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,"checkAddressChecksum"],[7,30,3,28],[7,33,3,31,"checkAddressChecksum"],[7,53,3,51],[8,2,4,0],[8,8,4,6,"sshash_js_1"],[8,19,4,17],[8,22,4,20,"require"],[8,29,4,27],[8,30,4,27,"_dependencyMap"],[8,44,4,27],[8,62,4,41],[8,63,4,42],[9,2,5,0],[9,11,5,9,"checkAddressChecksum"],[9,31,5,29,"checkAddressChecksum"],[9,32,5,30,"decoded"],[9,39,5,37],[9,41,5,39],[10,4,6,4],[10,10,6,10,"ss58Length"],[10,20,6,20],[10,23,6,24,"decoded"],[10,30,6,31],[10,31,6,32],[10,32,6,33],[10,33,6,34],[10,36,6,37],[10,47,6,48],[10,50,6,52],[10,51,6,53],[10,54,6,56],[10,55,6,57],[11,4,7,4],[11,10,7,10,"ss58Decoded"],[11,21,7,21],[11,24,7,24,"ss58Length"],[11,34,7,34],[11,39,7,39],[11,40,7,40],[11,43,8,10,"decoded"],[11,50,8,17],[11,51,8,18],[11,52,8,19],[11,53,8,20],[11,56,9,11],[11,57,9,12,"decoded"],[11,64,9,19],[11,65,9,20],[11,66,9,21],[11,67,9,22],[11,70,9,25],[11,81,9,36],[11,86,9,41],[11,87,9,42],[11,90,9,47,"decoded"],[11,97,9,54],[11,98,9,55],[11,99,9,56],[11,100,9,57],[11,104,9,61],[11,105,9,63],[11,108,9,67],[11,109,9,68,"decoded"],[11,116,9,75],[11,117,9,76],[11,118,9,77],[11,119,9,78],[11,122,9,81],[11,133,9,92],[11,138,9,97],[11,139,9,99],[12,4,10,4],[13,4,11,4],[13,10,11,10,"isPublicKey"],[13,21,11,21],[13,24,11,24],[13,25,11,25],[13,27,11,27],[13,30,11,30,"ss58Length"],[13,40,11,40],[13,42,11,42],[13,44,11,44],[13,47,11,47,"ss58Length"],[13,57,11,57],[13,58,11,58],[13,59,11,59,"includes"],[13,67,11,67],[13,68,11,68,"decoded"],[13,75,11,75],[13,76,11,76,"length"],[13,82,11,82],[13,83,11,83],[14,4,12,4],[14,10,12,10,"length"],[14,16,12,16],[14,19,12,19,"decoded"],[14,26,12,26],[14,27,12,27,"length"],[14,33,12,33],[14,37,12,37,"isPublicKey"],[14,48,12,48],[14,51,12,51],[14,52,12,52],[14,55,12,55],[14,56,12,56],[14,57,12,57],[15,4,13,4],[16,4,14,4],[16,10,14,10,"hash"],[16,14,14,14],[16,17,14,17],[16,18,14,18],[16,19,14,19],[16,21,14,21,"sshash_js_1"],[16,32,14,32],[16,33,14,33,"sshash"],[16,39,14,39],[16,41,14,41,"decoded"],[16,48,14,48],[16,49,14,49,"subarray"],[16,57,14,57],[16,58,14,58],[16,59,14,59],[16,61,14,61,"length"],[16,67,14,67],[16,68,14,68],[16,69,14,69],[17,4,15,4],[17,10,15,10,"isValid"],[17,17,15,17],[17,20,15,20],[17,21,15,21,"decoded"],[17,28,15,28],[17,29,15,29],[17,30,15,30],[17,31,15,31],[17,34,15,34],[17,45,15,45],[17,51,15,51],[17,52,15,52],[17,56,15,56],[17,57,15,57],[17,58,15,58],[17,60,15,60],[17,62,15,62],[17,64,15,64],[17,65,15,65],[17,66,15,66,"includes"],[17,74,15,74],[17,75,15,75,"decoded"],[17,82,15,82],[17,83,15,83],[17,84,15,84],[17,85,15,85],[17,86,15,86],[17,91,15,91,"isPublicKey"],[17,102,15,102],[17,105,16,10,"decoded"],[17,112,16,17],[17,113,16,18,"decoded"],[17,120,16,25],[17,121,16,26,"length"],[17,127,16,32],[17,130,16,35],[17,131,16,36],[17,132,16,37],[17,137,16,42,"hash"],[17,141,16,46],[17,142,16,47],[17,143,16,48],[17,144,16,49],[17,148,16,53,"decoded"],[17,155,16,60],[17,156,16,61,"decoded"],[17,163,16,68],[17,164,16,69,"length"],[17,170,16,75],[17,173,16,78],[17,174,16,79],[17,175,16,80],[17,180,16,85,"hash"],[17,184,16,89],[17,185,16,90],[17,186,16,91],[17,187,16,92],[17,190,17,10,"decoded"],[17,197,17,17],[17,198,17,18,"decoded"],[17,205,17,25],[17,206,17,26,"length"],[17,212,17,32],[17,215,17,35],[17,216,17,36],[17,217,17,37],[17,222,17,42,"hash"],[17,226,17,46],[17,227,17,47],[17,228,17,48],[17,229,17,49],[17,230,17,50],[18,4,18,4],[18,11,18,11],[18,12,18,12,"isValid"],[18,19,18,19],[18,21,18,21,"length"],[18,27,18,27],[18,29,18,29,"ss58Length"],[18,39,18,39],[18,41,18,41,"ss58Decoded"],[18,52,18,52],[18,53,18,53],[19,2,19,0],[20,0,19,1],[20,3]],"functionMap":{"names":["<global>","checkAddressChecksum"],"mappings":"AAA;ACI;CDc"},"hasCjsExports":true},"type":"js/module"}]}