mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 01:51:03 +00:00
1 line
8.9 KiB
Plaintext
1 line
8.9 KiB
Plaintext
{"dependencies":[{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":15,"index":159},"end":{"line":4,"column":40,"index":184}}],"key":"u0mzEw2nilnHoUWtEdZl0JKHutA=","exportNames":["*"],"imports":1}},{"name":"@polkadot/x-bigint","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":19,"index":205},"end":{"line":5,"column":48,"index":234}}],"key":"vYT44QPz4/mwSlaWVHyJIDa5mP4=","exportNames":["*"],"imports":1}},{"name":"../bn.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":6,"column":16,"index":252},"end":{"line":6,"column":35,"index":271}}],"key":"olVWCV30ILKFQRk4D5NiwZc8IQ4=","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.secp256k1PrivateKeyTweakAdd = secp256k1PrivateKeyTweakAdd;\n const util_1 = require(_dependencyMap[0], \"@polkadot/util\");\n const x_bigint_1 = require(_dependencyMap[1], \"@polkadot/x-bigint\");\n const bn_js_1 = require(_dependencyMap[2], \"../bn.js\");\n const N = 'ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141'.replace(/ /g, '');\n const N_BI = (0, x_bigint_1.BigInt)(`0x${N}`);\n const N_BN = new util_1.BN(N, 'hex');\n function addBi(seckey, tweak) {\n let res = (0, util_1.u8aToBigInt)(tweak, bn_js_1.BN_BE_OPTS);\n if (res >= N_BI) {\n throw new Error('Tweak parameter is out of range');\n }\n res += (0, util_1.u8aToBigInt)(seckey, bn_js_1.BN_BE_OPTS);\n if (res >= N_BI) {\n res -= N_BI;\n }\n if (res === util_1._0n) {\n throw new Error('Invalid resulting private key');\n }\n return (0, util_1.nToU8a)(res, bn_js_1.BN_BE_256_OPTS);\n }\n function addBn(seckey, tweak) {\n const res = new util_1.BN(tweak);\n if (res.cmp(N_BN) >= 0) {\n throw new Error('Tweak parameter is out of range');\n }\n res.iadd(new util_1.BN(seckey));\n if (res.cmp(N_BN) >= 0) {\n res.isub(N_BN);\n }\n if (res.isZero()) {\n throw new Error('Invalid resulting private key');\n }\n return (0, util_1.bnToU8a)(res, bn_js_1.BN_BE_256_OPTS);\n }\n function secp256k1PrivateKeyTweakAdd(seckey, tweak, onlyBn) {\n if (!(0, util_1.isU8a)(seckey) || seckey.length !== 32) {\n throw new Error('Expected seckey to be an Uint8Array with length 32');\n } else if (!(0, util_1.isU8a)(tweak) || tweak.length !== 32) {\n throw new Error('Expected tweak to be an Uint8Array with length 32');\n }\n return !util_1.hasBigInt || onlyBn ? addBn(seckey, tweak) : addBi(seckey, tweak);\n }\n});","lineCount":50,"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,"secp256k1PrivateKeyTweakAdd"],[7,37,3,35],[7,40,3,38,"secp256k1PrivateKeyTweakAdd"],[7,67,3,65],[8,2,4,0],[8,8,4,6,"util_1"],[8,14,4,12],[8,17,4,15,"require"],[8,24,4,22],[8,25,4,22,"_dependencyMap"],[8,39,4,22],[8,60,4,39],[8,61,4,40],[9,2,5,0],[9,8,5,6,"x_bigint_1"],[9,18,5,16],[9,21,5,19,"require"],[9,28,5,26],[9,29,5,26,"_dependencyMap"],[9,43,5,26],[9,68,5,47],[9,69,5,48],[10,2,6,0],[10,8,6,6,"bn_js_1"],[10,15,6,13],[10,18,6,16,"require"],[10,25,6,23],[10,26,6,23,"_dependencyMap"],[10,40,6,23],[10,55,6,34],[10,56,6,35],[11,2,7,0],[11,8,7,6,"N"],[11,9,7,7],[11,12,7,10],[11,85,7,83],[11,86,7,84,"replace"],[11,93,7,91],[11,94,7,92],[11,98,7,96],[11,100,7,98],[11,102,7,100],[11,103,7,101],[12,2,8,0],[12,8,8,6,"N_BI"],[12,12,8,10],[12,15,8,13],[12,16,8,14],[12,17,8,15],[12,19,8,17,"x_bigint_1"],[12,29,8,27],[12,30,8,28,"BigInt"],[12,36,8,34],[12,38,8,36],[12,43,8,41,"N"],[12,44,8,42],[12,46,8,44],[12,47,8,45],[13,2,9,0],[13,8,9,6,"N_BN"],[13,12,9,10],[13,15,9,13],[13,19,9,17,"util_1"],[13,25,9,23],[13,26,9,24,"BN"],[13,28,9,26],[13,29,9,27,"N"],[13,30,9,28],[13,32,9,30],[13,37,9,35],[13,38,9,36],[14,2,10,0],[14,11,10,9,"addBi"],[14,16,10,14,"addBi"],[14,17,10,15,"seckey"],[14,23,10,21],[14,25,10,23,"tweak"],[14,30,10,28],[14,32,10,30],[15,4,11,4],[15,8,11,8,"res"],[15,11,11,11],[15,14,11,14],[15,15,11,15],[15,16,11,16],[15,18,11,18,"util_1"],[15,24,11,24],[15,25,11,25,"u8aToBigInt"],[15,36,11,36],[15,38,11,38,"tweak"],[15,43,11,43],[15,45,11,45,"bn_js_1"],[15,52,11,52],[15,53,11,53,"BN_BE_OPTS"],[15,63,11,63],[15,64,11,64],[16,4,12,4],[16,8,12,8,"res"],[16,11,12,11],[16,15,12,15,"N_BI"],[16,19,12,19],[16,21,12,21],[17,6,13,8],[17,12,13,14],[17,16,13,18,"Error"],[17,21,13,23],[17,22,13,24],[17,55,13,57],[17,56,13,58],[18,4,14,4],[19,4,15,4,"res"],[19,7,15,7],[19,11,15,11],[19,12,15,12],[19,13,15,13],[19,15,15,15,"util_1"],[19,21,15,21],[19,22,15,22,"u8aToBigInt"],[19,33,15,33],[19,35,15,35,"seckey"],[19,41,15,41],[19,43,15,43,"bn_js_1"],[19,50,15,50],[19,51,15,51,"BN_BE_OPTS"],[19,61,15,61],[19,62,15,62],[20,4,16,4],[20,8,16,8,"res"],[20,11,16,11],[20,15,16,15,"N_BI"],[20,19,16,19],[20,21,16,21],[21,6,17,8,"res"],[21,9,17,11],[21,13,17,15,"N_BI"],[21,17,17,19],[22,4,18,4],[23,4,19,4],[23,8,19,8,"res"],[23,11,19,11],[23,16,19,16,"util_1"],[23,22,19,22],[23,23,19,23,"_0n"],[23,26,19,26],[23,28,19,28],[24,6,20,8],[24,12,20,14],[24,16,20,18,"Error"],[24,21,20,23],[24,22,20,24],[24,53,20,55],[24,54,20,56],[25,4,21,4],[26,4,22,4],[26,11,22,11],[26,12,22,12],[26,13,22,13],[26,15,22,15,"util_1"],[26,21,22,21],[26,22,22,22,"nToU8a"],[26,28,22,28],[26,30,22,30,"res"],[26,33,22,33],[26,35,22,35,"bn_js_1"],[26,42,22,42],[26,43,22,43,"BN_BE_256_OPTS"],[26,57,22,57],[26,58,22,58],[27,2,23,0],[28,2,24,0],[28,11,24,9,"addBn"],[28,16,24,14,"addBn"],[28,17,24,15,"seckey"],[28,23,24,21],[28,25,24,23,"tweak"],[28,30,24,28],[28,32,24,30],[29,4,25,4],[29,10,25,10,"res"],[29,13,25,13],[29,16,25,16],[29,20,25,20,"util_1"],[29,26,25,26],[29,27,25,27,"BN"],[29,29,25,29],[29,30,25,30,"tweak"],[29,35,25,35],[29,36,25,36],[30,4,26,4],[30,8,26,8,"res"],[30,11,26,11],[30,12,26,12,"cmp"],[30,15,26,15],[30,16,26,16,"N_BN"],[30,20,26,20],[30,21,26,21],[30,25,26,25],[30,26,26,26],[30,28,26,28],[31,6,27,8],[31,12,27,14],[31,16,27,18,"Error"],[31,21,27,23],[31,22,27,24],[31,55,27,57],[31,56,27,58],[32,4,28,4],[33,4,29,4,"res"],[33,7,29,7],[33,8,29,8,"iadd"],[33,12,29,12],[33,13,29,13],[33,17,29,17,"util_1"],[33,23,29,23],[33,24,29,24,"BN"],[33,26,29,26],[33,27,29,27,"seckey"],[33,33,29,33],[33,34,29,34],[33,35,29,35],[34,4,30,4],[34,8,30,8,"res"],[34,11,30,11],[34,12,30,12,"cmp"],[34,15,30,15],[34,16,30,16,"N_BN"],[34,20,30,20],[34,21,30,21],[34,25,30,25],[34,26,30,26],[34,28,30,28],[35,6,31,8,"res"],[35,9,31,11],[35,10,31,12,"isub"],[35,14,31,16],[35,15,31,17,"N_BN"],[35,19,31,21],[35,20,31,22],[36,4,32,4],[37,4,33,4],[37,8,33,8,"res"],[37,11,33,11],[37,12,33,12,"isZero"],[37,18,33,18],[37,19,33,19],[37,20,33,20],[37,22,33,22],[38,6,34,8],[38,12,34,14],[38,16,34,18,"Error"],[38,21,34,23],[38,22,34,24],[38,53,34,55],[38,54,34,56],[39,4,35,4],[40,4,36,4],[40,11,36,11],[40,12,36,12],[40,13,36,13],[40,15,36,15,"util_1"],[40,21,36,21],[40,22,36,22,"bnToU8a"],[40,29,36,29],[40,31,36,31,"res"],[40,34,36,34],[40,36,36,36,"bn_js_1"],[40,43,36,43],[40,44,36,44,"BN_BE_256_OPTS"],[40,58,36,58],[40,59,36,59],[41,2,37,0],[42,2,38,0],[42,11,38,9,"secp256k1PrivateKeyTweakAdd"],[42,38,38,36,"secp256k1PrivateKeyTweakAdd"],[42,39,38,37,"seckey"],[42,45,38,43],[42,47,38,45,"tweak"],[42,52,38,50],[42,54,38,52,"onlyBn"],[42,60,38,58],[42,62,38,60],[43,4,39,4],[43,8,39,8],[43,9,39,9],[43,10,39,10],[43,11,39,11],[43,13,39,13,"util_1"],[43,19,39,19],[43,20,39,20,"isU8a"],[43,25,39,25],[43,27,39,27,"seckey"],[43,33,39,33],[43,34,39,34],[43,38,39,38,"seckey"],[43,44,39,44],[43,45,39,45,"length"],[43,51,39,51],[43,56,39,56],[43,58,39,58],[43,60,39,60],[44,6,40,8],[44,12,40,14],[44,16,40,18,"Error"],[44,21,40,23],[44,22,40,24],[44,74,40,76],[44,75,40,77],[45,4,41,4],[45,5,41,5],[45,11,42,9],[45,15,42,13],[45,16,42,14],[45,17,42,15],[45,18,42,16],[45,20,42,18,"util_1"],[45,26,42,24],[45,27,42,25,"isU8a"],[45,32,42,30],[45,34,42,32,"tweak"],[45,39,42,37],[45,40,42,38],[45,44,42,42,"tweak"],[45,49,42,47],[45,50,42,48,"length"],[45,56,42,54],[45,61,42,59],[45,63,42,61],[45,65,42,63],[46,6,43,8],[46,12,43,14],[46,16,43,18,"Error"],[46,21,43,23],[46,22,43,24],[46,73,43,75],[46,74,43,76],[47,4,44,4],[48,4,45,4],[48,11,45,11],[48,12,45,12,"util_1"],[48,18,45,18],[48,19,45,19,"hasBigInt"],[48,28,45,28],[48,32,45,32,"onlyBn"],[48,38,45,38],[48,41,46,10,"addBn"],[48,46,46,15],[48,47,46,16,"seckey"],[48,53,46,22],[48,55,46,24,"tweak"],[48,60,46,29],[48,61,46,30],[48,64,47,10,"addBi"],[48,69,47,15],[48,70,47,16,"seckey"],[48,76,47,22],[48,78,47,24,"tweak"],[48,83,47,29],[48,84,47,30],[49,2,48,0],[50,0,48,1],[50,3]],"functionMap":{"names":["<global>","addBi","addBn","secp256k1PrivateKeyTweakAdd"],"mappings":"AAA;ACS;CDa;AEC;CFa;AGC;CHU"},"hasCjsExports":true},"type":"js/module"}]} |