This package is part of ChainSafe's Lodestar project
The beacon state transition and state transition utilities
import {CachedBeaconStateAllForks, stateTransition} from "@lodestar/state-transition";
import {generateEmptySignedBlock} from "../test/utils/block";
import {generateState} from "../test/utils/state";
// dummy test state
const preState: CachedBeaconStateAllForks = generateState() as CachedBeaconStateAllForks;
// dummy test block
const block = generateEmptySignedBlock();
// Run state transition on block
const postState = stateTransition(preState, block);
Apache-2.0 ChainSafe Systems