@chainsafe/lodestar-config
Advanced tools
Comparing version 0.38.0 to 0.39.0-dev.2deb6a20fd
@@ -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; |
@@ -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", | ||
"version": "0.39.0-dev.2deb6a20fd", | ||
"description": "Chain configuration required for lodestar", | ||
@@ -69,7 +69,7 @@ "author": "ChainSafe Systems", | ||
"dependencies": { | ||
"@chainsafe/lodestar-params": "^0.38.0", | ||
"@chainsafe/lodestar-types": "^0.38.0", | ||
"@chainsafe/lodestar-params": "0.39.0-dev.2deb6a20fd", | ||
"@chainsafe/lodestar-types": "0.39.0-dev.2deb6a20fd", | ||
"@chainsafe/ssz": "^0.9.2" | ||
}, | ||
"gitHead": "c7cf92e9e39ce4cb13ff7d750e18eff7d4d05de5" | ||
"gitHead": "ff1686d8af67884dc79b7d13e79c0ea51c6858b7" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
66008
716
+ Added@chainsafe/lodestar-params@0.39.0-dev.2deb6a20fd(transitive)
+ Added@chainsafe/lodestar-types@0.39.0-dev.2deb6a20fd(transitive)
- Removed@chainsafe/lodestar-params@0.38.1(transitive)
- Removed@chainsafe/lodestar-types@0.38.1(transitive)