mirror of
https://github.com/pezkuwichain/pezkuwi-mobile-app.git
synced 2026-05-30 07:41:01 +00:00
1 line
4.8 KiB
Plaintext
1 line
4.8 KiB
Plaintext
{"dependencies":[{"name":"../key/index.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":49,"index":49}}],"key":"IHKGG9hbRleXr5ik4YD3gOt9CAs=","exportNames":["*"],"imports":1}},{"name":"../sr25519/index.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":2,"column":0,"index":50},"end":{"line":2,"column":58,"index":108}}],"key":"8PcCv5vTmyOlidI3MTfDlXg3TEI=","exportNames":["*"],"imports":1}},{"name":"./decode.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":3,"column":0,"index":109},"end":{"line":3,"column":44,"index":153}}],"key":"TmkOQYXGsJWDYt+2Zv46gtCcFf0=","exportNames":["*"],"imports":1}},{"name":"./encode.js","data":{"asyncType":null,"isESMImport":true,"locs":[{"start":{"line":4,"column":0,"index":154},"end":{"line":4,"column":44,"index":198}}],"key":"9UNrGXgjM0id6VNQizMAH8E53gM=","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.deriveAddress = deriveAddress;\n var _keyIndexJs = require(_dependencyMap[0], \"../key/index.js\");\n var _sr25519IndexJs = require(_dependencyMap[1], \"../sr25519/index.js\");\n var _decodeJs = require(_dependencyMap[2], \"./decode.js\");\n var _encodeJs = require(_dependencyMap[3], \"./encode.js\");\n function filterHard({\n isHard\n }) {\n return isHard;\n }\n /**\n * @name deriveAddress\n * @summary Creates a sr25519 derived address from the supplied and path.\n * @description\n * Creates a sr25519 derived address based on the input address/publicKey and the uri supplied.\n */\n function deriveAddress(who, suri, ss58Format) {\n const {\n path\n } = (0, _keyIndexJs.keyExtractPath)(suri);\n if (!path.length || path.every(filterHard)) {\n throw new Error('Expected suri to contain a combination of non-hard paths');\n }\n let publicKey = (0, _decodeJs.decodeAddress)(who);\n for (const {\n chainCode\n } of path) {\n publicKey = (0, _sr25519IndexJs.sr25519DerivePublic)(publicKey, chainCode);\n }\n return (0, _encodeJs.encodeAddress)(publicKey, ss58Format);\n }\n});","lineCount":38,"map":[[7,2,14,0,"exports"],[7,9,14,0],[7,10,14,0,"deriveAddress"],[7,23,14,0],[7,26,14,0,"deriveAddress"],[7,39,14,0],[8,2,1,0],[8,6,1,0,"_keyIndexJs"],[8,17,1,0],[8,20,1,0,"require"],[8,27,1,0],[8,28,1,0,"_dependencyMap"],[8,42,1,0],[9,2,2,0],[9,6,2,0,"_sr25519IndexJs"],[9,21,2,0],[9,24,2,0,"require"],[9,31,2,0],[9,32,2,0,"_dependencyMap"],[9,46,2,0],[10,2,3,0],[10,6,3,0,"_decodeJs"],[10,15,3,0],[10,18,3,0,"require"],[10,25,3,0],[10,26,3,0,"_dependencyMap"],[10,40,3,0],[11,2,4,0],[11,6,4,0,"_encodeJs"],[11,15,4,0],[11,18,4,0,"require"],[11,25,4,0],[11,26,4,0,"_dependencyMap"],[11,40,4,0],[12,2,5,0],[12,11,5,9,"filterHard"],[12,21,5,19,"filterHard"],[12,22,5,20],[13,4,5,22,"isHard"],[14,2,5,29],[14,3,5,30],[14,5,5,32],[15,4,6,4],[15,11,6,11,"isHard"],[15,17,6,17],[16,2,7,0],[17,2,8,0],[18,0,9,0],[19,0,10,0],[20,0,11,0],[21,0,12,0],[22,0,13,0],[23,2,14,7],[23,11,14,16,"deriveAddress"],[23,24,14,29,"deriveAddress"],[23,25,14,30,"who"],[23,28,14,33],[23,30,14,35,"suri"],[23,34,14,39],[23,36,14,41,"ss58Format"],[23,46,14,51],[23,48,14,53],[24,4,15,4],[24,10,15,10],[25,6,15,12,"path"],[26,4,15,17],[26,5,15,18],[26,8,15,21],[26,12,15,21,"keyExtractPath"],[26,23,15,35],[26,24,15,35,"keyExtractPath"],[26,38,15,35],[26,40,15,36,"suri"],[26,44,15,40],[26,45,15,41],[27,4,16,4],[27,8,16,8],[27,9,16,9,"path"],[27,13,16,13],[27,14,16,14,"length"],[27,20,16,20],[27,24,16,24,"path"],[27,28,16,28],[27,29,16,29,"every"],[27,34,16,34],[27,35,16,35,"filterHard"],[27,45,16,45],[27,46,16,46],[27,48,16,48],[28,6,17,8],[28,12,17,14],[28,16,17,18,"Error"],[28,21,17,23],[28,22,17,24],[28,80,17,82],[28,81,17,83],[29,4,18,4],[30,4,19,4],[30,8,19,8,"publicKey"],[30,17,19,17],[30,20,19,20],[30,24,19,20,"decodeAddress"],[30,33,19,33],[30,34,19,33,"decodeAddress"],[30,47,19,33],[30,49,19,34,"who"],[30,52,19,37],[30,53,19,38],[31,4,20,4],[31,9,20,9],[31,15,20,15],[32,6,20,17,"chainCode"],[33,4,20,27],[33,5,20,28],[33,9,20,32,"path"],[33,13,20,36],[33,15,20,38],[34,6,21,8,"publicKey"],[34,15,21,17],[34,18,21,20],[34,22,21,20,"sr25519DerivePublic"],[34,37,21,39],[34,38,21,39,"sr25519DerivePublic"],[34,57,21,39],[34,59,21,40,"publicKey"],[34,68,21,49],[34,70,21,51,"chainCode"],[34,79,21,60],[34,80,21,61],[35,4,22,4],[36,4,23,4],[36,11,23,11],[36,15,23,11,"encodeAddress"],[36,24,23,24],[36,25,23,24,"encodeAddress"],[36,38,23,24],[36,40,23,25,"publicKey"],[36,49,23,34],[36,51,23,36,"ss58Format"],[36,61,23,46],[36,62,23,47],[37,2,24,0],[38,0,24,1],[38,3]],"functionMap":{"names":["<global>","filterHard","deriveAddress"],"mappings":"AAA;ACI;CDE;OEO;CFU"},"hasCjsExports":false},"type":"js/module"}]} |