"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PrivateKeyResolver = void 0;
const options_resolver_1 = require("../options-resolver");
const privateKey_validator_1 = require("../validators/privateKey.validator");
/**
 * Private key resolver
 */
class PrivateKeyResolver {
    /**
     * Resolves a private key provided by the user.
     * @param {Options} options - Command options.
     * @param {string} altText - Alternative text.
     * @param {string} altKey - Alternative key.
     * @returns {Promise<string>}
     */
    async resolve(options, altText, altKey) {
        const resolution = await (0, options_resolver_1.OptionsResolver)(options, altKey ? altKey : 'privateKey', () => undefined, altText ? altText : 'Enter your account private key:', 'password', new privateKey_validator_1.PrivateKeyValidator());
        return resolution;
    }
}
exports.PrivateKeyResolver = PrivateKeyResolver;
