@lodestar/types 1.48.0-dev.df6a2aa429 → 1.48.0-dev.e17b11435f
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/bellatrix/sszTypes.d.ts +18 -0
- package/lib/bellatrix/sszTypes.d.ts.map +1 -1
- package/lib/bellatrix/sszTypes.js +3 -0
- package/lib/bellatrix/sszTypes.js.map +1 -1
- package/lib/bellatrix/types.d.ts +1 -0
- package/lib/bellatrix/types.d.ts.map +1 -1
- package/lib/capella/sszTypes.d.ts +24 -0
- package/lib/capella/sszTypes.d.ts.map +1 -1
- package/lib/capella/sszTypes.js +3 -0
- package/lib/capella/sszTypes.js.map +1 -1
- package/lib/capella/types.d.ts +1 -0
- package/lib/capella/types.d.ts.map +1 -1
- package/lib/deneb/sszTypes.d.ts +29 -0
- package/lib/deneb/sszTypes.d.ts.map +1 -1
- package/lib/deneb/sszTypes.js +6 -0
- package/lib/deneb/sszTypes.js.map +1 -1
- package/lib/deneb/types.d.ts +2 -0
- package/lib/deneb/types.d.ts.map +1 -1
- package/lib/electra/sszTypes.d.ts +47 -0
- package/lib/electra/sszTypes.d.ts.map +1 -1
- package/lib/electra/sszTypes.js +4 -0
- package/lib/electra/sszTypes.js.map +1 -1
- package/lib/electra/types.d.ts +1 -0
- package/lib/electra/types.d.ts.map +1 -1
- package/lib/gloas/sszTypes.d.ts +59 -0
- package/lib/gloas/sszTypes.d.ts.map +1 -1
- package/lib/gloas/sszTypes.js +64 -12
- package/lib/gloas/sszTypes.js.map +1 -1
- package/lib/gloas/types.d.ts +1 -0
- package/lib/gloas/types.d.ts.map +1 -1
- package/lib/sszTypes.d.ts +574 -0
- package/lib/sszTypes.d.ts.map +1 -1
- package/lib/types.d.ts +8 -0
- package/lib/types.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/bellatrix/sszTypes.ts +7 -0
- package/src/bellatrix/types.ts +1 -0
- package/src/capella/sszTypes.ts +7 -0
- package/src/capella/types.ts +1 -0
- package/src/deneb/sszTypes.ts +10 -0
- package/src/deneb/types.ts +2 -0
- package/src/electra/sszTypes.ts +8 -0
- package/src/electra/types.ts +1 -0
- package/src/gloas/sszTypes.ts +88 -11
- package/src/gloas/types.ts +1 -0
- package/src/types.ts +8 -0
package/src/gloas/sszTypes.ts
CHANGED
|
@@ -18,13 +18,33 @@ import {
|
|
|
18
18
|
EXECUTION_BLOCK_HASH_DEPTH_GLOAS,
|
|
19
19
|
FINALIZED_ROOT_DEPTH_GLOAS,
|
|
20
20
|
HISTORICAL_ROOTS_LIMIT,
|
|
21
|
+
MAX_ATTESTATIONS_ELECTRA,
|
|
22
|
+
MAX_ATTESTER_SLASHINGS_ELECTRA,
|
|
23
|
+
MAX_BLOB_COMMITMENTS_PER_BLOCK,
|
|
24
|
+
MAX_BLS_TO_EXECUTION_CHANGES,
|
|
21
25
|
MAX_BUILDER_AUTH_DATA_SIZE,
|
|
26
|
+
MAX_BUILDER_DEPOSIT_REQUESTS_PER_PAYLOAD,
|
|
27
|
+
MAX_BUILDER_EXIT_REQUESTS_PER_PAYLOAD,
|
|
28
|
+
MAX_BYTES_PER_TRANSACTION,
|
|
29
|
+
MAX_COMMITTEES_PER_SLOT,
|
|
30
|
+
MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD,
|
|
31
|
+
MAX_PAYLOAD_ATTESTATIONS,
|
|
32
|
+
MAX_PROPOSER_SLASHINGS,
|
|
33
|
+
MAX_TRANSACTIONS_PER_PAYLOAD,
|
|
34
|
+
MAX_VALIDATORS_PER_COMMITTEE,
|
|
35
|
+
MAX_VOLUNTARY_EXITS,
|
|
36
|
+
MAX_WITHDRAWALS_PER_PAYLOAD,
|
|
37
|
+
MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD,
|
|
22
38
|
MIN_SEED_LOOKAHEAD,
|
|
23
39
|
NEXT_SYNC_COMMITTEE_DEPTH_GLOAS,
|
|
24
40
|
NUMBER_OF_COLUMNS,
|
|
41
|
+
PENDING_CONSOLIDATIONS_LIMIT,
|
|
42
|
+
PENDING_DEPOSITS_LIMIT,
|
|
43
|
+
PENDING_PARTIAL_WITHDRAWALS_LIMIT,
|
|
25
44
|
PTC_SIZE,
|
|
26
45
|
SLOTS_PER_EPOCH,
|
|
27
46
|
SLOTS_PER_HISTORICAL_ROOT,
|
|
47
|
+
VALIDATOR_REGISTRY_LIMIT,
|
|
28
48
|
} from "@lodestar/params";
|
|
29
49
|
import {ssz as altairSsz} from "../altair/index.js";
|
|
30
50
|
import {ssz as capellaSsz} from "../capella/index.js";
|
|
@@ -67,16 +87,35 @@ export const FinalityBranch = new VectorCompositeType(Bytes32, FINALIZED_ROOT_DE
|
|
|
67
87
|
|
|
68
88
|
export const NextSyncCommitteeBranch = new VectorCompositeType(Bytes32, NEXT_SYNC_COMMITTEE_DEPTH_GLOAS);
|
|
69
89
|
|
|
70
|
-
export const AggregationBits = new ProgressiveBitListType({
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
export const
|
|
90
|
+
export const AggregationBits = new ProgressiveBitListType({
|
|
91
|
+
typeName: "AggregationBits",
|
|
92
|
+
limit: MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT,
|
|
93
|
+
});
|
|
94
|
+
export const AttestingIndices = new ProgressiveListBasicType(ValidatorIndex, {
|
|
95
|
+
typeName: "AttestingIndices",
|
|
96
|
+
limit: MAX_VALIDATORS_PER_COMMITTEE * MAX_COMMITTEES_PER_SLOT,
|
|
97
|
+
});
|
|
98
|
+
export const Transaction = new ProgressiveByteListType({typeName: "Transaction", limit: MAX_BYTES_PER_TRANSACTION});
|
|
99
|
+
export const Transactions = new ProgressiveListCompositeType(Transaction, {
|
|
100
|
+
typeName: "Transactions",
|
|
101
|
+
limit: MAX_TRANSACTIONS_PER_PAYLOAD,
|
|
102
|
+
});
|
|
103
|
+
export const Withdrawals = new ProgressiveListCompositeType(capellaSsz.Withdrawal, {
|
|
104
|
+
typeName: "Withdrawals",
|
|
105
|
+
limit: MAX_WITHDRAWALS_PER_PAYLOAD,
|
|
106
|
+
});
|
|
75
107
|
export const BlobKzgCommitments = new ProgressiveListCompositeType(denebSsz.KZGCommitment, {
|
|
76
108
|
typeName: "BlobKzgCommitments",
|
|
109
|
+
limit: MAX_BLOB_COMMITMENTS_PER_BLOCK,
|
|
110
|
+
});
|
|
111
|
+
export const KZGProofs = new ProgressiveListCompositeType(denebSsz.KZGProof, {
|
|
112
|
+
typeName: "KZGProofs",
|
|
113
|
+
limit: MAX_BLOB_COMMITMENTS_PER_BLOCK,
|
|
114
|
+
});
|
|
115
|
+
export const DataColumn = new ProgressiveListCompositeType(fuluSsz.Cell, {
|
|
116
|
+
typeName: "DataColumn",
|
|
117
|
+
limit: MAX_BLOB_COMMITMENTS_PER_BLOCK,
|
|
77
118
|
});
|
|
78
|
-
export const KZGProofs = new ProgressiveListCompositeType(denebSsz.KZGProof, {typeName: "KZGProofs"});
|
|
79
|
-
export const DataColumn = new ProgressiveListCompositeType(fuluSsz.Cell, {typeName: "DataColumn"});
|
|
80
119
|
|
|
81
120
|
export const Attestation = new ProgressiveContainerType(
|
|
82
121
|
{
|
|
@@ -140,10 +179,12 @@ export const DepositRequests = new ProgressiveListCompositeType(DepositRequest,
|
|
|
140
179
|
export const WithdrawalRequest = electraSsz.WithdrawalRequest;
|
|
141
180
|
export const WithdrawalRequests = new ProgressiveListCompositeType(WithdrawalRequest, {
|
|
142
181
|
typeName: "WithdrawalRequests",
|
|
182
|
+
limit: MAX_WITHDRAWAL_REQUESTS_PER_PAYLOAD,
|
|
143
183
|
});
|
|
144
184
|
export const ConsolidationRequest = electraSsz.ConsolidationRequest;
|
|
145
185
|
export const ConsolidationRequests = new ProgressiveListCompositeType(ConsolidationRequest, {
|
|
146
186
|
typeName: "ConsolidationRequests",
|
|
187
|
+
limit: MAX_CONSOLIDATION_REQUESTS_PER_PAYLOAD,
|
|
147
188
|
});
|
|
148
189
|
|
|
149
190
|
// New in GLOAS:EIP8282
|
|
@@ -158,6 +199,7 @@ export const BuilderDepositRequest = new ContainerType(
|
|
|
158
199
|
);
|
|
159
200
|
export const BuilderDepositRequests = new ProgressiveListCompositeType(BuilderDepositRequest, {
|
|
160
201
|
typeName: "BuilderDepositRequests",
|
|
202
|
+
limit: MAX_BUILDER_DEPOSIT_REQUESTS_PER_PAYLOAD,
|
|
161
203
|
});
|
|
162
204
|
|
|
163
205
|
// New in GLOAS:EIP8282
|
|
@@ -170,6 +212,7 @@ export const BuilderExitRequest = new ContainerType(
|
|
|
170
212
|
);
|
|
171
213
|
export const BuilderExitRequests = new ProgressiveListCompositeType(BuilderExitRequest, {
|
|
172
214
|
typeName: "BuilderExitRequests",
|
|
215
|
+
limit: MAX_BUILDER_EXIT_REQUESTS_PER_PAYLOAD,
|
|
173
216
|
});
|
|
174
217
|
|
|
175
218
|
export const ExecutionRequests = new ProgressiveContainerType(
|
|
@@ -186,33 +229,53 @@ export const ExecutionRequests = new ProgressiveContainerType(
|
|
|
186
229
|
|
|
187
230
|
export const ProposerSlashings = new ProgressiveListCompositeType(phase0Ssz.ProposerSlashing, {
|
|
188
231
|
typeName: "ProposerSlashings",
|
|
232
|
+
limit: MAX_PROPOSER_SLASHINGS,
|
|
189
233
|
});
|
|
190
234
|
export const AttesterSlashings = new ProgressiveListCompositeType(AttesterSlashing, {
|
|
191
235
|
typeName: "AttesterSlashings",
|
|
236
|
+
limit: MAX_ATTESTER_SLASHINGS_ELECTRA,
|
|
237
|
+
});
|
|
238
|
+
export const Attestations = new ProgressiveListCompositeType(Attestation, {
|
|
239
|
+
typeName: "Attestations",
|
|
240
|
+
limit: MAX_ATTESTATIONS_ELECTRA,
|
|
192
241
|
});
|
|
193
|
-
export const Attestations = new ProgressiveListCompositeType(Attestation, {typeName: "Attestations"});
|
|
194
242
|
export const Deposits = new ProgressiveListCompositeType(phase0Ssz.Deposit, {typeName: "Deposits"});
|
|
195
243
|
export const VoluntaryExits = new ProgressiveListCompositeType(phase0Ssz.SignedVoluntaryExit, {
|
|
196
244
|
typeName: "VoluntaryExits",
|
|
245
|
+
limit: MAX_VOLUNTARY_EXITS,
|
|
197
246
|
});
|
|
198
247
|
export const BlsToExecutionChanges = new ProgressiveListCompositeType(capellaSsz.SignedBLSToExecutionChange, {
|
|
199
248
|
typeName: "BLSToExecutionChanges",
|
|
249
|
+
limit: MAX_BLS_TO_EXECUTION_CHANGES,
|
|
200
250
|
});
|
|
201
251
|
|
|
202
|
-
export const Validators = new ProgressiveListCompositeType(phase0Ssz.Validator, {
|
|
203
|
-
|
|
252
|
+
export const Validators = new ProgressiveListCompositeType(phase0Ssz.Validator, {
|
|
253
|
+
typeName: "Validators",
|
|
254
|
+
limit: VALIDATOR_REGISTRY_LIMIT,
|
|
255
|
+
});
|
|
256
|
+
export const Balances = new ProgressiveListBasicType(UintNum64, {
|
|
257
|
+
typeName: "Balances",
|
|
258
|
+
limit: VALIDATOR_REGISTRY_LIMIT,
|
|
259
|
+
});
|
|
204
260
|
export const EpochParticipation = new ProgressiveListBasicType(ParticipationFlags, {
|
|
205
261
|
typeName: "EpochParticipation",
|
|
262
|
+
limit: VALIDATOR_REGISTRY_LIMIT,
|
|
263
|
+
});
|
|
264
|
+
export const InactivityScores = new ProgressiveListBasicType(UintNum64, {
|
|
265
|
+
typeName: "InactivityScores",
|
|
266
|
+
limit: VALIDATOR_REGISTRY_LIMIT,
|
|
206
267
|
});
|
|
207
|
-
export const InactivityScores = new ProgressiveListBasicType(UintNum64, {typeName: "InactivityScores"});
|
|
208
268
|
export const PendingDeposits = new ProgressiveListCompositeType(electraSsz.PendingDeposit, {
|
|
209
269
|
typeName: "PendingDeposits",
|
|
270
|
+
limit: PENDING_DEPOSITS_LIMIT,
|
|
210
271
|
});
|
|
211
272
|
export const PendingPartialWithdrawals = new ProgressiveListCompositeType(electraSsz.PendingPartialWithdrawal, {
|
|
212
273
|
typeName: "PendingPartialWithdrawals",
|
|
274
|
+
limit: PENDING_PARTIAL_WITHDRAWALS_LIMIT,
|
|
213
275
|
});
|
|
214
276
|
export const PendingConsolidations = new ProgressiveListCompositeType(electraSsz.PendingConsolidation, {
|
|
215
277
|
typeName: "PendingConsolidations",
|
|
278
|
+
limit: PENDING_CONSOLIDATIONS_LIMIT,
|
|
216
279
|
});
|
|
217
280
|
|
|
218
281
|
export const Builder = new ContainerType(
|
|
@@ -238,6 +301,9 @@ export const BuilderPendingWithdrawal = new ContainerType(
|
|
|
238
301
|
|
|
239
302
|
export const BuilderPendingPayment = new ContainerType(
|
|
240
303
|
{
|
|
304
|
+
// weight sums attesting validators' effective balances, which are multiples of 1e9 Gwei;
|
|
305
|
+
// such multiples stay exactly representable as JS numbers far beyond any reachable Ethereum
|
|
306
|
+
// stake, so UintNum64 is safe here.
|
|
241
307
|
weight: UintNum64,
|
|
242
308
|
withdrawal: BuilderPendingWithdrawal,
|
|
243
309
|
proposerIndex: ValidatorIndex,
|
|
@@ -280,6 +346,7 @@ export const PayloadAttestation = new ProgressiveContainerType(
|
|
|
280
346
|
|
|
281
347
|
export const PayloadAttestations = new ProgressiveListCompositeType(PayloadAttestation, {
|
|
282
348
|
typeName: "PayloadAttestations",
|
|
349
|
+
limit: MAX_PAYLOAD_ATTESTATIONS,
|
|
283
350
|
});
|
|
284
351
|
|
|
285
352
|
export const PayloadAttestationMessage = new ContainerType(
|
|
@@ -408,6 +475,16 @@ export const ExecutionPayload = new ProgressiveContainerType(
|
|
|
408
475
|
{typeName: "ExecutionPayload", jsonCase: "eth2"}
|
|
409
476
|
);
|
|
410
477
|
|
|
478
|
+
export const NewPayloadRequest = new ProgressiveContainerType(
|
|
479
|
+
{
|
|
480
|
+
...electraSsz.NewPayloadRequest.fields,
|
|
481
|
+
executionPayload: ExecutionPayload,
|
|
482
|
+
executionRequests: ExecutionRequests,
|
|
483
|
+
},
|
|
484
|
+
activeFields(4),
|
|
485
|
+
{typeName: "NewPayloadRequest", jsonCase: "eth2"}
|
|
486
|
+
);
|
|
487
|
+
|
|
411
488
|
export const ExecutionPayloadEnvelope = new ProgressiveContainerType(
|
|
412
489
|
{
|
|
413
490
|
payload: ExecutionPayload,
|
package/src/gloas/types.ts
CHANGED
|
@@ -44,6 +44,7 @@ export type IndexedPayloadAttestation = ValueOf<typeof ssz.IndexedPayloadAttesta
|
|
|
44
44
|
export type ProposerPreferences = ValueOf<typeof ssz.ProposerPreferences>;
|
|
45
45
|
export type SignedProposerPreferences = ValueOf<typeof ssz.SignedProposerPreferences>;
|
|
46
46
|
export type ExecutionPayload = ValueOf<typeof ssz.ExecutionPayload>;
|
|
47
|
+
export type NewPayloadRequest = ValueOf<typeof ssz.NewPayloadRequest>;
|
|
47
48
|
export type ExecutionPayloadBid = ValueOf<typeof ssz.ExecutionPayloadBid>;
|
|
48
49
|
export type SignedExecutionPayloadBid = ValueOf<typeof ssz.SignedExecutionPayloadBid>;
|
|
49
50
|
export type BuilderRequestAuth = ValueOf<typeof ssz.BuilderRequestAuth>;
|
package/src/types.ts
CHANGED
|
@@ -121,6 +121,7 @@ type TypesByFork = {
|
|
|
121
121
|
BlindedBeaconBlockBody: bellatrix.BlindedBeaconBlockBody;
|
|
122
122
|
SignedBlindedBeaconBlock: bellatrix.SignedBlindedBeaconBlock;
|
|
123
123
|
ExecutionPayload: bellatrix.ExecutionPayload;
|
|
124
|
+
NewPayloadRequest: bellatrix.NewPayloadRequest;
|
|
124
125
|
ExecutionPayloadHeader: bellatrix.ExecutionPayloadHeader;
|
|
125
126
|
BuilderBid: bellatrix.BuilderBid;
|
|
126
127
|
SignedBuilderBid: bellatrix.SignedBuilderBid;
|
|
@@ -156,6 +157,7 @@ type TypesByFork = {
|
|
|
156
157
|
BlindedBeaconBlockBody: capella.BlindedBeaconBlockBody;
|
|
157
158
|
SignedBlindedBeaconBlock: capella.SignedBlindedBeaconBlock;
|
|
158
159
|
ExecutionPayload: capella.ExecutionPayload;
|
|
160
|
+
NewPayloadRequest: capella.NewPayloadRequest;
|
|
159
161
|
ExecutionPayloadHeader: capella.ExecutionPayloadHeader;
|
|
160
162
|
BuilderBid: capella.BuilderBid;
|
|
161
163
|
SignedBuilderBid: capella.SignedBuilderBid;
|
|
@@ -191,6 +193,7 @@ type TypesByFork = {
|
|
|
191
193
|
BlindedBeaconBlockBody: deneb.BlindedBeaconBlockBody;
|
|
192
194
|
SignedBlindedBeaconBlock: deneb.SignedBlindedBeaconBlock;
|
|
193
195
|
ExecutionPayload: deneb.ExecutionPayload;
|
|
196
|
+
NewPayloadRequest: deneb.NewPayloadRequest;
|
|
194
197
|
ExecutionPayloadHeader: deneb.ExecutionPayloadHeader;
|
|
195
198
|
BuilderBid: deneb.BuilderBid;
|
|
196
199
|
SignedBuilderBid: deneb.SignedBuilderBid;
|
|
@@ -228,6 +231,7 @@ type TypesByFork = {
|
|
|
228
231
|
BlindedBeaconBlockBody: electra.BlindedBeaconBlockBody;
|
|
229
232
|
SignedBlindedBeaconBlock: electra.SignedBlindedBeaconBlock;
|
|
230
233
|
ExecutionPayload: deneb.ExecutionPayload;
|
|
234
|
+
NewPayloadRequest: electra.NewPayloadRequest;
|
|
231
235
|
ExecutionPayloadHeader: deneb.ExecutionPayloadHeader;
|
|
232
236
|
BuilderBid: electra.BuilderBid;
|
|
233
237
|
SignedBuilderBid: electra.SignedBuilderBid;
|
|
@@ -266,6 +270,7 @@ type TypesByFork = {
|
|
|
266
270
|
BlindedBeaconBlockBody: electra.BlindedBeaconBlockBody;
|
|
267
271
|
SignedBlindedBeaconBlock: electra.SignedBlindedBeaconBlock;
|
|
268
272
|
ExecutionPayload: deneb.ExecutionPayload;
|
|
273
|
+
NewPayloadRequest: electra.NewPayloadRequest;
|
|
269
274
|
ExecutionPayloadHeader: deneb.ExecutionPayloadHeader;
|
|
270
275
|
BuilderBid: electra.BuilderBid;
|
|
271
276
|
SignedBuilderBid: electra.SignedBuilderBid;
|
|
@@ -306,6 +311,7 @@ type TypesByFork = {
|
|
|
306
311
|
BlindedBeaconBlockBody: electra.BlindedBeaconBlockBody;
|
|
307
312
|
SignedBlindedBeaconBlock: electra.SignedBlindedBeaconBlock;
|
|
308
313
|
ExecutionPayload: gloas.ExecutionPayload;
|
|
314
|
+
NewPayloadRequest: gloas.NewPayloadRequest;
|
|
309
315
|
ExecutionPayloadHeader: deneb.ExecutionPayloadHeader;
|
|
310
316
|
BuilderBid: electra.BuilderBid;
|
|
311
317
|
SignedBuilderBid: electra.SignedBuilderBid;
|
|
@@ -347,6 +353,7 @@ type TypesByFork = {
|
|
|
347
353
|
BlindedBeaconBlockBody: electra.BlindedBeaconBlockBody;
|
|
348
354
|
SignedBlindedBeaconBlock: electra.SignedBlindedBeaconBlock;
|
|
349
355
|
ExecutionPayload: gloas.ExecutionPayload;
|
|
356
|
+
NewPayloadRequest: gloas.NewPayloadRequest;
|
|
350
357
|
ExecutionPayloadHeader: deneb.ExecutionPayloadHeader;
|
|
351
358
|
BuilderBid: electra.BuilderBid;
|
|
352
359
|
SignedBuilderBid: electra.SignedBuilderBid;
|
|
@@ -394,6 +401,7 @@ export type SignedBlockContents<F extends ForkAll = ForkAll> = TypesByFork[F]["S
|
|
|
394
401
|
export type SignedOrUnsignedBlockContents<F extends ForkAll = ForkAll> = BlockContents<F> | SignedBlockContents<F>;
|
|
395
402
|
|
|
396
403
|
export type ExecutionPayload<F extends ForkPostBellatrix = ForkPostBellatrix> = TypesByFork[F]["ExecutionPayload"];
|
|
404
|
+
export type NewPayloadRequest<F extends ForkPostBellatrix = ForkPostBellatrix> = TypesByFork[F]["NewPayloadRequest"];
|
|
397
405
|
export type ExecutionPayloadHeader<F extends ForkPostBellatrix = ForkPostBellatrix> =
|
|
398
406
|
TypesByFork[F]["ExecutionPayloadHeader"];
|
|
399
407
|
export type ExecutionRequests<F extends ForkPostElectra = ForkPostElectra> = TypesByFork[F]["ExecutionRequests"];
|