import { Type } from "@chainsafe/ssz";
import { BeaconConfig } from "@lodestar/config";
import { ForkName } from "@lodestar/params";
import { Protocol, ProtocolHandler, ReqRespRequest } from "@lodestar/reqresp";
import { LightClientBootstrap, LightClientFinalityUpdate, LightClientOptimisticUpdate, LightClientUpdate, Metadata, Root, SignedBeaconBlock, Status, altair, deneb, fulu, phase0 } from "@lodestar/types";
import { BeaconBlocksByRootRequest, BlobSidecarsByRootRequest, DataColumnSidecarsByRootRequest } from "../../util/types.js";
export type ProtocolNoHandler = Omit<Protocol, "handler">;
/** ReqResp protocol names or methods. Each ReqRespMethod can have multiple versions and encodings */
export declare enum ReqRespMethod {
    Status = "status",
    Goodbye = "goodbye",
    Ping = "ping",
    Metadata = "metadata",
    BeaconBlocksByRange = "beacon_blocks_by_range",
    BeaconBlocksByRoot = "beacon_blocks_by_root",
    BlobSidecarsByRange = "blob_sidecars_by_range",
    BlobSidecarsByRoot = "blob_sidecars_by_root",
    DataColumnSidecarsByRange = "data_column_sidecars_by_range",
    DataColumnSidecarsByRoot = "data_column_sidecars_by_root",
    LightClientBootstrap = "light_client_bootstrap",
    LightClientUpdatesByRange = "light_client_updates_by_range",
    LightClientFinalityUpdate = "light_client_finality_update",
    LightClientOptimisticUpdate = "light_client_optimistic_update"
}
export type RequestBodyByMethod = {
    [ReqRespMethod.Status]: Status;
    [ReqRespMethod.Goodbye]: phase0.Goodbye;
    [ReqRespMethod.Ping]: phase0.Ping;
    [ReqRespMethod.Metadata]: null;
    [ReqRespMethod.BeaconBlocksByRange]: phase0.BeaconBlocksByRangeRequest;
    [ReqRespMethod.BeaconBlocksByRoot]: BeaconBlocksByRootRequest;
    [ReqRespMethod.BlobSidecarsByRange]: deneb.BlobSidecarsByRangeRequest;
    [ReqRespMethod.BlobSidecarsByRoot]: BlobSidecarsByRootRequest;
    [ReqRespMethod.DataColumnSidecarsByRange]: fulu.DataColumnSidecarsByRangeRequest;
    [ReqRespMethod.DataColumnSidecarsByRoot]: DataColumnSidecarsByRootRequest;
    [ReqRespMethod.LightClientBootstrap]: Root;
    [ReqRespMethod.LightClientUpdatesByRange]: altair.LightClientUpdatesByRange;
    [ReqRespMethod.LightClientFinalityUpdate]: null;
    [ReqRespMethod.LightClientOptimisticUpdate]: null;
};
type ResponseBodyByMethod = {
    [ReqRespMethod.Status]: Status;
    [ReqRespMethod.Goodbye]: phase0.Goodbye;
    [ReqRespMethod.Ping]: phase0.Ping;
    [ReqRespMethod.Metadata]: Metadata;
    [ReqRespMethod.BeaconBlocksByRange]: SignedBeaconBlock;
    [ReqRespMethod.BeaconBlocksByRoot]: SignedBeaconBlock;
    [ReqRespMethod.BlobSidecarsByRange]: deneb.BlobSidecar;
    [ReqRespMethod.BlobSidecarsByRoot]: deneb.BlobSidecar;
    [ReqRespMethod.DataColumnSidecarsByRange]: fulu.DataColumnSidecar;
    [ReqRespMethod.DataColumnSidecarsByRoot]: fulu.DataColumnSidecar;
    [ReqRespMethod.LightClientBootstrap]: LightClientBootstrap;
    [ReqRespMethod.LightClientUpdatesByRange]: LightClientUpdate;
    [ReqRespMethod.LightClientFinalityUpdate]: LightClientFinalityUpdate;
    [ReqRespMethod.LightClientOptimisticUpdate]: LightClientOptimisticUpdate;
};
/** Request SSZ type for each method and ForkName */
export declare const requestSszTypeByMethod: (fork: ForkName, config: BeaconConfig) => {
    [K in ReqRespMethod]: RequestBodyByMethod[K] extends null ? null : Type<RequestBodyByMethod[K]>;
};
export type ResponseTypeGetter<T> = (fork: ForkName, version: number) => Type<T>;
export declare const responseSszTypeByMethod: {
    [K in ReqRespMethod]: ResponseTypeGetter<ResponseBodyByMethod[K]>;
};
export type RequestTypedContainer = {
    [K in ReqRespMethod]: {
        method: K;
        body: RequestBodyByMethod[K];
    };
}[ReqRespMethod];
export declare enum Version {
    V1 = 1,
    V2 = 2,
    V3 = 3
}
export type OutgoingRequestArgs = {
    peerId: string;
    method: ReqRespMethod;
    versions: number[];
    requestData: Uint8Array;
};
export type IncomingRequestArgs = {
    method: ReqRespMethod;
    req: ReqRespRequest;
    peerId: string;
    peerClient: string;
};
export type GetReqRespHandlerFn = (method: ReqRespMethod) => ProtocolHandler;
export {};
//# sourceMappingURL=types.d.ts.map