"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.initGetTrieAccountHashesResp = void 0;
const SchemaHelpers_1 = require("../../utils/serialization/SchemaHelpers");
const AJVSchemaEnum_1 = require("../enum/AJVSchemaEnum");
const schemaAccountIDAndHash = {
    type: 'object',
    properties: {
        accountID: { type: 'string' },
        hash: { type: 'string' },
    },
    required: ['accountID', 'hash'],
};
const schemaRadixAndChildHashes = {
    type: 'object',
    properties: {
        radix: { type: 'string' },
        childAccounts: {
            type: 'array',
            items: schemaAccountIDAndHash,
        },
    },
    required: ['radix', 'childAccounts'],
};
const schemaGetTrieAccountHashesResp = {
    type: 'object',
    properties: {
        nodeChildHashes: {
            type: 'array',
            items: schemaRadixAndChildHashes,
        },
        stats: {
            type: 'object',
            properties: {
                matched: { type: 'number' },
                visisted: { type: 'number' },
                empty: { type: 'number' },
                childCount: { type: 'number' },
            },
            required: ['matched', 'visisted', 'empty', 'childCount'],
        },
    },
    required: ['nodeChildHashes', 'stats'],
};
function initGetTrieAccountHashesResp() {
    addSchemaDependencies();
    addSchemas();
}
exports.initGetTrieAccountHashesResp = initGetTrieAccountHashesResp;
// Function to add schema dependencies
function addSchemaDependencies() {
    // No dependencies
}
// Function to register the schema
function addSchemas() {
    (0, SchemaHelpers_1.addSchema)(AJVSchemaEnum_1.AJVSchemaEnum.GetTrieAccountHashesResp, schemaGetTrieAccountHashesResp);
}
//# sourceMappingURL=GetTrieAccountHashesResp.js.map