@lodestar/types 1.35.0-dev.98d359db41 → 1.35.0-dev.a70bac5bd3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/altair/index.js.map +1 -1
- package/lib/bellatrix/index.js.map +1 -1
- package/lib/bellatrix/sszTypes.d.ts +14 -14
- package/lib/capella/index.js.map +1 -1
- package/lib/capella/sszTypes.d.ts +38 -38
- package/lib/deneb/index.js.map +1 -1
- package/lib/deneb/sszTypes.d.ts +41 -41
- package/lib/electra/index.js.map +1 -1
- package/lib/electra/sszTypes.d.ts +64 -64
- package/lib/fulu/index.js.map +1 -1
- package/lib/fulu/sszTypes.d.ts +21 -21
- package/lib/fulu/sszTypes.js.map +1 -1
- package/lib/gloas/index.js.map +1 -1
- package/lib/gloas/sszTypes.d.ts +11 -11
- package/lib/index.d.ts +3 -4
- package/lib/index.js +4 -5
- package/lib/index.js.map +1 -1
- package/lib/phase0/index.d.ts +0 -1
- package/lib/phase0/index.js +0 -1
- package/lib/phase0/index.js.map +1 -1
- package/lib/sszTypes.d.ts +658 -658
- package/lib/types.d.ts +2 -2
- package/lib/types.js +2 -2
- package/lib/types.js.map +1 -1
- package/lib/utils/container.js.map +1 -1
- package/lib/utils/executionAddress.js +1 -1
- package/lib/utils/executionAddress.js.map +1 -1
- package/lib/utils/stringType.js +8 -5
- package/lib/utils/stringType.js.map +1 -1
- package/package.json +8 -17
- package/lib/altair/index.d.ts.map +0 -1
- package/lib/altair/sszTypes.d.ts.map +0 -1
- package/lib/altair/types.d.ts.map +0 -1
- package/lib/bellatrix/index.d.ts.map +0 -1
- package/lib/bellatrix/sszTypes.d.ts.map +0 -1
- package/lib/bellatrix/types.d.ts.map +0 -1
- package/lib/capella/index.d.ts.map +0 -1
- package/lib/capella/sszTypes.d.ts.map +0 -1
- package/lib/capella/types.d.ts.map +0 -1
- package/lib/deneb/index.d.ts.map +0 -1
- package/lib/deneb/sszTypes.d.ts.map +0 -1
- package/lib/deneb/types.d.ts.map +0 -1
- package/lib/electra/index.d.ts.map +0 -1
- package/lib/electra/sszTypes.d.ts.map +0 -1
- package/lib/electra/types.d.ts.map +0 -1
- package/lib/fulu/index.d.ts.map +0 -1
- package/lib/fulu/sszTypes.d.ts.map +0 -1
- package/lib/fulu/types.d.ts.map +0 -1
- package/lib/gloas/index.d.ts.map +0 -1
- package/lib/gloas/sszTypes.d.ts.map +0 -1
- package/lib/gloas/types.d.ts.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/phase0/index.d.ts.map +0 -1
- package/lib/phase0/sszTypes.d.ts.map +0 -1
- package/lib/phase0/types.d.ts.map +0 -1
- package/lib/phase0/validator.d.ts.map +0 -1
- package/lib/primitive/index.d.ts.map +0 -1
- package/lib/primitive/sszTypes.d.ts.map +0 -1
- package/lib/primitive/types.d.ts.map +0 -1
- package/lib/sszTypes.d.ts.map +0 -1
- package/lib/types.d.ts.map +0 -1
- package/lib/utils/container.d.ts.map +0 -1
- package/lib/utils/executionAddress.d.ts.map +0 -1
- package/lib/utils/stringType.d.ts.map +0 -1
- package/lib/utils/typeguards.d.ts.map +0 -1
- package/lib/utils/validatorStatus.d.ts.map +0 -1
- package/src/altair/index.ts +0 -5
- package/src/altair/sszTypes.ts +0 -243
- package/src/altair/types.ts +0 -24
- package/src/bellatrix/index.ts +0 -5
- package/src/bellatrix/sszTypes.ts +0 -238
- package/src/bellatrix/types.ts +0 -24
- package/src/capella/index.ts +0 -5
- package/src/capella/sszTypes.ts +0 -281
- package/src/capella/types.ts +0 -33
- package/src/deneb/index.ts +0 -5
- package/src/deneb/sszTypes.ts +0 -329
- package/src/deneb/types.ts +0 -55
- package/src/electra/index.ts +0 -5
- package/src/electra/sszTypes.ts +0 -451
- package/src/electra/types.ts +0 -54
- package/src/fulu/index.ts +0 -5
- package/src/fulu/sszTypes.ts +0 -138
- package/src/fulu/types.ts +0 -31
- package/src/gloas/index.ts +0 -5
- package/src/gloas/sszTypes.ts +0 -5
- package/src/gloas/types.ts +0 -6
- package/src/index.ts +0 -15
- package/src/phase0/index.ts +0 -6
- package/src/phase0/sszTypes.ts +0 -514
- package/src/phase0/types.ts +0 -46
- package/src/phase0/validator.ts +0 -78
- package/src/primitive/index.ts +0 -3
- package/src/primitive/sszTypes.ts +0 -70
- package/src/primitive/types.ts +0 -53
- package/src/sszTypes.ts +0 -86
- package/src/types.ts +0 -375
- package/src/utils/container.ts +0 -38
- package/src/utils/executionAddress.ts +0 -48
- package/src/utils/stringType.ts +0 -58
- package/src/utils/typeguards.ts +0 -98
- package/src/utils/validatorStatus.ts +0 -52
package/src/fulu/sszTypes.ts
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ByteVectorType,
|
|
3
|
-
ContainerType,
|
|
4
|
-
ListBasicType,
|
|
5
|
-
ListCompositeType,
|
|
6
|
-
VectorBasicType,
|
|
7
|
-
VectorCompositeType,
|
|
8
|
-
} from "@chainsafe/ssz";
|
|
9
|
-
import {
|
|
10
|
-
BYTES_PER_FIELD_ELEMENT,
|
|
11
|
-
FIELD_ELEMENTS_PER_CELL,
|
|
12
|
-
FIELD_ELEMENTS_PER_EXT_BLOB,
|
|
13
|
-
KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH,
|
|
14
|
-
MAX_BLOB_COMMITMENTS_PER_BLOCK,
|
|
15
|
-
MIN_SEED_LOOKAHEAD,
|
|
16
|
-
NUMBER_OF_COLUMNS,
|
|
17
|
-
SLOTS_PER_EPOCH,
|
|
18
|
-
} from "@lodestar/params";
|
|
19
|
-
import {ssz as altairSsz} from "../altair/index.js";
|
|
20
|
-
import {ssz as denebSsz} from "../deneb/index.js";
|
|
21
|
-
import {ssz as electraSsz} from "../electra/index.js";
|
|
22
|
-
import {ssz as phase0Ssz} from "../phase0/index.js";
|
|
23
|
-
import {ssz as primitiveSsz} from "../primitive/index.js";
|
|
24
|
-
|
|
25
|
-
const {Root, ColumnIndex, RowIndex, Bytes32, Slot, UintNum64, ValidatorIndex} = primitiveSsz;
|
|
26
|
-
|
|
27
|
-
export const KZGProof = denebSsz.KZGProof;
|
|
28
|
-
export const Blob = denebSsz.Blob;
|
|
29
|
-
|
|
30
|
-
export const Metadata = new ContainerType(
|
|
31
|
-
{
|
|
32
|
-
...altairSsz.Metadata.fields,
|
|
33
|
-
custodyGroupCount: UintNum64,
|
|
34
|
-
},
|
|
35
|
-
{typeName: "Metadata", jsonCase: "eth2"}
|
|
36
|
-
);
|
|
37
|
-
export const Status = new ContainerType(
|
|
38
|
-
{
|
|
39
|
-
...phase0Ssz.Status.fields,
|
|
40
|
-
earliestAvailableSlot: Slot,
|
|
41
|
-
},
|
|
42
|
-
{typeName: "Status", jsonCase: "eth2"}
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
export const Cell = new ByteVectorType(BYTES_PER_FIELD_ELEMENT * FIELD_ELEMENTS_PER_CELL);
|
|
46
|
-
export const DataColumn = new ListCompositeType(Cell, MAX_BLOB_COMMITMENTS_PER_BLOCK);
|
|
47
|
-
export const DataColumns = new ListCompositeType(DataColumn, NUMBER_OF_COLUMNS);
|
|
48
|
-
export const ExtendedMatrix = new ListCompositeType(Cell, MAX_BLOB_COMMITMENTS_PER_BLOCK * NUMBER_OF_COLUMNS);
|
|
49
|
-
export const KzgCommitmentsInclusionProof = new VectorCompositeType(Bytes32, KZG_COMMITMENTS_INCLUSION_PROOF_DEPTH);
|
|
50
|
-
export const KZGProofs = new ListCompositeType(
|
|
51
|
-
denebSsz.KZGProof,
|
|
52
|
-
FIELD_ELEMENTS_PER_EXT_BLOB * MAX_BLOB_COMMITMENTS_PER_BLOCK
|
|
53
|
-
);
|
|
54
|
-
export const ProposerLookahead = new VectorBasicType(ValidatorIndex, (MIN_SEED_LOOKAHEAD + 1) * SLOTS_PER_EPOCH);
|
|
55
|
-
|
|
56
|
-
export const DataColumnSidecar = new ContainerType(
|
|
57
|
-
{
|
|
58
|
-
index: ColumnIndex,
|
|
59
|
-
column: DataColumn,
|
|
60
|
-
kzgCommitments: denebSsz.BlobKzgCommitments,
|
|
61
|
-
kzgProofs: denebSsz.KZGProofs,
|
|
62
|
-
signedBlockHeader: phase0Ssz.SignedBeaconBlockHeader,
|
|
63
|
-
kzgCommitmentsInclusionProof: KzgCommitmentsInclusionProof,
|
|
64
|
-
},
|
|
65
|
-
{typeName: "DataColumnSidecar", jsonCase: "eth2"}
|
|
66
|
-
);
|
|
67
|
-
|
|
68
|
-
export const DataColumnSidecars = new ListCompositeType(DataColumnSidecar, NUMBER_OF_COLUMNS);
|
|
69
|
-
|
|
70
|
-
export const MatrixEntry = new ContainerType(
|
|
71
|
-
{
|
|
72
|
-
cell: Cell,
|
|
73
|
-
kzgProof: denebSsz.KZGProof,
|
|
74
|
-
columnIndex: ColumnIndex,
|
|
75
|
-
rowIndex: RowIndex,
|
|
76
|
-
},
|
|
77
|
-
{typeName: "MatrixEntry", jsonCase: "eth2"}
|
|
78
|
-
);
|
|
79
|
-
|
|
80
|
-
// ReqResp types
|
|
81
|
-
// =============
|
|
82
|
-
|
|
83
|
-
export const DataColumnsByRootIdentifier = new ContainerType(
|
|
84
|
-
{
|
|
85
|
-
blockRoot: Root,
|
|
86
|
-
columns: new ListBasicType(ColumnIndex, NUMBER_OF_COLUMNS),
|
|
87
|
-
},
|
|
88
|
-
{typeName: "DataColumnsByRootIdentifier", jsonCase: "eth2"}
|
|
89
|
-
);
|
|
90
|
-
|
|
91
|
-
export const DataColumnSidecarsByRangeRequest = new ContainerType(
|
|
92
|
-
{
|
|
93
|
-
startSlot: Slot,
|
|
94
|
-
count: UintNum64,
|
|
95
|
-
columns: new ListBasicType(ColumnIndex, NUMBER_OF_COLUMNS),
|
|
96
|
-
},
|
|
97
|
-
{typeName: "DataColumnSidecarsByRangeRequest", jsonCase: "eth2"}
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
// Explicit aliases for a few common types
|
|
101
|
-
export const BeaconBlock = electraSsz.BeaconBlock;
|
|
102
|
-
export const SignedBeaconBlock = electraSsz.SignedBeaconBlock;
|
|
103
|
-
|
|
104
|
-
// Containers
|
|
105
|
-
export const BlobsBundle = new ContainerType(
|
|
106
|
-
{
|
|
107
|
-
commitments: denebSsz.BlobKzgCommitments,
|
|
108
|
-
proofs: KZGProofs,
|
|
109
|
-
blobs: denebSsz.Blobs,
|
|
110
|
-
},
|
|
111
|
-
{typeName: "BlobsBundle", jsonCase: "eth2"}
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
export const BeaconState = new ContainerType(
|
|
115
|
-
{
|
|
116
|
-
...electraSsz.BeaconState.fields,
|
|
117
|
-
proposerLookahead: ProposerLookahead, // New in FULU:EIP7917
|
|
118
|
-
},
|
|
119
|
-
{typeName: "BeaconState", jsonCase: "eth2"}
|
|
120
|
-
);
|
|
121
|
-
|
|
122
|
-
export const BlockContents = new ContainerType(
|
|
123
|
-
{
|
|
124
|
-
block: electraSsz.BeaconBlock,
|
|
125
|
-
kzgProofs: KZGProofs,
|
|
126
|
-
blobs: denebSsz.Blobs,
|
|
127
|
-
},
|
|
128
|
-
{typeName: "BlockContents", jsonCase: "eth2"}
|
|
129
|
-
);
|
|
130
|
-
|
|
131
|
-
export const SignedBlockContents = new ContainerType(
|
|
132
|
-
{
|
|
133
|
-
signedBlock: electraSsz.SignedBeaconBlock,
|
|
134
|
-
kzgProofs: KZGProofs,
|
|
135
|
-
blobs: denebSsz.Blobs,
|
|
136
|
-
},
|
|
137
|
-
{typeName: "SignedBlockContents", jsonCase: "eth2"}
|
|
138
|
-
);
|
package/src/fulu/types.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import {ValueOf} from "@chainsafe/ssz";
|
|
2
|
-
import * as ssz from "./sszTypes.js";
|
|
3
|
-
|
|
4
|
-
export type KZGProof = ValueOf<typeof ssz.KZGProof>;
|
|
5
|
-
export type Blob = ValueOf<typeof ssz.Blob>;
|
|
6
|
-
|
|
7
|
-
export type Metadata = ValueOf<typeof ssz.Metadata>;
|
|
8
|
-
export type Status = ValueOf<typeof ssz.Status>;
|
|
9
|
-
|
|
10
|
-
export type Cell = ValueOf<typeof ssz.Cell>;
|
|
11
|
-
export type DataColumn = ValueOf<typeof ssz.DataColumn>;
|
|
12
|
-
export type ExtendedMatrix = ValueOf<typeof ssz.ExtendedMatrix>;
|
|
13
|
-
export type KzgCommitmentsInclusionProof = ValueOf<typeof ssz.KzgCommitmentsInclusionProof>;
|
|
14
|
-
export type DataColumnSidecar = ValueOf<typeof ssz.DataColumnSidecar>;
|
|
15
|
-
export type DataColumnSidecars = ValueOf<typeof ssz.DataColumnSidecars>;
|
|
16
|
-
export type MatrixEntry = ValueOf<typeof ssz.MatrixEntry>;
|
|
17
|
-
|
|
18
|
-
export type ProposerLookahead = ValueOf<typeof ssz.ProposerLookahead>;
|
|
19
|
-
|
|
20
|
-
export type DataColumnsByRootIdentifier = ValueOf<typeof ssz.DataColumnsByRootIdentifier>;
|
|
21
|
-
export type DataColumnSidecarsByRangeRequest = ValueOf<typeof ssz.DataColumnSidecarsByRangeRequest>;
|
|
22
|
-
export type BeaconBlock = ValueOf<typeof ssz.BeaconBlock>;
|
|
23
|
-
export type SignedBeaconBlock = ValueOf<typeof ssz.SignedBeaconBlock>;
|
|
24
|
-
export type BeaconState = ValueOf<typeof ssz.BeaconState>;
|
|
25
|
-
export type BlockContents = ValueOf<typeof ssz.BlockContents>;
|
|
26
|
-
export type SignedBlockContents = ValueOf<typeof ssz.SignedBlockContents>;
|
|
27
|
-
export type BlobsBundle = ValueOf<typeof ssz.BlobsBundle>;
|
|
28
|
-
export type BlobAndProofV2 = {
|
|
29
|
-
blob: Blob;
|
|
30
|
-
proofs: KZGProof[];
|
|
31
|
-
};
|
package/src/gloas/index.ts
DELETED
package/src/gloas/sszTypes.ts
DELETED
package/src/gloas/types.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import {ValueOf} from "@chainsafe/ssz";
|
|
2
|
-
import * as ssz from "./sszTypes.js";
|
|
3
|
-
|
|
4
|
-
export type BeaconBlock = ValueOf<typeof ssz.BeaconBlock>;
|
|
5
|
-
export type SignedBeaconBlock = ValueOf<typeof ssz.SignedBeaconBlock>;
|
|
6
|
-
export type BeaconState = ValueOf<typeof ssz.BeaconState>;
|
package/src/index.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export * from "./types.js";
|
|
2
|
-
|
|
3
|
-
import type {SSZTypesFor} from "./sszTypes.js";
|
|
4
|
-
import * as ssz from "./sszTypes.js";
|
|
5
|
-
import {sszTypesFor} from "./sszTypes.js";
|
|
6
|
-
export {sszTypesFor, SSZTypesFor, ssz};
|
|
7
|
-
|
|
8
|
-
// Container utils
|
|
9
|
-
export * from "./utils/container.js";
|
|
10
|
-
export {ExecutionAddressType} from "./utils/executionAddress.js";
|
|
11
|
-
// String type
|
|
12
|
-
export {StringType, stringType} from "./utils/stringType.js";
|
|
13
|
-
// Typeguards
|
|
14
|
-
export * from "./utils/typeguards.js";
|
|
15
|
-
export * from "./utils/validatorStatus.js";
|