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

@chainsafe/lodestar-types

Package Overview
Dependencies
Maintainers
3
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.9.0 to 0.10.0

2

lib/ssz/constants.d.ts
export declare const DEPOSIT_CONTRACT_TREE_DEPTH: number;
export declare const JUSTIFICATION_BITS_LENGTH = 4;
export declare const ATTESTATION_SUBNET_COUNT = 64;
export declare const MAX_REQUEST_BLOCKS: number;
export declare const P2P_ERROR_MESSAGE_MAX_LENGTH = 256;

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

});
exports.ATTESTATION_SUBNET_COUNT = exports.JUSTIFICATION_BITS_LENGTH = exports.DEPOSIT_CONTRACT_TREE_DEPTH = void 0;
exports.P2P_ERROR_MESSAGE_MAX_LENGTH = exports.MAX_REQUEST_BLOCKS = exports.ATTESTATION_SUBNET_COUNT = exports.JUSTIFICATION_BITS_LENGTH = exports.DEPOSIT_CONTRACT_TREE_DEPTH = void 0;
const DEPOSIT_CONTRACT_TREE_DEPTH = 2 ** 5; // 32

@@ -15,2 +15,7 @@

exports.ATTESTATION_SUBNET_COUNT = ATTESTATION_SUBNET_COUNT;
const MAX_REQUEST_BLOCKS = 2 ** 10; // 1024
exports.MAX_REQUEST_BLOCKS = MAX_REQUEST_BLOCKS;
const P2P_ERROR_MESSAGE_MAX_LENGTH = 256;
exports.P2P_ERROR_MESSAGE_MAX_LENGTH = P2P_ERROR_MESSAGE_MAX_LENGTH;
//# sourceMappingURL=constants.js.map
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>;

@@ -4,0 +5,0 @@ export declare const ForkResponse: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;

19

lib/ssz/generators/api.js

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

});
exports.ValidatorResponse = exports.SyncingStatus = exports.ProposerDuty = exports.AttesterDuty = exports.ForkResponse = exports.SubscribeToCommitteeSubnetPayload = void 0;
exports.ValidatorResponse = exports.SyncingStatus = exports.ProposerDuty = exports.AttesterDuty = exports.ForkResponse = exports.SubscribeToCommitteeSubnetPayload = exports.SignedBeaconHeaderResponse = void 0;
var _ssz = require("@chainsafe/ssz");
const SignedBeaconHeaderResponse = ssz => new _ssz.ContainerType({
fields: {
root: ssz.Root,
canonical: ssz.Boolean,
header: ssz.SignedBeaconBlockHeader
}
});
exports.SignedBeaconHeaderResponse = SignedBeaconHeaderResponse;
const SubscribeToCommitteeSubnetPayload = ssz => new _ssz.ContainerType({

@@ -15,3 +25,3 @@ fields: {

slotSignature: ssz.BLSSignature,
committeeIndex: ssz.CommitteeIndex,
attestationCommitteeIndex: ssz.CommitteeIndex,
aggregatorPubkey: ssz.BLSPubkey

@@ -55,5 +65,4 @@ }

fields: {
startingBlock: ssz.Uint64,
currentBlock: ssz.Uint64,
highestBlock: ssz.Uint64
headSlot: ssz.Uint64,
syncDistance: ssz.Uint64
}

@@ -60,0 +69,0 @@ });

