Socket
Socket
Sign inDemoInstall

@chainsafe/lodestar-types

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-types - npm Package Compare versions

Comparing version 0.11.0 to 0.12.0

lib/ssz/utils/index.d.ts

1

lib/index.d.ts
export * from "./types";
export * from "./ssz";
//# sourceMappingURL=index.d.ts.map

6

lib/index.js

@@ -11,5 +11,6 @@ "use strict";

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _types[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
get: function () {
return _types[key];

@@ -24,5 +25,6 @@ }

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _ssz[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
get: function () {
return _ssz[key];

@@ -29,0 +31,0 @@ }

@@ -6,1 +6,2 @@ export declare const DEPOSIT_CONTRACT_TREE_DEPTH: number;

export declare const P2P_ERROR_MESSAGE_MAX_LENGTH = 256;
//# sourceMappingURL=constants.d.ts.map

@@ -0,10 +1,17 @@

import { ContainerType } from "@chainsafe/ssz";
import { IBeaconSSZTypes } from "../interface";
import { ContainerType } from "@chainsafe/ssz";
export declare const SignedBeaconHeaderResponse: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const SubscribeToCommitteeSubnetPayload: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const ForkResponse: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const AttesterDuty: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const ProposerDuty: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const SyncingStatus: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const Genesis: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const ChainHead: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const BlockEventPayload: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const FinalizedCheckpoint: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const ChainReorg: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const FinalityCheckpoints: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const BeaconCommitteeResponse: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const ValidatorResponse: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const Genesis: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const ValidatorBalance: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
//# sourceMappingURL=api.d.ts.map

@@ -6,6 +6,8 @@ "use strict";

});
exports.Genesis = exports.ValidatorResponse = exports.SyncingStatus = exports.ProposerDuty = exports.AttesterDuty = exports.ForkResponse = exports.SubscribeToCommitteeSubnetPayload = exports.SignedBeaconHeaderResponse = void 0;
exports.ValidatorBalance = exports.ValidatorResponse = exports.BeaconCommitteeResponse = exports.FinalityCheckpoints = exports.ChainReorg = exports.FinalizedCheckpoint = exports.BlockEventPayload = exports.ChainHead = exports.Genesis = exports.SyncingStatus = exports.ProposerDuty = exports.AttesterDuty = exports.SubscribeToCommitteeSubnetPayload = exports.SignedBeaconHeaderResponse = void 0;
var _ssz = require("@chainsafe/ssz");
var _utils = require("../utils");
const SignedBeaconHeaderResponse = ssz => new _ssz.ContainerType({

@@ -32,18 +34,11 @@ fields: {

const ForkResponse = ssz => new _ssz.ContainerType({
fields: {
fork: ssz.Fork,
chainId: ssz.Uint64,
genesisValidatorsRoot: ssz.Root
}
});
exports.ForkResponse = ForkResponse;
const AttesterDuty = ssz => new _ssz.ContainerType({
fields: {
validatorPubkey: ssz.BLSPubkey,
aggregatorModulo: ssz.Number64,
pubkey: ssz.BLSPubkey,
validatorIndex: ssz.ValidatorIndex,
committeeIndex: ssz.CommitteeIndex,
attestationSlot: ssz.Slot
committeeLength: ssz.Number64,
committeesAtSlot: ssz.Number64,
validatorCommitteeIndex: ssz.Number64,
slot: ssz.Slot
}

@@ -57,3 +52,4 @@ });

slot: ssz.Slot,
proposerPubkey: ssz.BLSPubkey
validatorIndex: ssz.ValidatorIndex,
pubkey: ssz.BLSPubkey
}

@@ -73,2 +69,76 @@ });

