Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@chainsafe/lodestar-config

Package Overview
Dependencies
Maintainers
5
Versions
840
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@chainsafe/lodestar-config - npm Package Compare versions

Comparing version 0.38.0-dev.86b95a731d to 0.38.0-dev.97702a2af3

20

lib/forkConfig/index.js

@@ -1,9 +0,20 @@

import { GENESIS_EPOCH, ForkName, SLOTS_PER_EPOCH } from "@chainsafe/lodestar-params";
import { GENESIS_EPOCH, ForkName, SLOTS_PER_EPOCH, ForkSeq } from "@chainsafe/lodestar-params";
import { ssz } from "@chainsafe/lodestar-types";
export * from "./types.js";
export function createIForkConfig(config) {
const phase0 = { name: ForkName.phase0, epoch: GENESIS_EPOCH, version: config.GENESIS_FORK_VERSION };
const altair = { name: ForkName.altair, epoch: config.ALTAIR_FORK_EPOCH, version: config.ALTAIR_FORK_VERSION };
const phase0 = {
name: ForkName.phase0,
seq: ForkSeq.phase0,
epoch: GENESIS_EPOCH,
version: config.GENESIS_FORK_VERSION,
};
const altair = {
name: ForkName.altair,
seq: ForkSeq.altair,
epoch: config.ALTAIR_FORK_EPOCH,
version: config.ALTAIR_FORK_VERSION,
};
const bellatrix = {
name: ForkName.bellatrix,
seq: ForkSeq.bellatrix,
epoch: config.BELLATRIX_FORK_EPOCH,

@@ -35,2 +46,5 @@ version: config.BELLATRIX_FORK_VERSION,

},
getForkSeq(slot) {
return this.getForkInfo(slot).seq;
},
getForkVersion(slot) {

@@ -37,0 +51,0 @@ return this.getForkInfo(slot).version;

5

lib/forkConfig/types.d.ts

@@ -1,5 +0,6 @@

import { ForkName } from "@chainsafe/lodestar-params";
import { ForkName, ForkSeq } from "@chainsafe/lodestar-params";
import { allForks, Epoch, Slot, Version } from "@chainsafe/lodestar-types";
export interface IForkInfo {
name: ForkName;
seq: ForkSeq;
epoch: Epoch;

@@ -22,2 +23,4 @@ version: Version;

getForkName(slot: Slot): ForkName;
/** Get the hard-fork sequence number at a given slot */
getForkSeq(slot: Slot): ForkSeq;
/** Get the hard-fork version at a given slot */

@@ -24,0 +27,0 @@ getForkVersion(slot: Slot): Version;

{
"name": "@chainsafe/lodestar-config",
"version": "0.38.0-dev.86b95a731d",
"version": "0.38.0-dev.97702a2af3",
"description": "Chain configuration required for lodestar",

@@ -69,7 +69,7 @@ "author": "ChainSafe Systems",

"dependencies": {
"@chainsafe/lodestar-params": "0.38.0-dev.86b95a731d",
"@chainsafe/lodestar-types": "0.38.0-dev.86b95a731d",
"@chainsafe/lodestar-params": "0.38.0-dev.97702a2af3",
"@chainsafe/lodestar-types": "0.38.0-dev.97702a2af3",
"@chainsafe/ssz": "^0.9.2"
},
"gitHead": "bb20e1e7f742211d658807d76948503b4621bb5c"
"gitHead": "0b7c94926785c7cea4e1467583ad8fcc965c2081"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc