import { ContainerType, ValueOf } from "@chainsafe/ssz";
import { ChainForkConfig } from "@lodestar/config";
import { Epoch, RootHex, Slot } from "@lodestar/types";
import { EmptyArgs, EmptyMeta, EmptyRequest, EmptyResponseData } from "../../utils/codecs.js";
import { Endpoint, RouteDefinitions } from "../../utils/index.js";
import { StateArgs } from "./beacon/state.js";
import { FilterGetPeers, NodePeer, PeerDirection, PeerState } from "./node.js";
export type SyncChainDebugState = {
    targetRoot: string | null;
    targetSlot: number | null;
    syncType: string;
    status: string;
    startEpoch: number;
    peers: number;
    batches: any[];
};
export type GossipQueueItem = {
    topic: unknown;
    propagationSource: string;
    data: Uint8Array;
    addedTimeMs: number;
    seenTimestampSec: number;
};
export type PeerScoreStat = {
    peerId: string;
    lodestarScore: number;
    gossipScore: number;
    ignoreNegativeGossipScore: boolean;
    score: number;
    lastUpdate: number;
};
export type GossipPeerScoreStat = {
    peerId: string;
};
export type RegenQueueItem = {
    key: string;
    args: unknown;
    addedTimeMs: number;
};
export type BlockProcessorQueueItem = {
    blockSlots: Slot[];
    jobOpts: Record<string, string | number | boolean | undefined>;
    addedTimeMs: number;
};
export type StateCacheItem = {
    slot: Slot;
    root: RootHex;
    /** Total number of reads */
    reads: number;
    /** Unix timestamp (ms) of the last read */
    lastRead: number;
    checkpointState: boolean;
};
export type LodestarNodePeer = NodePeer & {
    agentVersion: string;
};
export type BlacklistedBlock = {
    root: RootHex;
    slot: Slot | null;
};
export type LodestarThreadType = "main" | "network" | "discv5";
declare const HistoricalSummariesResponseType: ContainerType<{
    historicalSummaries: import("@chainsafe/ssz").ListCompositeType<ContainerType<{
        blockSummaryRoot: import("@chainsafe/ssz").ByteVectorType;
        stateSummaryRoot: import("@chainsafe/ssz").ByteVectorType;
    }>>;
    proof: import("@chainsafe/ssz").ArrayType<import("@chainsafe/ssz").Type<Uint8Array<ArrayBufferLike>>, unknown, unknown>;
}>;
export type HistoricalSummariesResponse = ValueOf<typeof HistoricalSummariesResponseType>;
export type Endpoints = {
    /** Trigger to write a heapdump to disk at `dirpath`. May take > 1min */
    writeHeapdump: Endpoint<"POST", {
        thread?: LodestarThreadType;
        dirpath?: string;
    }, {
        query: {
            thread?: LodestarThreadType;
            dirpath?: string;
        };
    }, {
        filepath: string;
    }, EmptyMeta>;
    /** Trigger to write 10m network thread profile to disk */
    writeProfile: Endpoint<"POST", {
        thread?: LodestarThreadType;
        duration?: number;
        dirpath?: string;
    }, {
        query: {
            thread?: LodestarThreadType;
            duration?: number;
            dirpath?: string;
        };
    }, {
        filepath: string;
    }, EmptyMeta>;
    /** TODO: description */
    getLatestWeakSubjectivityCheckpointEpoch: Endpoint<"GET", EmptyArgs, EmptyRequest, Epoch, EmptyMeta>;
    /** TODO: description */
    getSyncChainsDebugState: Endpoint<"GET", EmptyArgs, EmptyRequest, SyncChainDebugState[], EmptyMeta>;
    /** Dump all items in a gossip queue, by gossipType */
    getGossipQueueItems: Endpoint<"GET", {
        gossipType: string;
    }, {
        params: {
            gossipType: string;
        };
    }, unknown[], EmptyMeta>;
    /** Dump all items in the regen queue */
    getRegenQueueItems: Endpoint<"GET", EmptyArgs, EmptyRequest, RegenQueueItem[], EmptyMeta>;
    /** Dump all items in the block processor queue */
    getBlockProcessorQueueItems: Endpoint<"GET", EmptyArgs, EmptyRequest, BlockProcessorQueueItem[], EmptyMeta>;
    /** Dump a summary of the states in the block state cache and checkpoint state cache */
    getStateCacheItems: Endpoint<"GET", EmptyArgs, EmptyRequest, StateCacheItem[], EmptyMeta>;
    /** Dump peer gossip stats by peer */
    getGossipPeerScoreStats: Endpoint<"GET", EmptyArgs, EmptyRequest, GossipPeerScoreStat[], EmptyMeta>;
    /** Dump lodestar score stats by peer */
    getLodestarPeerScoreStats: Endpoint<"GET", EmptyArgs, EmptyRequest, PeerScoreStat[], EmptyMeta>;
    /** Run GC with `global.gc()` */
    runGC: Endpoint<"POST", EmptyArgs, EmptyRequest, EmptyResponseData, EmptyMeta>;
    /** Drop all states in the state cache */
    dropStateCache: Endpoint<"POST", EmptyArgs, EmptyRequest, EmptyResponseData, EmptyMeta>;
    /** Connect to peer at this multiaddress */
    connectPeer: Endpoint<"POST", {
        peerId: string;
        multiaddrs: string[];
    }, {
        query: {
            peerId: string;
            multiaddr: string[];
        };
    }, EmptyResponseData, EmptyMeta>;
    /** Disconnect peer */
    disconnectPeer: Endpoint<"POST", {
        peerId: string;
    }, {
        query: {
            peerId: string;
        };
    }, EmptyResponseData, EmptyMeta>;
    /** Same to node api with new fields */
    getPeers: Endpoint<"GET", FilterGetPeers, {
        query: {
            state?: PeerState[];
            direction?: PeerDirection[];
        };
    }, LodestarNodePeer[], {
        count: number;
    }>;
    /** Returns root/slot of blacklisted blocks */
    getBlacklistedBlocks: Endpoint<"GET", EmptyArgs, EmptyRequest, BlacklistedBlock[], EmptyMeta>;
    /** Returns historical summaries and proof for a given state ID */
    getHistoricalSummaries: Endpoint<"GET", StateArgs, {
        params: {
            state_id: string;
        };
    }, HistoricalSummariesResponse, EmptyMeta>;
    /** Dump Discv5 Kad values */
    discv5GetKadValues: Endpoint<"GET", EmptyArgs, EmptyRequest, string[], EmptyMeta>;
    /**
     * Dump level-db entry keys for a given Bucket declared in code, or for all buckets.
     */
    dumpDbBucketKeys: Endpoint<"GET", {
        /** Must be the string name of a bucket entry: `allForks_blockArchive` */
        bucket: string;
    }, {
        params: {
            bucket: string;
        };
    }, string[], EmptyMeta>;
    /** Return all entries in the StateArchive index with bucket index_stateArchiveRootIndex */
    dumpDbStateIndex: Endpoint<"GET", EmptyArgs, EmptyRequest, {
        root: RootHex;
        slot: Slot;
    }[], EmptyMeta>;
};
export declare function getDefinitions(_config: ChainForkConfig): RouteDefinitions<Endpoints>;
export {};
//# sourceMappingURL=lodestar.d.ts.map