"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HexAddressResolver = void 0;
const options_resolver_1 = require("../options-resolver");
const hexAddress_validator_1 = require("../validators/hexAddress.validator");
/**
 * Hex Address resolver
 */
class HexAddressResolver {
    /**
     * Resolves an address provided by the user.
     * @param {Options} options - Command options.
     * @param {Profile} secondSource - Secondary data source.
     * @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 : 'address', () => undefined, altText ? altText : 'Enter an hex address:', 'text', new hexAddress_validator_1.HexAddressValidator());
        return resolution;
    }
}
exports.HexAddressResolver = HexAddressResolver;
