UNPKG

@lisk-builders/lisk-hd-key

Version:
11 lines (10 loc) 463 B
"use strict"; 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;