UNPKG

@lodestar/beacon-node

Version:

A Typescript implementation of the beacon chain

30 lines 1.68 kB
import { PubkeyIndexMap } from "@chainsafe/pubkey-index-map"; import { routes } from "@lodestar/api"; import { CheckpointWithHex, IForkChoice } from "@lodestar/fork-choice"; import { BeaconStateAllForks } from "@lodestar/state-transition"; import { BLSPubkey, Epoch, RootHex, Slot, ValidatorIndex, phase0 } from "@lodestar/types"; import { IBeaconChain } from "../../../../chain/index.js"; export declare function resolveStateId(forkChoice: IForkChoice, stateId: routes.beacon.StateId): RootHex | Slot | CheckpointWithHex; export declare function getStateResponse(chain: IBeaconChain, inStateId: routes.beacon.StateId): Promise<{ state: BeaconStateAllForks; executionOptimistic: boolean; finalized: boolean; }>; export declare function getStateResponseWithRegen(chain: IBeaconChain, inStateId: routes.beacon.StateId): Promise<{ state: BeaconStateAllForks | Uint8Array; executionOptimistic: boolean; finalized: boolean; }>; export declare function toValidatorResponse(index: ValidatorIndex, validator: phase0.Validator, balance: number, currentEpoch: Epoch): routes.beacon.ValidatorResponse; export declare function filterStateValidatorsByStatus(statuses: string[], state: BeaconStateAllForks, pubkey2index: PubkeyIndexMap, currentEpoch: Epoch): routes.beacon.ValidatorResponse[]; type StateValidatorIndexResponse = { valid: true; validatorIndex: ValidatorIndex; } | { valid: false; code: number; reason: string; }; export declare function getStateValidatorIndex(id: routes.beacon.ValidatorId | BLSPubkey, state: BeaconStateAllForks, pubkey2index: PubkeyIndexMap): StateValidatorIndexResponse; export {}; //# sourceMappingURL=utils.d.ts.map