Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/a5/dec41ce77bf3d1a4362e6bb310c93f087a54b1a72ae7a8d0afcce86c5ad12186d63c10
T
2025-10-24 02:46:57 +00:00

1 line
5.3 KiB
Plaintext

{"dependencies":[{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":49,"index":49}}],"key":"ISHU1ovvPMrCldqRjtd1JhW9dyo=","exportNames":["*"],"imports":1}},{"name":"./hasher.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":2,"column":0,"index":50},"end":{"line":2,"column":37,"index":87}}],"key":"7SAvoGJHY/iMmQn4V6oafUxmm6c=","exportNames":["*"],"imports":1}},{"name":"./recover.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":88},"end":{"line":3,"column":48,"index":136}}],"key":"kKybh8/4g+pawxKD11tTA805pDU=","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.secp256k1Verify = secp256k1Verify;\n var _polkadotUtil = require(_dependencyMap[0], \"@polkadot/util\");\n var _hasherJs = require(_dependencyMap[1], \"./hasher.js\");\n var _recoverJs = require(_dependencyMap[2], \"./recover.js\");\n /**\n * @name secp256k1Verify\n * @description Verifies the signature of `message`, using the supplied pair\n */\n function secp256k1Verify(msgHash, signature, address, hashType = 'blake2', onlyJs) {\n const sig = (0, _polkadotUtil.u8aToU8a)(signature);\n if (sig.length !== 65) {\n throw new Error(`Expected signature with 65 bytes, ${sig.length} found instead`);\n }\n const publicKey = (0, _recoverJs.secp256k1Recover)((0, _hasherJs.hasher)(hashType, msgHash), sig, sig[64], hashType, onlyJs);\n const signerAddr = (0, _hasherJs.hasher)(hashType, publicKey, onlyJs);\n const inputAddr = (0, _polkadotUtil.u8aToU8a)(address);\n // for Ethereum (keccak) the last 20 bytes is the address\n return (0, _polkadotUtil.u8aEq)(publicKey, inputAddr) || (hashType === 'keccak' ? (0, _polkadotUtil.u8aEq)(signerAddr.slice(-20), inputAddr.slice(-20)) : (0, _polkadotUtil.u8aEq)(signerAddr, inputAddr));\n }\n});","lineCount":26,"map":[[7,2,8,0,"exports"],[7,9,8,0],[7,10,8,0,"secp256k1Verify"],[7,25,8,0],[7,28,8,0,"secp256k1Verify"],[7,43,8,0],[8,2,1,0],[8,6,1,0,"_polkadotUtil"],[8,19,1,0],[8,22,1,0,"require"],[8,29,1,0],[8,30,1,0,"_dependencyMap"],[8,44,1,0],[9,2,2,0],[9,6,2,0,"_hasherJs"],[9,15,2,0],[9,18,2,0,"require"],[9,25,2,0],[9,26,2,0,"_dependencyMap"],[9,40,2,0],[10,2,3,0],[10,6,3,0,"_recoverJs"],[10,16,3,0],[10,19,3,0,"require"],[10,26,3,0],[10,27,3,0,"_dependencyMap"],[10,41,3,0],[11,2,4,0],[12,0,5,0],[13,0,6,0],[14,0,7,0],[15,2,8,7],[15,11,8,16,"secp256k1Verify"],[15,26,8,31,"secp256k1Verify"],[15,27,8,32,"msgHash"],[15,34,8,39],[15,36,8,41,"signature"],[15,45,8,50],[15,47,8,52,"address"],[15,54,8,59],[15,56,8,61,"hashType"],[15,64,8,69],[15,67,8,72],[15,75,8,80],[15,77,8,82,"onlyJs"],[15,83,8,88],[15,85,8,90],[16,4,9,4],[16,10,9,10,"sig"],[16,13,9,13],[16,16,9,16],[16,20,9,16,"u8aToU8a"],[16,33,9,24],[16,34,9,24,"u8aToU8a"],[16,42,9,24],[16,44,9,25,"signature"],[16,53,9,34],[16,54,9,35],[17,4,10,4],[17,8,10,8,"sig"],[17,11,10,11],[17,12,10,12,"length"],[17,18,10,18],[17,23,10,23],[17,25,10,25],[17,27,10,27],[18,6,11,8],[18,12,11,14],[18,16,11,18,"Error"],[18,21,11,23],[18,22,11,24],[18,59,11,61,"sig"],[18,62,11,64],[18,63,11,65,"length"],[18,69,11,71],[18,85,11,87],[18,86,11,88],[19,4,12,4],[20,4,13,4],[20,10,13,10,"publicKey"],[20,19,13,19],[20,22,13,22],[20,26,13,22,"secp256k1Recover"],[20,36,13,38],[20,37,13,38,"secp256k1Recover"],[20,53,13,38],[20,55,13,39],[20,59,13,39,"hasher"],[20,68,13,45],[20,69,13,45,"hasher"],[20,75,13,45],[20,77,13,46,"hashType"],[20,85,13,54],[20,87,13,56,"msgHash"],[20,94,13,63],[20,95,13,64],[20,97,13,66,"sig"],[20,100,13,69],[20,102,13,71,"sig"],[20,105,13,74],[20,106,13,75],[20,108,13,77],[20,109,13,78],[20,111,13,80,"hashType"],[20,119,13,88],[20,121,13,90,"onlyJs"],[20,127,13,96],[20,128,13,97],[21,4,14,4],[21,10,14,10,"signerAddr"],[21,20,14,20],[21,23,14,23],[21,27,14,23,"hasher"],[21,36,14,29],[21,37,14,29,"hasher"],[21,43,14,29],[21,45,14,30,"hashType"],[21,53,14,38],[21,55,14,40,"publicKey"],[21,64,14,49],[21,66,14,51,"onlyJs"],[21,72,14,57],[21,73,14,58],[22,4,15,4],[22,10,15,10,"inputAddr"],[22,19,15,19],[22,22,15,22],[22,26,15,22,"u8aToU8a"],[22,39,15,30],[22,40,15,30,"u8aToU8a"],[22,48,15,30],[22,50,15,31,"address"],[22,57,15,38],[22,58,15,39],[23,4,16,4],[24,4,17,4],[24,11,17,11],[24,15,17,11,"u8aEq"],[24,28,17,16],[24,29,17,16,"u8aEq"],[24,34,17,16],[24,36,17,17,"publicKey"],[24,45,17,26],[24,47,17,28,"inputAddr"],[24,56,17,37],[24,57,17,38],[24,62,17,43,"hashType"],[24,70,17,51],[24,75,17,56],[24,83,17,64],[24,86,18,10],[24,90,18,10,"u8aEq"],[24,103,18,15],[24,104,18,15,"u8aEq"],[24,109,18,15],[24,111,18,16,"signerAddr"],[24,121,18,26],[24,122,18,27,"slice"],[24,127,18,32],[24,128,18,33],[24,129,18,34],[24,131,18,36],[24,132,18,37],[24,134,18,39,"inputAddr"],[24,143,18,48],[24,144,18,49,"slice"],[24,149,18,54],[24,150,18,55],[24,151,18,56],[24,153,18,58],[24,154,18,59],[24,155,18,60],[24,158,19,10],[24,162,19,10,"u8aEq"],[24,175,19,15],[24,176,19,15,"u8aEq"],[24,181,19,15],[24,183,19,16,"signerAddr"],[24,193,19,26],[24,195,19,28,"inputAddr"],[24,204,19,37],[24,205,19,38],[24,206,19,39],[25,2,20,0],[26,0,20,1],[26,3]],"functionMap":{"names":["<global>","secp256k1Verify"],"mappings":"AAA;OCO;CDY"},"hasCjsExports":false},"type":"js/module"}]}