"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.initAllowedArchiverResponse = exports.schemaAllowedArchiverResponse = void 0;
const SchemaHelpers_1 = require("../../utils/serialization/SchemaHelpers");
const AJVSchemaEnum_1 = require("../enum/AJVSchemaEnum");
exports.schemaAllowedArchiverResponse = {
    type: 'object',
    properties: {
        allowedArchivers: {
            type: 'array',
            items: {
                type: 'object',
                properties: {
                    ip: { type: 'string' },
                    port: { type: 'number' },
                    publicKey: { type: 'string' },
                },
                required: ['ip', 'port', 'publicKey'],
            },
        },
        signatures: {
            type: 'array',
            items: {
                type: 'object',
                properties: {
                    owner: { type: 'string' },
                    sig: { type: 'string' },
                },
                required: ['owner', 'sig'],
            },
        },
    },
    required: ['allowedArchivers', 'signatures'],
    additionalProperties: false,
};
function initAllowedArchiverResponse() {
    addSchemaDependencies();
    addSchemas();
}
exports.initAllowedArchiverResponse = initAllowedArchiverResponse;
function addSchemaDependencies() {
    // No dependencies
}
function addSchemas() {
    (0, SchemaHelpers_1.addSchema)(AJVSchemaEnum_1.AJVSchemaEnum.AllowedArchiverResponse, exports.schemaAllowedArchiverResponse);
}
//# sourceMappingURL=AllowedArchiverResponse.js.map