@lodestar/api
Version:
A Typescript REST client for the Ethereum Consensus API
105 lines • 4.84 kB
TypeScript
import { ContainerType, Type, ValueOf } from "@chainsafe/ssz";
import { ChainForkConfig } from "@lodestar/config";
import { BeaconState, DataColumnSidecars, 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 { BlockArgs } from "./beacon/block.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<"invalid" | "optimistic" | "valid">;
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>;
/**
* Get data column sidecars
* Retrieves data column sidecars for a given block id.
*/
getDebugDataColumnSidecars: Endpoint<"GET", BlockArgs & {
/**
* Array of indices for data column sidecars to request for in the specified block.
* This endpoint will only return columns that the node is actually custodying.
* If not specified, returns all data column sidecars that this node is custodying in the block.
*/
indices?: number[];
}, {
params: {
block_id: string;
};
query: {
indices?: number[];
};
}, DataColumnSidecars, ExecutionOptimisticFinalizedAndVersionMeta>;
};
export declare function getDefinitions(_config: ChainForkConfig): RouteDefinitions<Endpoints>;
export {};
//# sourceMappingURL=debug.d.ts.map