mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 08:51:01 +00:00
1 line
6.4 KiB
Plaintext
1 line
6.4 KiB
Plaintext
{"dependencies":[{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":15,"index":135},"end":{"line":4,"column":40,"index":160}}],"key":"u0mzEw2nilnHoUWtEdZl0JKHutA=","exportNames":["*"],"imports":1}},{"name":"./hasher.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":20,"index":182},"end":{"line":5,"column":42,"index":204}}],"key":"S+rukV+6coFPIbzN4kC8Ag71enI=","exportNames":["*"],"imports":1}},{"name":"./recover.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":6,"column":21,"index":227},"end":{"line":6,"column":44,"index":250}}],"key":"x9Q2TO8+R+kiybs5maprb8x2XNo=","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 util_1 = require(_dependencyMap[0], \"@polkadot/util\");\n var hasher_js_1 = require(_dependencyMap[1], \"./hasher.js\");\n var recover_js_1 = 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) {\n var hashType = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'blake2';\n var onlyJs = arguments.length > 4 ? arguments[4] : undefined;\n var sig = (0, util_1.u8aToU8a)(signature);\n if (sig.length !== 65) {\n throw new Error(`Expected signature with 65 bytes, ${sig.length} found instead`);\n }\n var publicKey = (0, recover_js_1.secp256k1Recover)((0, hasher_js_1.hasher)(hashType, msgHash), sig, sig[64], hashType, onlyJs);\n var signerAddr = (0, hasher_js_1.hasher)(hashType, publicKey, onlyJs);\n var inputAddr = (0, util_1.u8aToU8a)(address);\n // for Ethereum (keccak) the last 20 bytes is the address\n return (0, util_1.u8aEq)(publicKey, inputAddr) || (hashType === 'keccak' ? (0, util_1.u8aEq)(signerAddr.slice(-20), inputAddr.slice(-20)) : (0, util_1.u8aEq)(signerAddr, inputAddr));\n }\n});","lineCount":28,"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,"secp256k1Verify"],[7,25,3,23],[7,28,3,26,"secp256k1Verify"],[7,43,3,41],[8,2,4,0],[8,6,4,6,"util_1"],[8,12,4,12],[8,15,4,15,"require"],[8,22,4,22],[8,23,4,22,"_dependencyMap"],[8,37,4,22],[8,58,4,39],[8,59,4,40],[9,2,5,0],[9,6,5,6,"hasher_js_1"],[9,17,5,17],[9,20,5,20,"require"],[9,27,5,27],[9,28,5,27,"_dependencyMap"],[9,42,5,27],[9,60,5,41],[9,61,5,42],[10,2,6,0],[10,6,6,6,"recover_js_1"],[10,18,6,18],[10,21,6,21,"require"],[10,28,6,28],[10,29,6,28,"_dependencyMap"],[10,43,6,28],[10,62,6,43],[10,63,6,44],[11,2,7,0],[12,0,8,0],[13,0,9,0],[14,0,10,0],[15,2,11,0],[15,11,11,9,"secp256k1Verify"],[15,26,11,24,"secp256k1Verify"],[15,27,11,25,"msgHash"],[15,34,11,32],[15,36,11,34,"signature"],[15,45,11,43],[15,47,11,45,"address"],[15,54,11,52],[15,56,11,83],[16,4,11,83],[16,8,11,54,"hashType"],[16,16,11,62],[16,19,11,62,"arguments"],[16,28,11,62],[16,29,11,62,"length"],[16,35,11,62],[16,43,11,62,"arguments"],[16,52,11,62],[16,60,11,62,"undefined"],[16,69,11,62],[16,72,11,62,"arguments"],[16,81,11,62],[16,87,11,65],[16,95,11,73],[17,4,11,73],[17,8,11,75,"onlyJs"],[17,14,11,81],[17,17,11,81,"arguments"],[17,26,11,81],[17,27,11,81,"length"],[17,33,11,81],[17,40,11,81,"arguments"],[17,49,11,81],[17,55,11,81,"undefined"],[17,64,11,81],[18,4,12,4],[18,8,12,10,"sig"],[18,11,12,13],[18,14,12,16],[18,15,12,17],[18,16,12,18],[18,18,12,20,"util_1"],[18,24,12,26],[18,25,12,27,"u8aToU8a"],[18,33,12,35],[18,35,12,37,"signature"],[18,44,12,46],[18,45,12,47],[19,4,13,4],[19,8,13,8,"sig"],[19,11,13,11],[19,12,13,12,"length"],[19,18,13,18],[19,23,13,23],[19,25,13,25],[19,27,13,27],[20,6,14,8],[20,12,14,14],[20,16,14,18,"Error"],[20,21,14,23],[20,22,14,24],[20,59,14,61,"sig"],[20,62,14,64],[20,63,14,65,"length"],[20,69,14,71],[20,85,14,87],[20,86,14,88],[21,4,15,4],[22,4,16,4],[22,8,16,10,"publicKey"],[22,17,16,19],[22,20,16,22],[22,21,16,23],[22,22,16,24],[22,24,16,26,"recover_js_1"],[22,36,16,38],[22,37,16,39,"secp256k1Recover"],[22,53,16,55],[22,55,16,57],[22,56,16,58],[22,57,16,59],[22,59,16,61,"hasher_js_1"],[22,70,16,72],[22,71,16,73,"hasher"],[22,77,16,79],[22,79,16,81,"hashType"],[22,87,16,89],[22,89,16,91,"msgHash"],[22,96,16,98],[22,97,16,99],[22,99,16,101,"sig"],[22,102,16,104],[22,104,16,106,"sig"],[22,107,16,109],[22,108,16,110],[22,110,16,112],[22,111,16,113],[22,113,16,115,"hashType"],[22,121,16,123],[22,123,16,125,"onlyJs"],[22,129,16,131],[22,130,16,132],[23,4,17,4],[23,8,17,10,"signerAddr"],[23,18,17,20],[23,21,17,23],[23,22,17,24],[23,23,17,25],[23,25,17,27,"hasher_js_1"],[23,36,17,38],[23,37,17,39,"hasher"],[23,43,17,45],[23,45,17,47,"hashType"],[23,53,17,55],[23,55,17,57,"publicKey"],[23,64,17,66],[23,66,17,68,"onlyJs"],[23,72,17,74],[23,73,17,75],[24,4,18,4],[24,8,18,10,"inputAddr"],[24,17,18,19],[24,20,18,22],[24,21,18,23],[24,22,18,24],[24,24,18,26,"util_1"],[24,30,18,32],[24,31,18,33,"u8aToU8a"],[24,39,18,41],[24,41,18,43,"address"],[24,48,18,50],[24,49,18,51],[25,4,19,4],[26,4,20,4],[26,11,20,11],[26,12,20,12],[26,13,20,13],[26,15,20,15,"util_1"],[26,21,20,21],[26,22,20,22,"u8aEq"],[26,27,20,27],[26,29,20,29,"publicKey"],[26,38,20,38],[26,40,20,40,"inputAddr"],[26,49,20,49],[26,50,20,50],[26,55,20,55,"hashType"],[26,63,20,63],[26,68,20,68],[26,76,20,76],[26,79,21,10],[26,80,21,11],[26,81,21,12],[26,83,21,14,"util_1"],[26,89,21,20],[26,90,21,21,"u8aEq"],[26,95,21,26],[26,97,21,28,"signerAddr"],[26,107,21,38],[26,108,21,39,"slice"],[26,113,21,44],[26,114,21,45],[26,115,21,46],[26,117,21,48],[26,118,21,49],[26,120,21,51,"inputAddr"],[26,129,21,60],[26,130,21,61,"slice"],[26,135,21,66],[26,136,21,67],[26,137,21,68],[26,139,21,70],[26,140,21,71],[26,141,21,72],[26,144,22,10],[26,145,22,11],[26,146,22,12],[26,148,22,14,"util_1"],[26,154,22,20],[26,155,22,21,"u8aEq"],[26,160,22,26],[26,162,22,28,"signerAddr"],[26,172,22,38],[26,174,22,40,"inputAddr"],[26,183,22,49],[26,184,22,50],[26,185,22,51],[27,2,23,0],[28,0,23,1],[28,3]],"functionMap":{"names":["<global>","secp256k1Verify"],"mappings":"AAA;ACU;CDY"},"hasCjsExports":true},"type":"js/module"}]} |