Skip to content

Files

state-transition

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 16, 2025
Jul 6, 2022
Mar 16, 2025
Aug 19, 2024
Apr 24, 2024
Mar 16, 2025
Jul 6, 2022
Mar 13, 2025
Feb 27, 2025

lodestar-state-transition

npm License Eth Consensus Spec v1.4.0 ES Version Node Version

This package is part of ChainSafe's Lodestar project

The beacon state transition and state transition utilities

Usage

import {CachedBeaconStateAllForks, stateTransition} from "@lodestar/state-transition";
import {ssz} from "@lodestar/types";
import {generateState} from "../test/utils/state";

// dummy test state
const preState: CachedBeaconStateAllForks = generateState() as CachedBeaconStateAllForks;

// dummy test block
const block = ssz.phase0.SignedBeaconBlock.defaultValue();

// Run state transition on block
const postState = stateTransition(preState, block);

License

Apache-2.0 ChainSafe Systems