"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.KeyValidator = void 0;
const symbol_sdk_1 = require("symbol-sdk");
/**
 * Key validator
 */
class KeyValidator {
    /**
     * validates if the key is valid.
     * @param {string} value - the key.
     * @returns {true | string}
     */
    validate(value) {
        try {
            symbol_sdk_1.UInt64.fromHex(value);
        }
        catch (err) {
            return 'Key must be an hexadecimal value with size UInt64';
        }
        return true;
    }
}
exports.KeyValidator = KeyValidator;
