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

1 line
9.7 KiB
Plaintext

{"dependencies":[{"name":"@polkadot/util","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":4,"column":15,"index":125},"end":{"line":4,"column":40,"index":150}}],"key":"u0mzEw2nilnHoUWtEdZl0JKHutA=","exportNames":["*"],"imports":1}},{"name":"../blake2/asU8a.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":5,"column":19,"index":171},"end":{"line":5,"column":48,"index":200}}],"key":"4t7P0YdL+tdsh/RUDebm0jnOT1k=","exportNames":["*"],"imports":1}},{"name":"../bn.js","data":{"asyncType":null,"isESMImport":false,"locs":[{"start":{"line":6,"column":16,"index":218},"end":{"line":6,"column":35,"index":237}}],"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.DeriveJunction = void 0;\n const util_1 = require(_dependencyMap[0], \"@polkadot/util\");\n const asU8a_js_1 = require(_dependencyMap[1], \"../blake2/asU8a.js\");\n const bn_js_1 = require(_dependencyMap[2], \"../bn.js\");\n const RE_NUMBER = /^\\d+$/;\n const JUNCTION_ID_LEN = 32;\n class DeriveJunction {\n #chainCode = new Uint8Array(32);\n #isHard = false;\n static from(value) {\n const result = new DeriveJunction();\n const [code, isHard] = value.startsWith('/') ? [value.substring(1), true] : [value, false];\n result.soft(RE_NUMBER.test(code) ? new util_1.BN(code, 10) : code);\n return isHard ? result.harden() : result;\n }\n get chainCode() {\n return this.#chainCode;\n }\n get isHard() {\n return this.#isHard;\n }\n get isSoft() {\n return !this.#isHard;\n }\n hard(value) {\n return this.soft(value).harden();\n }\n harden() {\n this.#isHard = true;\n return this;\n }\n soft(value) {\n if ((0, util_1.isNumber)(value) || (0, util_1.isBn)(value) || (0, util_1.isBigInt)(value)) {\n return this.soft((0, util_1.bnToU8a)(value, bn_js_1.BN_LE_256_OPTS));\n } else if ((0, util_1.isHex)(value)) {\n return this.soft((0, util_1.hexToU8a)(value));\n } else if ((0, util_1.isString)(value)) {\n return this.soft((0, util_1.compactAddLength)((0, util_1.stringToU8a)(value)));\n } else if (value.length > JUNCTION_ID_LEN) {\n return this.soft((0, asU8a_js_1.blake2AsU8a)(value));\n }\n this.#chainCode.fill(0);\n this.#chainCode.set(value, 0);\n return this;\n }\n soften() {\n this.#isHard = false;\n return this;\n }\n }\n exports.DeriveJunction = DeriveJunction;\n});","lineCount":58,"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,"DeriveJunction"],[7,24,3,22],[7,27,3,25],[7,32,3,30],[7,33,3,31],[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,"asU8a_js_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,"RE_NUMBER"],[11,17,7,15],[11,20,7,18],[11,27,7,25],[12,2,8,0],[12,8,8,6,"JUNCTION_ID_LEN"],[12,23,8,21],[12,26,8,24],[12,28,8,26],[13,2,9,0],[13,8,9,6,"DeriveJunction"],[13,22,9,20],[13,23,9,21],[14,4,10,4],[14,5,10,5,"chainCode"],[14,14,10,14],[14,17,10,17],[14,21,10,21,"Uint8Array"],[14,31,10,31],[14,32,10,32],[14,34,10,34],[14,35,10,35],[15,4,11,4],[15,5,11,5,"isHard"],[15,11,11,11],[15,14,11,14],[15,19,11,19],[16,4,12,4],[16,11,12,11,"from"],[16,15,12,15,"from"],[16,16,12,16,"value"],[16,21,12,21],[16,23,12,23],[17,6,13,8],[17,12,13,14,"result"],[17,18,13,20],[17,21,13,23],[17,25,13,27,"DeriveJunction"],[17,39,13,41],[17,40,13,42],[17,41,13,43],[18,6,14,8],[18,12,14,14],[18,13,14,15,"code"],[18,17,14,19],[18,19,14,21,"isHard"],[18,25,14,27],[18,26,14,28],[18,29,14,31,"value"],[18,34,14,36],[18,35,14,37,"startsWith"],[18,45,14,47],[18,46,14,48],[18,49,14,51],[18,50,14,52],[18,53,15,14],[18,54,15,15,"value"],[18,59,15,20],[18,60,15,21,"substring"],[18,69,15,30],[18,70,15,31],[18,71,15,32],[18,72,15,33],[18,74,15,35],[18,78,15,39],[18,79,15,40],[18,82,16,14],[18,83,16,15,"value"],[18,88,16,20],[18,90,16,22],[18,95,16,27],[18,96,16,28],[19,6,17,8,"result"],[19,12,17,14],[19,13,17,15,"soft"],[19,17,17,19],[19,18,17,20,"RE_NUMBER"],[19,27,17,29],[19,28,17,30,"test"],[19,32,17,34],[19,33,17,35,"code"],[19,37,17,39],[19,38,17,40],[19,41,18,14],[19,45,18,18,"util_1"],[19,51,18,24],[19,52,18,25,"BN"],[19,54,18,27],[19,55,18,28,"code"],[19,59,18,32],[19,61,18,34],[19,63,18,36],[19,64,18,37],[19,67,19,14,"code"],[19,71,19,18],[19,72,19,19],[20,6,20,8],[20,13,20,15,"isHard"],[20,19,20,21],[20,22,21,14,"result"],[20,28,21,20],[20,29,21,21,"harden"],[20,35,21,27],[20,36,21,28],[20,37,21,29],[20,40,22,14,"result"],[20,46,22,20],[21,4,23,4],[22,4,24,4],[22,8,24,8,"chainCode"],[22,17,24,17,"chainCode"],[22,18,24,17],[22,20,24,20],[23,6,25,8],[23,13,25,15],[23,17,25,19],[23,18,25,20],[23,19,25,21,"chainCode"],[23,28,25,30],[24,4,26,4],[25,4,27,4],[25,8,27,8,"isHard"],[25,14,27,14,"isHard"],[25,15,27,14],[25,17,27,17],[26,6,28,8],[26,13,28,15],[26,17,28,19],[26,18,28,20],[26,19,28,21,"isHard"],[26,25,28,27],[27,4,29,4],[28,4,30,4],[28,8,30,8,"isSoft"],[28,14,30,14,"isSoft"],[28,15,30,14],[28,17,30,17],[29,6,31,8],[29,13,31,15],[29,14,31,16],[29,18,31,20],[29,19,31,21],[29,20,31,22,"isHard"],[29,26,31,28],[30,4,32,4],[31,4,33,4,"hard"],[31,8,33,8,"hard"],[31,9,33,9,"value"],[31,14,33,14],[31,16,33,16],[32,6,34,8],[32,13,34,15],[32,17,34,19],[32,18,34,20,"soft"],[32,22,34,24],[32,23,34,25,"value"],[32,28,34,30],[32,29,34,31],[32,30,34,32,"harden"],[32,36,34,38],[32,37,34,39],[32,38,34,40],[33,4,35,4],[34,4,36,4,"harden"],[34,10,36,10,"harden"],[34,11,36,10],[34,13,36,13],[35,6,37,8],[35,10,37,12],[35,11,37,13],[35,12,37,14,"isHard"],[35,18,37,20],[35,21,37,23],[35,25,37,27],[36,6,38,8],[36,13,38,15],[36,17,38,19],[37,4,39,4],[38,4,40,4,"soft"],[38,8,40,8,"soft"],[38,9,40,9,"value"],[38,14,40,14],[38,16,40,16],[39,6,41,8],[39,10,41,12],[39,11,41,13],[39,12,41,14],[39,14,41,16,"util_1"],[39,20,41,22],[39,21,41,23,"isNumber"],[39,29,41,31],[39,31,41,33,"value"],[39,36,41,38],[39,37,41,39],[39,41,41,43],[39,42,41,44],[39,43,41,45],[39,45,41,47,"util_1"],[39,51,41,53],[39,52,41,54,"isBn"],[39,56,41,58],[39,58,41,60,"value"],[39,63,41,65],[39,64,41,66],[39,68,41,70],[39,69,41,71],[39,70,41,72],[39,72,41,74,"util_1"],[39,78,41,80],[39,79,41,81,"isBigInt"],[39,87,41,89],[39,89,41,91,"value"],[39,94,41,96],[39,95,41,97],[39,97,41,99],[40,8,42,12],[40,15,42,19],[40,19,42,23],[40,20,42,24,"soft"],[40,24,42,28],[40,25,42,29],[40,26,42,30],[40,27,42,31],[40,29,42,33,"util_1"],[40,35,42,39],[40,36,42,40,"bnToU8a"],[40,43,42,47],[40,45,42,49,"value"],[40,50,42,54],[40,52,42,56,"bn_js_1"],[40,59,42,63],[40,60,42,64,"BN_LE_256_OPTS"],[40,74,42,78],[40,75,42,79],[40,76,42,80],[41,6,43,8],[41,7,43,9],[41,13,44,13],[41,17,44,17],[41,18,44,18],[41,19,44,19],[41,21,44,21,"util_1"],[41,27,44,27],[41,28,44,28,"isHex"],[41,33,44,33],[41,35,44,35,"value"],[41,40,44,40],[41,41,44,41],[41,43,44,43],[42,8,45,12],[42,15,45,19],[42,19,45,23],[42,20,45,24,"soft"],[42,24,45,28],[42,25,45,29],[42,26,45,30],[42,27,45,31],[42,29,45,33,"util_1"],[42,35,45,39],[42,36,45,40,"hexToU8a"],[42,44,45,48],[42,46,45,50,"value"],[42,51,45,55],[42,52,45,56],[42,53,45,57],[43,6,46,8],[43,7,46,9],[43,13,47,13],[43,17,47,17],[43,18,47,18],[43,19,47,19],[43,21,47,21,"util_1"],[43,27,47,27],[43,28,47,28,"isString"],[43,36,47,36],[43,38,47,38,"value"],[43,43,47,43],[43,44,47,44],[43,46,47,46],[44,8,48,12],[44,15,48,19],[44,19,48,23],[44,20,48,24,"soft"],[44,24,48,28],[44,25,48,29],[44,26,48,30],[44,27,48,31],[44,29,48,33,"util_1"],[44,35,48,39],[44,36,48,40,"compactAddLength"],[44,52,48,56],[44,54,48,58],[44,55,48,59],[44,56,48,60],[44,58,48,62,"util_1"],[44,64,48,68],[44,65,48,69,"stringToU8a"],[44,76,48,80],[44,78,48,82,"value"],[44,83,48,87],[44,84,48,88],[44,85,48,89],[44,86,48,90],[45,6,49,8],[45,7,49,9],[45,13,50,13],[45,17,50,17,"value"],[45,22,50,22],[45,23,50,23,"length"],[45,29,50,29],[45,32,50,32,"JUNCTION_ID_LEN"],[45,47,50,47],[45,49,50,49],[46,8,51,12],[46,15,51,19],[46,19,51,23],[46,20,51,24,"soft"],[46,24,51,28],[46,25,51,29],[46,26,51,30],[46,27,51,31],[46,29,51,33,"asU8a_js_1"],[46,39,51,43],[46,40,51,44,"blake2AsU8a"],[46,51,51,55],[46,53,51,57,"value"],[46,58,51,62],[46,59,51,63],[46,60,51,64],[47,6,52,8],[48,6,53,8],[48,10,53,12],[48,11,53,13],[48,12,53,14,"chainCode"],[48,21,53,23],[48,22,53,24,"fill"],[48,26,53,28],[48,27,53,29],[48,28,53,30],[48,29,53,31],[49,6,54,8],[49,10,54,12],[49,11,54,13],[49,12,54,14,"chainCode"],[49,21,54,23],[49,22,54,24,"set"],[49,25,54,27],[49,26,54,28,"value"],[49,31,54,33],[49,33,54,35],[49,34,54,36],[49,35,54,37],[50,6,55,8],[50,13,55,15],[50,17,55,19],[51,4,56,4],[52,4,57,4,"soften"],[52,10,57,10,"soften"],[52,11,57,10],[52,13,57,13],[53,6,58,8],[53,10,58,12],[53,11,58,13],[53,12,58,14,"isHard"],[53,18,58,20],[53,21,58,23],[53,26,58,28],[54,6,59,8],[54,13,59,15],[54,17,59,19],[55,4,60,4],[56,2,61,0],[57,2,62,0,"exports"],[57,9,62,7],[57,10,62,8,"DeriveJunction"],[57,24,62,22],[57,27,62,25,"DeriveJunction"],[57,41,62,39],[58,0,62,40],[58,3]],"functionMap":{"names":["<global>","DeriveJunction","from","get__chainCode","get__isHard","get__isSoft","hard","harden","soft","soften"],"mappings":"AAA;ACQ;ICG;KDW;IEC;KFE;IGC;KHE;IIC;KJE;IKC;KLE;IMC;KNG;IOC;KPgB;IQC;KRG;CDC"},"hasCjsExports":true},"type":"js/module"}]}