@lisk-builders/lisk-hd-key
Version:
HD key derivation for Lisk coin
11 lines (10 loc) • 463 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.derivePath = void 0;
const ed25519_hd_key_1 = require("ed25519-hd-key");
const is_valid_coin_type_1 = require("./is-valid-coin-type");
const derivePath = (path, seedHex) => {
(0, is_valid_coin_type_1.validateLiskPath)(path);
return (0, ed25519_hd_key_1.derivePath)(path, Buffer.isBuffer(seedHex) ? seedHex.toString('hex') : seedHex);
};
exports.derivePath = derivePath;