@lodestar/api
Version:
A Typescript REST client for the Ethereum Consensus API
41 lines • 2.62 kB
TypeScript
import { ContainerType, ValueOf } from "@chainsafe/ssz";
import { ChainForkConfig, SpecJson } from "@lodestar/config";
import { EmptyArgs, EmptyMeta, EmptyRequest } from "../../utils/codecs.js";
import { Endpoint, RouteDefinitions } from "../../utils/index.js";
export declare const DepositContractType: ContainerType<{
chainId: import("@chainsafe/ssz").UintNumberType;
address: import("@lodestar/types").ExecutionAddressType;
}>;
export declare const ForkListType: import("@chainsafe/ssz").ArrayType<import("@chainsafe/ssz").Type<import("@chainsafe/ssz").ValueOfFields<{
previousVersion: import("@chainsafe/ssz").ByteVectorType;
currentVersion: import("@chainsafe/ssz").ByteVectorType;
epoch: import("@chainsafe/ssz").UintNumberType;
}>>, unknown, unknown>;
export type DepositContract = ValueOf<typeof DepositContractType>;
export type ForkList = ValueOf<typeof ForkListType>;
export type Spec = SpecJson;
export type Endpoints = {
/**
* Get deposit contract address.
* Retrieve Eth1 deposit contract address and chain ID.
*/
getDepositContract: Endpoint<"GET", EmptyArgs, EmptyRequest, DepositContract, EmptyMeta>;
/**
* Get scheduled upcoming forks.
* Retrieve all scheduled upcoming forks this node is aware of.
*/
getForkSchedule: Endpoint<"GET", EmptyArgs, EmptyRequest, ForkList, EmptyMeta>;
/**
* Retrieve specification configuration used on this node. The configuration should include:
* - Constants for all hard forks known by the beacon node, for example the [phase 0](https://github.com/ethereum/consensus-specs/blob/v1.1.10/specs/phase0/beacon-chain.md#constants) and [altair](https://github.com/ethereum/consensus-specs/blob/v1.1.10/specs/altair/beacon-chain.md#constants) values
* - Presets for all hard forks supplied to the beacon node, for example the [phase 0](https://github.com/ethereum/consensus-specs/blob/v1.1.10/presets/mainnet/phase0.yaml) and [altair](https://github.com/ethereum/consensus-specs/blob/v1.1.10/presets/mainnet/altair.yaml) values
* - Configuration for the beacon node, for example the [mainnet](https://github.com/ethereum/consensus-specs/blob/v1.1.10/configs/mainnet.yaml) values
*
* Values are returned with following format:
* - any value starting with 0x in the spec is returned as a hex string
* - numeric values are returned as a quoted integer
*/
getSpec: Endpoint<"GET", EmptyArgs, EmptyRequest, Spec, EmptyMeta>;
};
export declare function getDefinitions(_config: ChainForkConfig): RouteDefinitions<Endpoints>;
//# sourceMappingURL=config.d.ts.map