Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/5f/bfc90dadd39059519e62b19da35e979331791179e7e3f3266221ee76127ddf6612997b
T
2025-11-07 20:14:32 +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 var sshash_js_1 = require(_dependencyMap[0], \"./sshash.js\");\n function checkAddressChecksum(decoded) {\n var ss58Length = decoded[0] & 0b0100_0000 ? 2 : 1;\n var 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 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, sshash_js_1.sshash)(decoded.subarray(0, length));\n var 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,6,4,6,"sshash_js_1"],[8,17,4,17],[8,20,4,20,"require"],[8,27,4,27],[8,28,4,27,"_dependencyMap"],[8,42,4,27],[8,60,4,41],[8,61,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,8,6,10,"ss58Length"],[10,18,6,20],[10,21,6,24,"decoded"],[10,28,6,31],[10,29,6,32],[10,30,6,33],[10,31,6,34],[10,34,6,37],[10,45,6,48],[10,48,6,52],[10,49,6,53],[10,52,6,56],[10,53,6,57],[11,4,7,4],[11,8,7,10,"ss58Decoded"],[11,19,7,21],[11,22,7,24,"ss58Length"],[11,32,7,34],[11,37,7,39],[11,38,7,40],[11,41,8,10,"decoded"],[11,48,8,17],[11,49,8,18],[11,50,8,19],[11,51,8,20],[11,54,9,11],[11,55,9,12,"decoded"],[11,62,9,19],[11,63,9,20],[11,64,9,21],[11,65,9,22],[11,68,9,25],[11,79,9,36],[11,84,9,41],[11,85,9,42],[11,88,9,47,"decoded"],[11,95,9,54],[11,96,9,55],[11,97,9,56],[11,98,9,57],[11,102,9,61],[11,103,9,63],[11,106,9,67],[11,107,9,68,"decoded"],[11,114,9,75],[11,115,9,76],[11,116,9,77],[11,117,9,78],[11,120,9,81],[11,131,9,92],[11,136,9,97],[11,137,9,99],[12,4,10,4],[13,4,11,4],[13,8,11,10,"isPublicKey"],[13,19,11,21],[13,22,11,24],[13,23,11,25],[13,25,11,27],[13,28,11,30,"ss58Length"],[13,38,11,40],[13,40,11,42],[13,42,11,44],[13,45,11,47,"ss58Length"],[13,55,11,57],[13,56,11,58],[13,57,11,59,"includes"],[13,65,11,67],[13,66,11,68,"decoded"],[13,73,11,75],[13,74,11,76,"length"],[13,80,11,82],[13,81,11,83],[14,4,12,4],[14,8,12,10,"length"],[14,14,12,16],[14,17,12,19,"decoded"],[14,24,12,26],[14,25,12,27,"length"],[14,31,12,33],[14,35,12,37,"isPublicKey"],[14,46,12,48],[14,49,12,51],[14,50,12,52],[14,53,12,55],[14,54,12,56],[14,55,12,57],[15,4,13,4],[16,4,14,4],[16,8,14,10,"hash"],[16,12,14,14],[16,15,14,17],[16,16,14,18],[16,17,14,19],[16,19,14,21,"sshash_js_1"],[16,30,14,32],[16,31,14,33,"sshash"],[16,37,14,39],[16,39,14,41,"decoded"],[16,46,14,48],[16,47,14,49,"subarray"],[16,55,14,57],[16,56,14,58],[16,57,14,59],[16,59,14,61,"length"],[16,65,14,67],[16,66,14,68],[16,67,14,69],[17,4,15,4],[17,8,15,10,"isValid"],[17,15,15,17],[17,18,15,20],[17,19,15,21,"decoded"],[17,26,15,28],[17,27,15,29],[17,28,15,30],[17,29,15,31],[17,32,15,34],[17,43,15,45],[17,49,15,51],[17,50,15,52],[17,54,15,56],[17,55,15,57],[17,56,15,58],[17,58,15,60],[17,60,15,62],[17,62,15,64],[17,63,15,65],[17,64,15,66,"includes"],[17,72,15,74],[17,73,15,75,"decoded"],[17,80,15,82],[17,81,15,83],[17,82,15,84],[17,83,15,85],[17,84,15,86],[17,89,15,91,"isPublicKey"],[17,100,15,102],[17,103,16,10,"decoded"],[17,110,16,17],[17,111,16,18,"decoded"],[17,118,16,25],[17,119,16,26,"length"],[17,125,16,32],[17,128,16,35],[17,129,16,36],[17,130,16,37],[17,135,16,42,"hash"],[17,139,16,46],[17,140,16,47],[17,141,16,48],[17,142,16,49],[17,146,16,53,"decoded"],[17,153,16,60],[17,154,16,61,"decoded"],[17,161,16,68],[17,162,16,69,"length"],[17,168,16,75],[17,171,16,78],[17,172,16,79],[17,173,16,80],[17,178,16,85,"hash"],[17,182,16,89],[17,183,16,90],[17,184,16,91],[17,185,16,92],[17,188,17,10,"decoded"],[17,195,17,17],[17,196,17,18,"decoded"],[17,203,17,25],[17,204,17,26,"length"],[17,210,17,32],[17,213,17,35],[17,214,17,36],[17,215,17,37],[17,220,17,42,"hash"],[17,224,17,46],[17,225,17,47],[17,226,17,48],[17,227,17,49],[17,228,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"}]}