JSPM

@lodestar/state-transition

0.42.0-dev.3320c206fe
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1304
  • Score
    100M100P100Q123890F
  • License Apache-2.0

Beacon Chain state transition function and utils

Package Exports

  • @lodestar/state-transition
  • @lodestar/state-transition/block
  • @lodestar/state-transition/epoch
  • @lodestar/state-transition/slot

Readme

lodestar-state-transition

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

This package is part of ChainSafe's Lodestar project

The beacon state transition and state transition utilities

Usage

import {CachedBeaconStateAllForks, allForks} 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: allForks.SignedBeaconBlock = generateEmptySignedBlock();

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

License

Apache-2.0 ChainSafe Systems