@@ -26,4 +26,4 @@ /**

export declare const SignedBeaconBlockHeader: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const SigningRoot: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const SigningData: (ssz: IBeaconSSZTypes) => ContainerType<import("@chainsafe/ssz").ObjectLike>;
export declare const DepositDataRootList: (ssz: IBeaconSSZTypes) => ListType<import("@chainsafe/ssz").List<any>>;
export declare const AttestationSubnets: () => BitVectorType;

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

});
exports.AttestationSubnets = exports.DepositDataRootList = exports.SigningRoot = 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.Eth1Data = exports.PendingAttestation = exports.CommitteeBits = exports.IndexedAttestation = exports.CommitteeIndices = exports.AttestationData = exports.Validator = exports.Checkpoint = exports.ENRForkID = exports.ForkData = exports.Fork = void 0;

@@ -206,3 +206,3 @@ var _ssz = require("@chainsafe/ssz");

const SigningRoot = ssz => new _ssz.ContainerType({
const SigningData = ssz => new _ssz.ContainerType({
fields: {

@@ -214,3 +214,3 @@ objectRoot: ssz.Root,

exports.SigningRoot = SigningRoot;
exports.SigningData = SigningData;

@@ -217,0 +217,0 @@ const DepositDataRootList = ssz => new _ssz.ListType({

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

export declare const BeaconBlocksByRootRequest: (ssz: IBeaconSSZTypes) => ListType<import("@chainsafe/ssz").List<any>>;
export declare const P2pErrorMessage: (ssz: IBeaconSSZTypes) => ListType<import("@chainsafe/ssz").List<any>>;

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

});
exports.BeaconBlocksByRootRequest = exports.BeaconBlocksByRangeRequest = exports.Metadata = exports.Ping = exports.Goodbye = exports.Status = void 0;
exports.P2pErrorMessage = exports.BeaconBlocksByRootRequest = exports.BeaconBlocksByRangeRequest = exports.Metadata = exports.Ping = exports.Goodbye = exports.Status = void 0;
var _ssz = require("@chainsafe/ssz");
var _ = require("..");
/**

@@ -55,6 +57,13 @@ * @module sszTypes/generators

elementType: ssz.Root,
limit: 32000
limit: _.MAX_REQUEST_BLOCKS
});
exports.BeaconBlocksByRootRequest = BeaconBlocksByRootRequest;
const P2pErrorMessage = ssz => new _ssz.ListType({
elementType: ssz.Uint8,
limit: _.P2P_ERROR_MESSAGE_MAX_LENGTH
});
exports.P2pErrorMessage = P2pErrorMessage;
//# sourceMappingURL=wire.js.map

@@ -47,3 +47,3 @@ import { BigIntUintType, BitListType, BooleanType, ByteVectorType, ContainerType, List, ListType, NumberUintType, Vector, VectorType, BitVectorType } from "@chainsafe/ssz";

SignedBeaconBlockHeader: ContainerType<t.SignedBeaconBlockHeader>;
SigningRoot: ContainerType<t.SigningRoot>;
SigningData: ContainerType<t.SigningData>;
DepositDataRootList: ContainerType<List<t.Root>>;

@@ -74,2 +74,4 @@ AttestationSubnets: BitVectorType;

BeaconBlocksByRootRequest: ContainerType<t.BeaconBlocksByRootRequest>;
P2pErrorMessage: ListType<t.P2pErrorMessage>;
SignedBeaconHeaderResponse: ContainerType<t.SignedBeaconHeaderResponse>;
SubscribeToCommitteeSubnetPayload: ContainerType<t.SubscribeToCommitteeSubnetPayload>;

@@ -76,0 +78,0 @@ ForkResponse: ContainerType<t.ForkResponse>;

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

// misc
"Fork", "ForkData", "ENRForkID", "Checkpoint", "Validator", "AttestationData", "CommitteeIndices", "IndexedAttestation", "CommitteeBits", "PendingAttestation", "Eth1Data", "HistoricalBlockRoots", "HistoricalStateRoots", "HistoricalBatch", "DepositMessage", "DepositData", "DepositEvent", "BeaconBlockHeader", "SignedBeaconBlockHeader", "SigningRoot", "DepositDataRootList", "AttestationSubnets", // operations
"Fork", "ForkData", "ENRForkID", "Checkpoint", "Validator", "AttestationData", "CommitteeIndices", "IndexedAttestation", "CommitteeBits", "PendingAttestation", "Eth1Data", "HistoricalBlockRoots", "HistoricalStateRoots", "HistoricalBatch", "DepositMessage", "DepositData", "DepositEvent", "BeaconBlockHeader", "SignedBeaconBlockHeader", "SigningData", "DepositDataRootList", "AttestationSubnets", // operations
"ProposerSlashing", "AttesterSlashing", "Attestation", "Deposit", "VoluntaryExit", "SignedVoluntaryExit", // block

@@ -35,5 +35,5 @@ "BeaconBlockBody", "BeaconBlock", "SignedBeaconBlock", // state

"AggregateAndProof", "SignedAggregateAndProof", "CommitteeAssignment", // wire
"Status", "Goodbye", "Ping", "Metadata", "BeaconBlocksByRangeRequest", "BeaconBlocksByRootRequest", //api
"SubscribeToCommitteeSubnetPayload", "ForkResponse", "SyncingStatus", "AttesterDuty", "ProposerDuty", "ValidatorResponse"];
"Status", "Goodbye", "Ping", "Metadata", "BeaconBlocksByRangeRequest", "BeaconBlocksByRootRequest", "P2pErrorMessage", //api
"SignedBeaconHeaderResponse", "SubscribeToCommitteeSubnetPayload", "ForkResponse", "SyncingStatus", "AttesterDuty", "ProposerDuty", "ValidatorResponse"];
exports.typeNames = typeNames;
//# sourceMappingURL=interface.js.map
import { BLSPubkey, BLSSignature, CommitteeIndex, Gwei, Number64, Slot, Uint64, ValidatorIndex, Root } from "./primitive";
import { Fork, Validator } from "./misc";
import { Fork, SignedBeaconBlockHeader, Validator } from "./misc";
export interface SignedBeaconHeaderResponse {
root: Root;
canonical: boolean;
header: SignedBeaconBlockHeader;
}
export interface SubscribeToCommitteeSubnetPayload {

@@ -25,5 +30,4 @@ slot: Slot;

export interface SyncingStatus {
startingBlock: Uint64;
currentBlock: Uint64;
highestBlock: Uint64;
headSlot: Uint64;
syncDistance: Uint64;
}

@@ -30,0 +34,0 @@ export interface ValidatorResponse {

@@ -90,3 +90,3 @@ /**

}
export interface SigningRoot {
export interface SigningData {
objectRoot: Root;

@@ -93,0 +93,0 @@ domain: Domain;

import { List } from "@chainsafe/ssz";
import { Slot, Epoch, Root, Number64, Uint64, ForkDigest } from "./primitive";
import { Slot, Epoch, Root, Number64, Uint64, ForkDigest, Uint8 } from "./primitive";
import { SignedBeaconBlock } from "./block";

@@ -7,3 +7,3 @@ import { AttestationSubnets } from "./misc";

export declare type RequestBody = Status | Goodbye | Ping | BeaconBlocksByRangeRequest | BeaconBlocksByRootRequest;
export declare type ResponseBody = Status | Goodbye | Ping | Metadata | SignedBeaconBlock;
export declare type ResponseBody = Status | Goodbye | Ping | Metadata | SignedBeaconBlock | P2pErrorMessage;
export interface Status {

@@ -28,1 +28,2 @@ forkDigest: ForkDigest;

export declare type BeaconBlocksByRootRequest = List<Root>;
export declare type P2pErrorMessage = List<Uint8>;

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

},
"version": "0.9.0",
"version": "0.10.0",
"main": "lib/index.js",

@@ -26,4 +26,6 @@ "files": [

"build:lib": "babel src -x .ts -d lib --source-maps",
"build:lib:watch": "yarn run build:lib --watch",
"build:release": "yarn clean && yarn build",
"build:types": "tsc --incremental --declaration --outDir lib --project tsconfig.build.json --emitDeclarationOnly",
"build:types:watch": "yarn run build:types --watch --preserveWatchOutput",
"check-types": "tsc --noEmit",

@@ -38,4 +40,4 @@ "clean": "rm -rf lib && rm -f tsconfig.tsbuildinfo && rm -f tsconfig.build.tsbuildinfo",

"dependencies": {
"@chainsafe/lodestar-params": "^0.9.0",
"@chainsafe/ssz": "^0.6.5"
"@chainsafe/lodestar-params": "^0.10.0",
"@chainsafe/ssz": "^0.6.9"
},

@@ -54,3 +56,3 @@ "devDependencies": {

],
"gitHead": "a7b4c5ad002f018f0682a627b7c528d5743f6647"
"gitHead": "3f4c0201b01e4526703f157f5b882795287f85c8"
}
# lodestar-types
[![npm](https://img.shields.io/npm/v/@chainsafe/lodestar-types)](https://www.npmjs.com/package/@chainsafe/lodestar-types)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
![ETH2.0_Spec_Version 0.11.1](https://img.shields.io/badge/ETH2.0_Spec_Version-0.11.1-2e86c1.svg)
![ETH2.0_Spec_Version 0.12.1](https://img.shields.io/badge/ETH2.0_Spec_Version-0.12.1-2e86c1.svg)
![ES Version](https://img.shields.io/badge/ES-2020-yellow)
![Node Version](https://img.shields.io/badge/node-12.x-green)
Typescript and SSZ types for Eth2 datastructures

@@ -8,0 +9,0 @@

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