mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-25 09:27:58 +00:00
chore: update to version 14.0.11 and align website URLs
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.keyFromPath = keyFromPath;
|
||||
const hdkdEcdsa_js_1 = require("./hdkdEcdsa.js");
|
||||
const hdkdEd25519_js_1 = require("./hdkdEd25519.js");
|
||||
const hdkdSr25519_js_1 = require("./hdkdSr25519.js");
|
||||
const generators = {
|
||||
ecdsa: hdkdEcdsa_js_1.keyHdkdEcdsa,
|
||||
ed25519: hdkdEd25519_js_1.keyHdkdEd25519,
|
||||
// FIXME This is Substrate-compatible, not Ethereum-compatible
|
||||
ethereum: hdkdEcdsa_js_1.keyHdkdEcdsa,
|
||||
sr25519: hdkdSr25519_js_1.keyHdkdSr25519
|
||||
};
|
||||
function keyFromPath(pair, path, type) {
|
||||
const keyHdkd = generators[type];
|
||||
let result = pair;
|
||||
for (const junction of path) {
|
||||
result = keyHdkd(result, junction);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
Reference in New Issue
Block a user