Nukem's Possible Manifestation

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

    0.27.0 • Public • Published

    lodestar-beacon-state-transition

    npm License ETH2.0_Spec_Version 1.0.0 ES Version Node Version

    This package is part of ChainSafe's Lodestar project

    The beacon state transition and state transition utilities

    Usage

    import {CachedBeaconState, stateTransition} from "@chainsafe/lodestar-beacon-state-transition/src/allForks";
    import {allForks} from "@chainsafe/lodestar-types";
    import {generateEmptySignedBlock} from "../test/utils/block";
    import {generateState} from "../test/utils/state";
    
    // dummy test state
    const state: CachedBeaconState<allForks.BeaconState> = generateState() as CachedBeaconState<allForks.BeaconState>;
    
    // dummy test block 
    const block: allForks.SignedBeaconBlock = generateEmptySignedBlock();
    
    let postStateContext: allForks.BeaconState;
    try {
      postStateContext = stateTransition(state, block);
    } catch (e) {
      console.log(e);
    }

    License

    Apache-2.0 ChainSafe Systems

    Install

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

    DownloadsWeekly Downloads

    670

    Version

    0.27.0

    License

    Apache-2.0

    Unpacked Size

    758 kB

    Total Files

    320

    Last publish

    Collaborators

    • avatar
    • avatar
    • avatar
    • avatar
    • avatar