Socket
Socket
Sign inDemoInstall

@chainsafe/lodestar-config

Package Overview
Dependencies
Maintainers
4
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.16.0 to 0.17.0

28

lib/index.js

@@ -28,7 +28,33 @@ "use strict";

function createIBeaconConfig(params) {
const types = (0, _lodestarTypes.createIBeaconSSZTypes)(params);
return {
params,
types: (0, _lodestarTypes.createIBeaconSSZTypes)(params)
types,
getForkName(slot) {
if (slot < params.LIGHTCLIENT_PATCH_FORK_SLOT) {
return "phase0";
} else if (slot < params.PHASE_1_FORK_SLOT) {
return "lightclient";
} else {
return "phase1";
}
},
getForkVersion(slot) {
if (slot < params.LIGHTCLIENT_PATCH_FORK_SLOT) {
return params.GENESIS_FORK_VERSION;
} else if (slot < params.PHASE_1_FORK_SLOT) {
return params.LIGHTCLIENT_PATCH_FORK_VERSION;
} else {
return params.PHASE_1_FORK_VERSION;
}
},
getTypes(slot) {
return types[this.getForkName(slot)];
}
};
}
//# sourceMappingURL=index.js.map
import { IBeaconParams } from "@chainsafe/lodestar-params";
import { IBeaconSSZTypes } from "@chainsafe/lodestar-types";
import { IBeaconSSZTypes, ILightclientSSZTypes, IPhase0SSZTypes, IPhase1SSZTypes, Slot, Version } from "@chainsafe/lodestar-types";
export declare type IForkName = "phase0" | "lightclient" | "phase1";
export interface IBeaconConfig {
params: IBeaconParams;
types: IBeaconSSZTypes;
/**
* Get the hard-fork name at a given slot
*/
getForkName(slot: Slot): IForkName;
/**
* Get the hard-fork version at a given slot
*/
getForkVersion(slot: Slot): Version;
/**
* Get SSZ types by hard-fork
*/
getTypes(slot: Slot): IPhase0SSZTypes | ILightclientSSZTypes | IPhase1SSZTypes;
}
//# sourceMappingURL=interface.d.ts.map

5

lib/presets/mainnet.d.ts

@@ -1,4 +0,3 @@

import { IBeaconConfig } from "../interface";
export declare const config: IBeaconConfig;
export declare const mainnetConfig: IBeaconConfig;
export declare const config: import("..").IBeaconConfig;
export declare const mainnetConfig: import("..").IBeaconConfig;
//# sourceMappingURL=mainnet.d.ts.map

@@ -10,8 +10,5 @@ "use strict";

var _mainnet2 = require("@chainsafe/lodestar-types/lib/ssz/presets/mainnet");
var _ = require("../");
const config = {
params: _mainnet.params,
types: _mainnet2.types
};
const config = (0, _.createIBeaconConfig)(_mainnet.params);
exports.config = config;

@@ -18,0 +15,0 @@ const mainnetConfig = config;

@@ -1,4 +0,3 @@

import { IBeaconConfig } from "../interface";
export declare const config: IBeaconConfig;
export declare const minimalConfig: IBeaconConfig;
export declare const config: import("..").IBeaconConfig;
export declare const minimalConfig: import("..").IBeaconConfig;
//# sourceMappingURL=minimal.d.ts.map

@@ -10,8 +10,5 @@ "use strict";

var _minimal2 = require("@chainsafe/lodestar-types/lib/ssz/presets/minimal");
var _ = require("../");
const config = {
params: _minimal.params,
types: _minimal2.types
};
const config = (0, _.createIBeaconConfig)(_minimal.params);
exports.config = config;

@@ -18,0 +15,0 @@ const minimalConfig = config;

{
"name": "@chainsafe/lodestar-config",
"version": "0.16.0",
"version": "0.17.0",
"description": "Chain configuration required for lodestar",

@@ -46,6 +46,6 @@ "author": "ChainSafe Systems",

"dependencies": {
"@chainsafe/lodestar-params": "^0.16.0",
"@chainsafe/lodestar-types": "^0.16.0"
"@chainsafe/lodestar-params": "^0.17.0",
"@chainsafe/lodestar-types": "^0.17.0"
},
"gitHead": "fe7e44bd008601b71972bee9d50b87246ac943d7"
"gitHead": "083db35cb33eb46e5e4ea6d647dccbfc0854a1b2"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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