Package Exports
- @chainsafe/eth2.0-state-transition
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@chainsafe/eth2.0-state-transition) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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