@chainsafe/eth2.0-state-transition
v0.2.1
Published
Beacon Chain state transition function and utils
Downloads
9
Readme
eth2.0-state-transition
The beacon state transition and state transition utilities
Usage
import {stateTransition} from "@chainsafe/eth2.0-state-transition";
import {BeaconBlock, BeaconState} from "@chainsafe/eth2.0-types";
import {config as mainnetConfig} from "@chainsafe/eth2.0-config/lib/presets/mainnet";
const state: BeaconState = {
...
};
const block: BeaconBlock = {
...
};
let postState: BeaconState;
try {
postState = stateTransition(mainnetConfig, state, block);
} catch (e) {
console.log(e);
}
License
Apache-2.0