const Genesis = ssz => new _ssz.ContainerType({
fields: {
genesisValidatorsRoot: ssz.Root,
genesisTime: ssz.Uint64,
genesisForkVersion: ssz.Version
}
});
exports.Genesis = Genesis;
const ChainHead = ssz => new _ssz.ContainerType({
fields: {
slot: ssz.Slot,
block: ssz.Root,
state: ssz.Root,
epochTransition: ssz.Boolean
}
});
exports.ChainHead = ChainHead;
const BlockEventPayload = ssz => new _ssz.ContainerType({
fields: {
slot: ssz.Slot,
block: ssz.Root
}
});
exports.BlockEventPayload = BlockEventPayload;
const FinalizedCheckpoint = ssz => new _ssz.ContainerType({
fields: {
block: ssz.Root,
state: ssz.Root,
epoch: ssz.Epoch
}
});
exports.FinalizedCheckpoint = FinalizedCheckpoint;
const ChainReorg = ssz => new _ssz.ContainerType({
fields: {
slot: ssz.Slot,
depth: ssz.Number64,
oldHeadBlock: ssz.Root,
newHeadBlock: ssz.Root,
oldHeadState: ssz.Root,
newHeadState: ssz.Root,
epoch: ssz.Epoch
}
});
exports.ChainReorg = ChainReorg;
const FinalityCheckpoints = ssz => new _ssz.ContainerType({
fields: {
previousJustified: ssz.Checkpoint,
currentJustified: ssz.Checkpoint,
finalized: ssz.Checkpoint
}
});
exports.FinalityCheckpoints = FinalityCheckpoints;
const BeaconCommitteeResponse = ssz => new _ssz.ContainerType({
fields: {
index: ssz.CommitteeIndex,
slot: ssz.Slot,
validators: ssz.CommitteeIndices
}
});
exports.BeaconCommitteeResponse = BeaconCommitteeResponse;
const ValidatorResponse = ssz => new _ssz.ContainerType({

@@ -78,3 +148,3 @@ fields: {

pubkey: ssz.BLSPubkey,
balance: ssz.Gwei,
status: new _utils.StringType(),
validator: ssz.Validator

@@ -86,11 +156,10 @@ }

const Genesis = ssz => new _ssz.ContainerType({
const ValidatorBalance = ssz => new _ssz.ContainerType({
fields: {
genesisValidatorsRoot: ssz.Root,
genesisTime: ssz.Uint64,
genesisForkVersion: ssz.Version
index: ssz.ValidatorIndex,
balance: ssz.Gwei
}
});
exports.Genesis = Genesis;
exports.ValidatorBalance = ValidatorBalance;
//# sourceMappingURL=api.js.map

@@ -10,1 +10,2 @@ /**

export declare const SignedBeaconBlock: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
//# sourceMappingURL=block.d.ts.map

@@ -7,1 +7,2 @@ /**

export declare function createIBeaconSSZTypes(params: IBeaconParams): IBeaconSSZTypes;
//# sourceMappingURL=index.d.ts.map

@@ -26,3 +26,3 @@ "use strict";

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }

@@ -37,3 +37,3 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

const allGenerators = _objectSpread({}, misc, {}, operations, {}, block, {}, state, {}, validator, {}, wire, {}, api);
const allGenerators = _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, misc), operations), block), state), validator), wire), api);

@@ -40,0 +40,0 @@ function createIBeaconSSZTypes(params) {

@@ -18,2 +18,3 @@ /**

export declare const Eth1Data: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const Eth1DataOrdered: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const HistoricalBlockRoots: (ssz: IBeaconSSZTypes, params: IBeaconParams) => VectorType<import("@chainsafe/ssz").Vector<any>>;

@@ -30,1 +31,2 @@ export declare const HistoricalStateRoots: (ssz: IBeaconSSZTypes, params: IBeaconParams) => VectorType<import("@chainsafe/ssz").Vector<any>>;

export declare const AttestationSubnets: () => BitVectorType;
//# sourceMappingURL=misc.d.ts.map

@@ -6,3 +6,3 @@ "use strict";

});
exports.AttestationSubnets = exports.DepositDataRootList = exports.SigningData = exports.SignedBeaconBlockHeader = exports.BeaconBlockHeader = exports.DepositEvent = exports.DepositData = exports.DepositMessage = exports.HistoricalBatch = exports.HistoricalStateRoots = exports.HistoricalBlockRoots = exports.Eth1Data = exports.PendingAttestation = exports.CommitteeBits = exports.IndexedAttestation = exports.CommitteeIndices = exports.AttestationData = exports.Validator = exports.Checkpoint = exports.ENRForkID = exports.ForkData = exports.Fork = void 0;
exports.AttestationSubnets = exports.DepositDataRootList = exports.SigningData = exports.SignedBeaconBlockHeader = exports.BeaconBlockHeader = exports.DepositEvent = exports.DepositData = exports.DepositMessage = exports.HistoricalBatch = exports.HistoricalStateRoots = exports.HistoricalBlockRoots = exports.Eth1DataOrdered = exports.Eth1Data = exports.PendingAttestation = exports.CommitteeBits = exports.IndexedAttestation = exports.CommitteeIndices = exports.AttestationData = exports.Validator = exports.Checkpoint = exports.ENRForkID = exports.ForkData = exports.Fork = void 0;

@@ -125,2 +125,13 @@ var _ssz = require("@chainsafe/ssz");

const Eth1DataOrdered = ssz => new _ssz.ContainerType({
fields: {
depositRoot: ssz.Root,
depositCount: ssz.Number64,
blockHash: ssz.Bytes32,
blockNumber: ssz.Number64
}
});
exports.Eth1DataOrdered = Eth1DataOrdered;
const HistoricalBlockRoots = (ssz, params) => new _ssz.VectorType({

@@ -176,7 +187,5 @@ elementType: new _ssz.RootType({

fields: {
index: ssz.Number64,
pubkey: ssz.BLSPubkey,
withdrawalCredentials: ssz.Bytes32,
amount: ssz.Gwei,
signature: ssz.BLSSignature
depositData: ssz.DepositData,
blockNumber: ssz.Number64,
index: ssz.Number64
}

@@ -183,0 +192,0 @@ });

@@ -12,1 +12,2 @@ /**

export declare const SignedVoluntaryExit: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
//# sourceMappingURL=operations.d.ts.map

@@ -29,1 +29,2 @@ import { ByteVectorType, BigIntUintType, NumberUintType } from "@chainsafe/ssz";

export declare const Domain: ByteVectorType;
//# sourceMappingURL=primitive.d.ts.map

@@ -9,1 +9,2 @@ /**

export declare const BeaconState: (ssz: IBeaconSSZTypes, params: IBeaconParams) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
//# sourceMappingURL=state.d.ts.map

@@ -9,1 +9,5 @@ /**

export declare const SignedAggregateAndProof: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const SlashingProtectionBlock: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const SlashingProtectionAttestation: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const SlashingProtectionAttestationLowerBound: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
//# sourceMappingURL=validator.d.ts.map

@@ -6,3 +6,3 @@ "use strict";

});
exports.SignedAggregateAndProof = exports.AggregateAndProof = exports.CommitteeAssignment = void 0;
exports.SlashingProtectionAttestationLowerBound = exports.SlashingProtectionAttestation = exports.SlashingProtectionBlock = exports.SignedAggregateAndProof = exports.AggregateAndProof = exports.CommitteeAssignment = void 0;

@@ -42,2 +42,30 @@ var _ssz = require("@chainsafe/ssz");

exports.SignedAggregateAndProof = SignedAggregateAndProof;
const SlashingProtectionBlock = ssz => new _ssz.ContainerType({
fields: {
slot: ssz.Slot,
signingRoot: ssz.Root
}
});
exports.SlashingProtectionBlock = SlashingProtectionBlock;
const SlashingProtectionAttestation = ssz => new _ssz.ContainerType({
fields: {
sourceEpoch: ssz.Epoch,
targetEpoch: ssz.Epoch,
signingRoot: ssz.Root
}
});
exports.SlashingProtectionAttestation = SlashingProtectionAttestation;
const SlashingProtectionAttestationLowerBound = ssz => new _ssz.ContainerType({
fields: {
minSourceEpoch: ssz.Epoch,
minTargetEpoch: ssz.Epoch
}
});
exports.SlashingProtectionAttestationLowerBound = SlashingProtectionAttestationLowerBound;
//# sourceMappingURL=validator.js.map

@@ -13,1 +13,2 @@ /**

export declare const P2pErrorMessage: (ssz: IBeaconSSZTypes) => ListType<import("@chainsafe/ssz").List<any>>;
//# sourceMappingURL=wire.d.ts.map

@@ -7,1 +7,2 @@ /**

export * from "./generators";
//# sourceMappingURL=index.d.ts.map

@@ -11,5 +11,6 @@ "use strict";

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _constants[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
get: function () {
return _constants[key];

@@ -24,5 +25,6 @@ }

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _interface[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
get: function () {
return _interface[key];

@@ -37,5 +39,6 @@ }

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _generators[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
get: function () {
return _generators[key];

@@ -42,0 +45,0 @@ }

@@ -1,2 +0,2 @@

import { BigIntUintType, BitListType, BooleanType, ByteVectorType, ContainerType, List, ListType, NumberUintType, Vector, VectorType, BitVectorType } from "@chainsafe/ssz";
import { BigIntUintType, BitListType, BitVectorType, BooleanType, ByteVectorType, ContainerType, List, ListType, NumberUintType, Vector, VectorType } from "@chainsafe/ssz";
import * as t from "../types";

@@ -39,2 +39,3 @@ export interface IBeaconSSZTypes {

Eth1Data: ContainerType<t.Eth1Data>;
Eth1DataOrdered: ContainerType<t.Eth1DataOrdered>;
HistoricalBlockRoots: VectorType<Vector<t.Root>>;

@@ -68,2 +69,5 @@ HistoricalStateRoots: VectorType<Vector<t.Root>>;

ProposerDuty: ContainerType<t.ProposerDuty>;
SlashingProtectionBlock: ContainerType<t.SlashingProtectionBlock>;
SlashingProtectionAttestation: ContainerType<t.SlashingProtectionAttestation>;
SlashingProtectionAttestationLowerBound: ContainerType<t.SlashingProtectionAttestationLowerBound>;
Status: ContainerType<t.Status>;

@@ -78,6 +82,13 @@ Goodbye: BigIntUintType;

SubscribeToCommitteeSubnetPayload: ContainerType<t.SubscribeToCommitteeSubnetPayload>;
ForkResponse: ContainerType<t.ForkResponse>;
Genesis: ContainerType<t.Genesis>;
ChainHead: ContainerType<t.ChainHead>;
BlockEventPayload: ContainerType<t.BlockEventPayload>;
FinalizedCheckpoint: ContainerType<t.FinalizedCheckpoint>;
ChainReorg: ContainerType<t.ChainReorg>;
FinalityCheckpoints: ContainerType<t.FinalityCheckpoints>;
ValidatorBalance: ContainerType<t.ValidatorBalance>;
ValidatorResponse: ContainerType<t.ValidatorResponse>;
Genesis: ContainerType<t.Genesis>;
BeaconCommitteeResponse: ContainerType<t.BeaconCommitteeResponse>;
}
export declare const typeNames: (keyof IBeaconSSZTypes)[];
//# sourceMappingURL=interface.d.ts.map

@@ -29,10 +29,11 @@ "use strict";

// misc
"Fork", "ForkData", "ENRForkID", "Checkpoint", "Validator", "AttestationData", "CommitteeIndices", "IndexedAttestation", "CommitteeBits", "PendingAttestation", "Eth1Data", "HistoricalBlockRoots", "HistoricalStateRoots", "HistoricalBatch", "DepositMessage", "DepositData", "DepositEvent", "BeaconBlockHeader", "SignedBeaconBlockHeader", "SigningData", "DepositDataRootList", "AttestationSubnets", // operations
"Fork", "ForkData", "ENRForkID", "Checkpoint", "Validator", "AttestationData", "CommitteeIndices", "IndexedAttestation", "CommitteeBits", "PendingAttestation", "Eth1Data", "Eth1DataOrdered", "HistoricalBlockRoots", "HistoricalStateRoots", "HistoricalBatch", "DepositMessage", "DepositData", "DepositEvent", "BeaconBlockHeader", "SignedBeaconBlockHeader", "SigningData", "DepositDataRootList", "AttestationSubnets", // operations
"ProposerSlashing", "AttesterSlashing", "Attestation", "Deposit", "VoluntaryExit", "SignedVoluntaryExit", // block
"BeaconBlockBody", "BeaconBlock", "SignedBeaconBlock", // state
"EpochAttestations", "BeaconState", //validator
"AggregateAndProof", "SignedAggregateAndProof", "CommitteeAssignment", // wire
"AggregateAndProof", "SignedAggregateAndProof", "CommitteeAssignment", // Validator slashing protection
"SlashingProtectionBlock", "SlashingProtectionAttestation", "SlashingProtectionAttestationLowerBound", // wire
"Status", "Goodbye", "Ping", "Metadata", "BeaconBlocksByRangeRequest", "BeaconBlocksByRootRequest", "P2pErrorMessage", //api
"SignedBeaconHeaderResponse", "SubscribeToCommitteeSubnetPayload", "ForkResponse", "SyncingStatus", "AttesterDuty", "ProposerDuty", "ValidatorResponse", "Genesis"];
"SignedBeaconHeaderResponse", "SubscribeToCommitteeSubnetPayload", "SyncingStatus", "AttesterDuty", "ProposerDuty", "Genesis", "ChainHead", "BlockEventPayload", "FinalizedCheckpoint", "ChainReorg", "ValidatorBalance", "ValidatorResponse", "BeaconCommitteeResponse"];
exports.typeNames = typeNames;
//# sourceMappingURL=interface.js.map
import { IBeaconSSZTypes } from "../interface";
export declare const types: IBeaconSSZTypes;
//# sourceMappingURL=mainnet.d.ts.map
import { IBeaconSSZTypes } from "../interface";
export declare const types: IBeaconSSZTypes;
//# sourceMappingURL=minimal.d.ts.map

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

import { BLSPubkey, BLSSignature, CommitteeIndex, Gwei, Number64, Slot, Uint64, ValidatorIndex, Root, Version } from "./primitive";
import { Fork, SignedBeaconBlockHeader, Validator } from "./misc";
import { Checkpoint, SignedBeaconBlockHeader, Validator } from "./misc";
import { BLSPubkey, BLSSignature, CommitteeIndex, Epoch, Gwei, Number64, Root, Slot, Uint64, ValidatorIndex, Version } from "./primitive";
import { List } from "@chainsafe/ssz";
export interface SignedBeaconHeaderResponse {

@@ -14,16 +15,15 @@ root: Root;

}
export interface ForkResponse {
chainId: Uint64;
fork: Fork;
genesisValidatorsRoot: Root;
}
export interface AttesterDuty {
validatorPubkey: BLSPubkey;
aggregatorModulo: Number64;
attestationSlot: Slot;
pubkey: BLSPubkey;
validatorIndex: ValidatorIndex;
committeeIndex: CommitteeIndex;
committeeLength: Number64;
committeesAtSlot: Number64;
validatorCommitteeIndex: Number64;
slot: Slot;
}
export interface ProposerDuty {
slot: Slot;
proposerPubkey: BLSPubkey;
validatorIndex: ValidatorIndex;
pubkey: BLSPubkey;
}

@@ -34,12 +34,66 @@ export interface SyncingStatus {

}
export interface Genesis {
genesisTime: Uint64;
genesisValidatorsRoot: Root;
genesisForkVersion: Version;
}
export interface ChainHead {
slot: Slot;
block: Root;
state: Root;
epochTransition: boolean;
}
export interface BlockEventPayload {
slot: Slot;
block: Root;
}
export interface FinalizedCheckpoint {
block: Root;
state: Root;
epoch: Epoch;
}
export interface ChainReorg {
slot: Slot;
depth: Number64;
oldHeadBlock: Root;
newHeadBlock: Root;
oldHeadState: Root;
newHeadState: Root;
epoch: Epoch;
}
export interface FinalityCheckpoints {
previousJustified: Checkpoint;
currentJustified: Checkpoint;
finalized: Checkpoint;
}
export interface ValidatorBalance {
index: ValidatorIndex;
balance: Gwei;
}
export interface BeaconCommitteeResponse {
index: CommitteeIndex;
slot: Slot;
validators: List<ValidatorIndex>;
}
export declare enum ValidatorStatus {
WAITING_FOR_ELIGIBILITY = "waiting_for_eligibility",
WAITING_FOR_FINALITY = "waiting_for_finality",
WAITING_IN_QUEUE = "waiting_in_queue",
STANDBY_FOR_ACTIVE = "standby_for_active",
ACTIVE = "active",
ACTIVE_AWAITING_VOLUNTARY_EXIT = "active_awaiting_voluntary_exit",
ACTIVE_AWAITING_SLASHED_EXIT = "active_awaiting_slashed_exit",
EXITED_VOLUNTARILY = "exited_voluntarily",
EXITED_SLASHED = "exited_slashed",
WITHDRAWABLE_VOLUNTARILY = "withdrawable_voluntarily",
WITHDRAWABLE_SLASHED = "withdrawable_slashed",
WITHDRAWN_VOLUNTARILY = "withdrawn_voluntarily",
WITHDRAWN_SLASHED = "withdrawn_slashed"
}
export interface ValidatorResponse {
index: ValidatorIndex;
pubkey: BLSPubkey;
balance: Gwei;
status: ValidatorStatus;
validator: Validator;
}
export interface Genesis {
genesisTime: Uint64;
genesisValidatorsRoot: Root;
genesisForkVersion: Version;
}
//# sourceMappingURL=api.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.ValidatorStatus = void 0;
/* eslint-disable @typescript-eslint/interface-name-prefix */
let ValidatorStatus;
exports.ValidatorStatus = ValidatorStatus;
(function (ValidatorStatus) {
ValidatorStatus["WAITING_FOR_ELIGIBILITY"] = "waiting_for_eligibility";
ValidatorStatus["WAITING_FOR_FINALITY"] = "waiting_for_finality";
ValidatorStatus["WAITING_IN_QUEUE"] = "waiting_in_queue";
ValidatorStatus["STANDBY_FOR_ACTIVE"] = "standby_for_active";
ValidatorStatus["ACTIVE"] = "active";
ValidatorStatus["ACTIVE_AWAITING_VOLUNTARY_EXIT"] = "active_awaiting_voluntary_exit";
ValidatorStatus["ACTIVE_AWAITING_SLASHED_EXIT"] = "active_awaiting_slashed_exit";
ValidatorStatus["EXITED_VOLUNTARILY"] = "exited_voluntarily";
ValidatorStatus["EXITED_SLASHED"] = "exited_slashed";
ValidatorStatus["WITHDRAWABLE_VOLUNTARILY"] = "withdrawable_voluntarily";
ValidatorStatus["WITHDRAWABLE_SLASHED"] = "withdrawable_slashed";
ValidatorStatus["WITHDRAWN_VOLUNTARILY"] = "withdrawn_voluntarily";
ValidatorStatus["WITHDRAWN_SLASHED"] = "withdrawn_slashed";
})(ValidatorStatus || (exports.ValidatorStatus = ValidatorStatus = {}));
//# sourceMappingURL=api.js.map

@@ -29,1 +29,2 @@ /**

}
//# sourceMappingURL=block.d.ts.map

@@ -12,1 +12,2 @@ /**

export * from "./api";
//# sourceMappingURL=index.d.ts.map

@@ -11,5 +11,6 @@ "use strict";

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _primitive[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
get: function () {
return _primitive[key];

@@ -24,5 +25,6 @@ }

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _misc[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
get: function () {
return _misc[key];

@@ -37,5 +39,6 @@ }

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _operations[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
get: function () {
return _operations[key];

@@ -50,5 +53,6 @@ }

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _block[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
get: function () {
return _block[key];

@@ -63,5 +67,6 @@ }

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _state[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
get: function () {
return _state[key];

@@ -76,5 +81,6 @@ }

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _validator[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
get: function () {
return _validator[key];

@@ -89,5 +95,6 @@ }

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _wire[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
get: function () {
return _wire[key];

@@ -102,5 +109,6 @@ }

if (key === "default" || key === "__esModule") return;
if (key in exports && exports[key] === _api[key]) return;
Object.defineProperty(exports, key, {
enumerable: true,
get: function get() {
get: function () {
return _api[key];

@@ -107,0 +115,0 @@ }

@@ -57,2 +57,8 @@ /**

}
export interface Eth1DataOrdered {
blockNumber: Number64;
depositRoot: Root;
depositCount: Number64;
blockHash: Bytes32;
}
export interface HistoricalBatch {

@@ -74,8 +80,11 @@ blockRoots: Vector<Root>;

export interface DepositEvent {
depositData: DepositData;
blockNumber: Number64;
index: Number64;
pubkey: BLSPubkey;
withdrawalCredentials: Bytes32;
amount: Gwei;
signature: BLSSignature;
}
export interface Eth1Block {
blockHash: Bytes32;
blockNumber: Number64;
timestamp: Number64;
}
export interface BeaconBlockHeader {

@@ -97,1 +106,2 @@ slot: Slot;

export declare type AttestationSubnets = BitVector;
//# sourceMappingURL=misc.d.ts.map

@@ -32,1 +32,2 @@ /**

}
//# sourceMappingURL=operations.d.ts.map

@@ -31,1 +31,2 @@ /**

export declare type AttestationRootHex = string;
//# sourceMappingURL=primitive.d.ts.map

@@ -30,1 +30,2 @@ /**

}
//# sourceMappingURL=state.d.ts.map

@@ -5,3 +5,3 @@ /**

import { List } from "@chainsafe/ssz";
import { BLSSignature, CommitteeIndex, Slot, ValidatorIndex } from "./primitive";
import { BLSSignature, CommitteeIndex, Epoch, Root, Slot, ValidatorIndex } from "./primitive";
import { Attestation } from "./operations";

@@ -22,1 +22,15 @@ export interface CommitteeAssignment {

}
export interface SlashingProtectionBlock {
slot: Slot;
signingRoot: Root;
}
export interface SlashingProtectionAttestation {
sourceEpoch: Epoch;
targetEpoch: Epoch;
signingRoot: Root;
}
export interface SlashingProtectionAttestationLowerBound {
minSourceEpoch: Epoch;
minTargetEpoch: Epoch;
}
//# sourceMappingURL=validator.d.ts.map

@@ -28,1 +28,2 @@ import { List } from "@chainsafe/ssz";

export declare type P2pErrorMessage = List<Uint8>;
//# sourceMappingURL=wire.d.ts.map

@@ -14,3 +14,3 @@ {

},
"version": "0.11.0",
"version": "0.12.0",
"main": "lib/index.js",

@@ -23,4 +23,4 @@ "files": [

"scripts": {
"build": "yarn build:lib && yarn build:types",
"build:docs": "typedoc --exclude src/index.ts --out docs src",
"build": "concurrently \"yarn build:lib\" \"yarn build:types\"",
"build:typedocs": "typedoc --exclude src/index.ts --out typedocs src",
"build:lib": "babel src -x .ts -d lib --source-maps",

@@ -33,18 +33,12 @@ "build:lib:watch": "yarn run build:lib --watch",

"clean": "rm -rf lib && rm -f tsconfig.tsbuildinfo && rm -f tsconfig.build.tsbuildinfo",
"lint": "eslint --color --ext .ts src/",
"lint:fix": "eslint --color --ext .ts src/ --fix",
"lint": "eslint --color --ext .ts src/ test/",
"lint:fix": "yarn run lint --fix",
"prepublishOnly": "yarn build",
"test:unit": "mocha --colors -r ts-node/register 'test/**/*.test.ts'"
"test:unit": "mocha 'test/**/*.test.ts'"
},
"types": "lib/index.d.ts",
"dependencies": {
"@chainsafe/lodestar-params": "^0.11.0",
"@chainsafe/ssz": "^0.6.11"
"@chainsafe/lodestar-params": "^0.12.0",
"@chainsafe/ssz": "^0.6.13"
},
"devDependencies": {
"@types/chai": "4.2.0",
"@types/mocha": "^5.2.7",
"chai": "^4.2.0",
"mocha": "^6.2.2"
},
"keywords": [

@@ -56,3 +50,3 @@ "ethereum",

],
"gitHead": "d84564bda2f3548a1d7e419c1c621f005a4f1dca"
"gitHead": "5162c9136854c8c0b3816bb7622468ee0f3cc61b"
}
# lodestar-types
[![npm](https://img.shields.io/npm/v/@chainsafe/lodestar-types)](https://www.npmjs.com/package/@chainsafe/lodestar-types)

@@ -8,2 +9,4 @@ [![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

> This package is part of [ChainSafe's Lodestar](https://lodestar.chainsafe.io) project
Typescript and SSZ types for Eth2 datastructures

@@ -50,2 +53,2 @@

Apache-2.0
Apache-2.0 [ChainSafe Systems](https://chainsafe.io)

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

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

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

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