@chainsafe/lodestar-beacon-state-transition
TypeScript icon, indicating that this package has built-in type declarations

0.39.0 • Public • Published

lodestar-beacon-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 "@chainsafe/lodestar-beacon-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

Package Sidebar

Install

npm i @chainsafe/lodestar-beacon-state-transition

Weekly Downloads

2,747

Version

0.39.0

License

Apache-2.0

Unpacked Size

457 kB

Total Files

252

Last publish

Collaborators

  • sadiq1971
  • ansermino
  • gregthegreek
  • priom
  • wemeetagain
  • mpetrunic