Files
pezkuwi-mobile-app/frontend/.metro-cache/cache/e5/e95317bda5b098f8b4280aa9f74a7872caade6a7bb4215071e145855d1fec099da18d4
T
2025-10-24 02:50:33 +00:00

1 line
8.2 KiB
Plaintext

{"dependencies":[{"name":"../../ed25519/index.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":19,"index":125},"end":{"line":4,"column":52,"index":158}}],"key":"bw5ZLvACIg1VKu5sT8c6xsBOePc=","exportNames":["*"],"imports":1}},{"name":"../../mnemonic/index.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":19,"index":179},"end":{"line":5,"column":53,"index":213}}],"key":"sZmcOHxqJ17R+tBMsbktUOyZYvo=","exportNames":["*"],"imports":1}},{"name":"../validatePath.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":6,"column":26,"index":241},"end":{"line":6,"column":55,"index":270}}],"key":"dVLuLIlI76M8kErTJUVVKA9ve1I=","exportNames":["*"],"imports":1}},{"name":"./derivePrivate.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":7,"column":27,"index":299},"end":{"line":7,"column":56,"index":328}}],"key":"79FFBNYgxU3wbkcAONw9d42ZOfI=","exportNames":["*"],"imports":1}},{"name":"./master.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":8,"column":20,"index":350},"end":{"line":8,"column":42,"index":372}}],"key":"dDxJARY4Wyu7qX8WeUDjLo5HQe8=","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.hdLedger = hdLedger;\n const index_js_1 = require(_dependencyMap[0], \"../../ed25519/index.js\");\n const index_js_2 = require(_dependencyMap[1], \"../../mnemonic/index.js\");\n const validatePath_js_1 = require(_dependencyMap[2], \"../validatePath.js\");\n const derivePrivate_js_1 = require(_dependencyMap[3], \"./derivePrivate.js\");\n const master_js_1 = require(_dependencyMap[4], \"./master.js\");\n function hdLedger(_mnemonic, path) {\n const words = _mnemonic.split(' ').map(s => s.trim()).filter(s => s);\n if (![12, 24, 25].includes(words.length)) {\n throw new Error('Expected a mnemonic with 24 words (or 25 including a password)');\n }\n const [mnemonic, password] = words.length === 25 ? [words.slice(0, 24).join(' '), words[24]] : [words.join(' '), ''];\n if (!(0, index_js_2.mnemonicValidate)(mnemonic)) {\n throw new Error('Invalid mnemonic passed to ledger derivation');\n } else if (!(0, validatePath_js_1.hdValidatePath)(path)) {\n throw new Error('Invalid derivation path');\n }\n const parts = path.split('/').slice(1);\n let seed = (0, master_js_1.ledgerMaster)(mnemonic, password);\n for (const p of parts) {\n const n = parseInt(p.replace(/'$/, ''), 10);\n seed = (0, derivePrivate_js_1.ledgerDerivePrivate)(seed, n < validatePath_js_1.HARDENED ? n + validatePath_js_1.HARDENED : n);\n }\n return (0, index_js_1.ed25519PairFromSeed)(seed.slice(0, 32));\n }\n});","lineCount":32,"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,"hdLedger"],[7,18,3,16],[7,21,3,19,"hdLedger"],[7,29,3,27],[8,2,4,0],[8,8,4,6,"index_js_1"],[8,18,4,16],[8,21,4,19,"require"],[8,28,4,26],[8,29,4,26,"_dependencyMap"],[8,43,4,26],[8,72,4,51],[8,73,4,52],[9,2,5,0],[9,8,5,6,"index_js_2"],[9,18,5,16],[9,21,5,19,"require"],[9,28,5,26],[9,29,5,26,"_dependencyMap"],[9,43,5,26],[9,73,5,52],[9,74,5,53],[10,2,6,0],[10,8,6,6,"validatePath_js_1"],[10,25,6,23],[10,28,6,26,"require"],[10,35,6,33],[10,36,6,33,"_dependencyMap"],[10,50,6,33],[10,75,6,54],[10,76,6,55],[11,2,7,0],[11,8,7,6,"derivePrivate_js_1"],[11,26,7,24],[11,29,7,27,"require"],[11,36,7,34],[11,37,7,34,"_dependencyMap"],[11,51,7,34],[11,76,7,55],[11,77,7,56],[12,2,8,0],[12,8,8,6,"master_js_1"],[12,19,8,17],[12,22,8,20,"require"],[12,29,8,27],[12,30,8,27,"_dependencyMap"],[12,44,8,27],[12,62,8,41],[12,63,8,42],[13,2,9,0],[13,11,9,9,"hdLedger"],[13,19,9,17,"hdLedger"],[13,20,9,18,"_mnemonic"],[13,29,9,27],[13,31,9,29,"path"],[13,35,9,33],[13,37,9,35],[14,4,10,4],[14,10,10,10,"words"],[14,15,10,15],[14,18,10,18,"_mnemonic"],[14,27,10,27],[14,28,11,9,"split"],[14,33,11,14],[14,34,11,15],[14,37,11,18],[14,38,11,19],[14,39,12,9,"map"],[14,42,12,12],[14,43,12,14,"s"],[14,44,12,15],[14,48,12,20,"s"],[14,49,12,21],[14,50,12,22,"trim"],[14,54,12,26],[14,55,12,27],[14,56,12,28],[14,57,12,29],[14,58,13,9,"filter"],[14,64,13,15],[14,65,13,17,"s"],[14,66,13,18],[14,70,13,23,"s"],[14,71,13,24],[14,72,13,25],[15,4,14,4],[15,8,14,8],[15,9,14,9],[15,10,14,10],[15,12,14,12],[15,14,14,14],[15,16,14,16],[15,18,14,18],[15,20,14,20],[15,21,14,21],[15,22,14,22,"includes"],[15,30,14,30],[15,31,14,31,"words"],[15,36,14,36],[15,37,14,37,"length"],[15,43,14,43],[15,44,14,44],[15,46,14,46],[16,6,15,8],[16,12,15,14],[16,16,15,18,"Error"],[16,21,15,23],[16,22,15,24],[16,86,15,88],[16,87,15,89],[17,4,16,4],[18,4,17,4],[18,10,17,10],[18,11,17,11,"mnemonic"],[18,19,17,19],[18,21,17,21,"password"],[18,29,17,29],[18,30,17,30],[18,33,17,33,"words"],[18,38,17,38],[18,39,17,39,"length"],[18,45,17,45],[18,50,17,50],[18,52,17,52],[18,55,18,10],[18,56,18,11,"words"],[18,61,18,16],[18,62,18,17,"slice"],[18,67,18,22],[18,68,18,23],[18,69,18,24],[18,71,18,26],[18,73,18,28],[18,74,18,29],[18,75,18,30,"join"],[18,79,18,34],[18,80,18,35],[18,83,18,38],[18,84,18,39],[18,86,18,41,"words"],[18,91,18,46],[18,92,18,47],[18,94,18,49],[18,95,18,50],[18,96,18,51],[18,99,19,10],[18,100,19,11,"words"],[18,105,19,16],[18,106,19,17,"join"],[18,110,19,21],[18,111,19,22],[18,114,19,25],[18,115,19,26],[18,117,19,28],[18,119,19,30],[18,120,19,31],[19,4,20,4],[19,8,20,8],[19,9,20,9],[19,10,20,10],[19,11,20,11],[19,13,20,13,"index_js_2"],[19,23,20,23],[19,24,20,24,"mnemonicValidate"],[19,40,20,40],[19,42,20,42,"mnemonic"],[19,50,20,50],[19,51,20,51],[19,53,20,53],[20,6,21,8],[20,12,21,14],[20,16,21,18,"Error"],[20,21,21,23],[20,22,21,24],[20,68,21,70],[20,69,21,71],[21,4,22,4],[21,5,22,5],[21,11,23,9],[21,15,23,13],[21,16,23,14],[21,17,23,15],[21,18,23,16],[21,20,23,18,"validatePath_js_1"],[21,37,23,35],[21,38,23,36,"hdValidatePath"],[21,52,23,50],[21,54,23,52,"path"],[21,58,23,56],[21,59,23,57],[21,61,23,59],[22,6,24,8],[22,12,24,14],[22,16,24,18,"Error"],[22,21,24,23],[22,22,24,24],[22,47,24,49],[22,48,24,50],[23,4,25,4],[24,4,26,4],[24,10,26,10,"parts"],[24,15,26,15],[24,18,26,18,"path"],[24,22,26,22],[24,23,26,23,"split"],[24,28,26,28],[24,29,26,29],[24,32,26,32],[24,33,26,33],[24,34,26,34,"slice"],[24,39,26,39],[24,40,26,40],[24,41,26,41],[24,42,26,42],[25,4,27,4],[25,8,27,8,"seed"],[25,12,27,12],[25,15,27,15],[25,16,27,16],[25,17,27,17],[25,19,27,19,"master_js_1"],[25,30,27,30],[25,31,27,31,"ledgerMaster"],[25,43,27,43],[25,45,27,45,"mnemonic"],[25,53,27,53],[25,55,27,55,"password"],[25,63,27,63],[25,64,27,64],[26,4,28,4],[26,9,28,9],[26,15,28,15,"p"],[26,16,28,16],[26,20,28,20,"parts"],[26,25,28,25],[26,27,28,27],[27,6,29,8],[27,12,29,14,"n"],[27,13,29,15],[27,16,29,18,"parseInt"],[27,24,29,26],[27,25,29,27,"p"],[27,26,29,28],[27,27,29,29,"replace"],[27,34,29,36],[27,35,29,37],[27,39,29,41],[27,41,29,43],[27,43,29,45],[27,44,29,46],[27,46,29,48],[27,48,29,50],[27,49,29,51],[28,6,30,8,"seed"],[28,10,30,12],[28,13,30,15],[28,14,30,16],[28,15,30,17],[28,17,30,19,"derivePrivate_js_1"],[28,35,30,37],[28,36,30,38,"ledgerDerivePrivate"],[28,55,30,57],[28,57,30,59,"seed"],[28,61,30,63],[28,63,30,66,"n"],[28,64,30,67],[28,67,30,70,"validatePath_js_1"],[28,84,30,87],[28,85,30,88,"HARDENED"],[28,93,30,96],[28,96,30,101,"n"],[28,97,30,102],[28,100,30,105,"validatePath_js_1"],[28,117,30,122],[28,118,30,123,"HARDENED"],[28,126,30,131],[28,129,30,135,"n"],[28,130,30,136],[28,131,30,137],[29,4,31,4],[30,4,32,4],[30,11,32,11],[30,12,32,12],[30,13,32,13],[30,15,32,15,"index_js_1"],[30,25,32,25],[30,26,32,26,"ed25519PairFromSeed"],[30,45,32,45],[30,47,32,47,"seed"],[30,51,32,51],[30,52,32,52,"slice"],[30,57,32,57],[30,58,32,58],[30,59,32,59],[30,61,32,61],[30,63,32,63],[30,64,32,64],[30,65,32,65],[31,2,33,0],[32,0,33,1],[32,3]],"functionMap":{"names":["<global>","hdLedger","_mnemonic.split.map$argument_0","_mnemonic.split.map.filter$argument_0"],"mappings":"AAA;ACQ;aCG,eD;gBEC,QF;CDoB"},"hasCjsExports":true},"type":"js/module"}]}