UNPKG

@lodestar/beacon-node

Version:

A Typescript implementation of the beacon chain

24 lines 1.41 kB
import { routes } from "@lodestar/api"; import { CheckpointWithHex, IForkChoice } from "@lodestar/fork-choice"; import { IBeaconStateView, PubkeyCache } 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 getStateResponseWithRegen(chain: IBeaconChain, inStateId: routes.beacon.StateId): Promise<{ state: IBeaconStateView | 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: IBeaconStateView, pubkeyCache: PubkeyCache, 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: IBeaconStateView, pubkeyCache: PubkeyCache): StateValidatorIndexResponse; export {}; //# sourceMappingURL=utils.d.ts.map