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