"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HeightResolver = void 0;
const symbol_sdk_1 = require("symbol-sdk");
const options_resolver_1 = require("../options-resolver");
const block_validator_1 = require("../validators/block.validator");
/**
 * Height resolver
 */
class HeightResolver {
    /**
     * Resolves a height provided by the user.
     * @param {Options} options - Command options.
     * @param {string} altText - Alternative text.
     * @param {string} altKey - Alternative key.
     * @returns {Promise<UInt64>}
     */
    async resolve(options, altText, altKey) {
        const resolution = await (0, options_resolver_1.OptionsResolver)(options, altKey ? altKey : 'height', () => undefined, altText ? altText : 'Enter the block height:', 'text', new block_validator_1.HeightValidator());
        return symbol_sdk_1.UInt64.fromNumericString(resolution);
    }
}
exports.HeightResolver = HeightResolver;
