Socket
Book a DemoInstallSign in
Socket

@chainsafe/eth2.0-state-transition

Package Overview
Dependencies
Maintainers
3
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chainsafe/eth2.0-state-transition

Beacon Chain state transition function and utils

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
3
Created
Source

eth2.0-state-transition

npm License

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

Keywords

beacon

FAQs

Package last updated on 18 Feb 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts