@lodestar/api
Version:
A Typescript REST client for the Ethereum Consensus API
85 lines • 4.06 kB
TypeScript
import { ContainerType, Type, ValueOf } from "@chainsafe/ssz";
import { ChainForkConfig } from "@lodestar/config";
import { BeaconState, StringType } from "@lodestar/types";
import { EmptyArgs, EmptyMeta, EmptyRequest } from "../../utils/codecs.js";
import { ExecutionOptimisticFinalizedAndVersionMeta } from "../../utils/metadata.js";
import { Endpoint, RouteDefinitions } from "../../utils/types.js";
import { StateArgs } from "./beacon/state.js";
declare const ForkChoiceResponseType: ContainerType<{
justifiedCheckpoint: ContainerType<{
epoch: import("@chainsafe/ssz").UintNumberType;
root: import("@chainsafe/ssz").ByteVectorType;
}>;
finalizedCheckpoint: ContainerType<{
epoch: import("@chainsafe/ssz").UintNumberType;
root: import("@chainsafe/ssz").ByteVectorType;
}>;
forkChoiceNodes: import("@chainsafe/ssz").ArrayType<Type<import("@chainsafe/ssz").ValueOfFields<{
slot: import("@chainsafe/ssz").UintNumberType;
blockRoot: StringType<string>;
parentRoot: StringType<string>;
justifiedEpoch: import("@chainsafe/ssz").UintNumberType;
finalizedEpoch: import("@chainsafe/ssz").UintNumberType;
weight: import("@chainsafe/ssz").UintNumberType;
validity: StringType<"valid" | "invalid" | "optimistic">;
executionBlockHash: StringType<string>;
}>>, unknown, unknown>;
}>;
declare const ProtoNodeListType: import("@chainsafe/ssz").ArrayType<Type<import("@chainsafe/ssz").ValueOfFields<{
executionPayloadBlockHash: StringType<string>;
executionPayloadNumber: import("@chainsafe/ssz").UintNumberType;
executionStatus: StringType<string>;
slot: import("@chainsafe/ssz").UintNumberType;
blockRoot: StringType<string>;
parentRoot: StringType<string>;
stateRoot: StringType<string>;
targetRoot: StringType<string>;
timeliness: import("@chainsafe/ssz").BooleanType;
justifiedEpoch: import("@chainsafe/ssz").UintNumberType;
justifiedRoot: StringType<string>;
finalizedEpoch: import("@chainsafe/ssz").UintNumberType;
finalizedRoot: StringType<string>;
unrealizedJustifiedEpoch: import("@chainsafe/ssz").UintNumberType;
unrealizedJustifiedRoot: StringType<string>;
unrealizedFinalizedEpoch: import("@chainsafe/ssz").UintNumberType;
unrealizedFinalizedRoot: StringType<string>;
parent: StringType<string>;
weight: import("@chainsafe/ssz").UintNumberType;
bestChild: StringType<string>;
bestDescendant: StringType<string>;
}>>, unknown, unknown>;
declare const DebugChainHeadListType: import("@chainsafe/ssz").ArrayType<Type<import("@chainsafe/ssz").ValueOfFields<{
slot: import("@chainsafe/ssz").UintNumberType;
root: StringType<string>;
executionOptimistic: import("@chainsafe/ssz").BooleanType;
}>>, unknown, unknown>;
type ProtoNodeList = ValueOf<typeof ProtoNodeListType>;
type DebugChainHeadList = ValueOf<typeof DebugChainHeadListType>;
type ForkChoiceResponse = ValueOf<typeof ForkChoiceResponseType>;
export type Endpoints = {
/**
* Retrieves all possible chain heads (leaves of fork choice tree).
*/
getDebugChainHeadsV2: Endpoint<"GET", EmptyArgs, EmptyRequest, DebugChainHeadList, EmptyMeta>;
/**
* Retrieves all current fork choice context
*/
getDebugForkChoice: Endpoint<"GET", EmptyArgs, EmptyRequest, ForkChoiceResponse, EmptyMeta>;
/**
* Dump all ProtoArray's nodes to debug
*/
getProtoArrayNodes: Endpoint<"GET", EmptyArgs, EmptyRequest, ProtoNodeList, EmptyMeta>;
/**
* Get full BeaconState object
* Returns full BeaconState object for given stateId.
* Depending on `Accept` header it can be returned either as json or as bytes serialized by SSZ
*/
getStateV2: Endpoint<"GET", StateArgs, {
params: {
state_id: string;
};
}, BeaconState, ExecutionOptimisticFinalizedAndVersionMeta>;
};
export declare function getDefinitions(_config: ChainForkConfig): RouteDefinitions<Endpoints>;
export {};
//# sourceMappingURL=debug.d.ts.map