@lodestar/types 1.35.0-dev.fcf8d024ea → 1.35.0-dev.feed916580
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/sszTypes.d.ts +1 -1
- package/lib/bellatrix/sszTypes.d.ts +15 -15
- package/lib/capella/sszTypes.d.ts +41 -41
- package/lib/deneb/sszTypes.d.ts +44 -44
- package/lib/electra/sszTypes.d.ts +67 -67
- package/lib/fulu/sszTypes.d.ts +22 -22
- package/lib/gloas/sszTypes.d.ts +234 -535
- package/lib/gloas/sszTypes.js +3 -162
- package/lib/gloas/sszTypes.js.map +1 -1
- package/lib/gloas/types.d.ts +0 -13
- package/lib/sszTypes.d.ts +1446 -1664
- package/lib/types.d.ts +4 -3
- package/lib/types.js.map +1 -1
- package/package.json +8 -14
- 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 -234
- package/src/gloas/types.ts +0 -20
- 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 -374
- 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/altair/sszTypes.ts
DELETED
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
import {BitVectorType, ContainerType, ListBasicType, ListCompositeType, VectorCompositeType} from "@chainsafe/ssz";
|
|
2
|
-
import {
|
|
3
|
-
CURRENT_SYNC_COMMITTEE_DEPTH,
|
|
4
|
-
EPOCHS_PER_SYNC_COMMITTEE_PERIOD,
|
|
5
|
-
FINALIZED_ROOT_DEPTH,
|
|
6
|
-
HISTORICAL_ROOTS_LIMIT,
|
|
7
|
-
NEXT_SYNC_COMMITTEE_DEPTH,
|
|
8
|
-
SLOTS_PER_EPOCH,
|
|
9
|
-
SYNC_COMMITTEE_SIZE,
|
|
10
|
-
SYNC_COMMITTEE_SUBNET_COUNT,
|
|
11
|
-
VALIDATOR_REGISTRY_LIMIT,
|
|
12
|
-
} from "@lodestar/params";
|
|
13
|
-
import * as phase0Ssz from "../phase0/sszTypes.js";
|
|
14
|
-
import * as primitiveSsz from "../primitive/sszTypes.js";
|
|
15
|
-
|
|
16
|
-
const {
|
|
17
|
-
Bytes32,
|
|
18
|
-
UintNum64,
|
|
19
|
-
UintBn64,
|
|
20
|
-
Slot,
|
|
21
|
-
SubcommitteeIndex,
|
|
22
|
-
ValidatorIndex,
|
|
23
|
-
Root,
|
|
24
|
-
BLSPubkey,
|
|
25
|
-
BLSSignature,
|
|
26
|
-
ParticipationFlags,
|
|
27
|
-
} = primitiveSsz;
|
|
28
|
-
|
|
29
|
-
export const SyncSubnets = new BitVectorType(SYNC_COMMITTEE_SUBNET_COUNT);
|
|
30
|
-
|
|
31
|
-
export const FinalityBranch = new VectorCompositeType(Bytes32, FINALIZED_ROOT_DEPTH);
|
|
32
|
-
|
|
33
|
-
export const CurrentSyncCommitteeBranch = new VectorCompositeType(Bytes32, CURRENT_SYNC_COMMITTEE_DEPTH);
|
|
34
|
-
|
|
35
|
-
export const NextSyncCommitteeBranch = new VectorCompositeType(Bytes32, NEXT_SYNC_COMMITTEE_DEPTH);
|
|
36
|
-
|
|
37
|
-
export const Metadata = new ContainerType(
|
|
38
|
-
{
|
|
39
|
-
seqNumber: UintBn64,
|
|
40
|
-
attnets: phase0Ssz.AttestationSubnets,
|
|
41
|
-
syncnets: SyncSubnets,
|
|
42
|
-
},
|
|
43
|
-
{typeName: "Metadata", jsonCase: "eth2"}
|
|
44
|
-
);
|
|
45
|
-
|
|
46
|
-
export const SyncCommittee = new ContainerType(
|
|
47
|
-
{
|
|
48
|
-
pubkeys: new VectorCompositeType(BLSPubkey, SYNC_COMMITTEE_SIZE),
|
|
49
|
-
aggregatePubkey: BLSPubkey,
|
|
50
|
-
},
|
|
51
|
-
{typeName: "SyncCommittee", jsonCase: "eth2"}
|
|
52
|
-
);
|
|
53
|
-
|
|
54
|
-
export const SyncCommitteeMessage = new ContainerType(
|
|
55
|
-
{
|
|
56
|
-
slot: Slot,
|
|
57
|
-
beaconBlockRoot: Root,
|
|
58
|
-
validatorIndex: ValidatorIndex,
|
|
59
|
-
signature: BLSSignature,
|
|
60
|
-
},
|
|
61
|
-
{typeName: "SyncCommitteeMessage", jsonCase: "eth2"}
|
|
62
|
-
);
|
|
63
|
-
|
|
64
|
-
export const SyncCommitteeContribution = new ContainerType(
|
|
65
|
-
{
|
|
66
|
-
slot: Slot,
|
|
67
|
-
beaconBlockRoot: Root,
|
|
68
|
-
subcommitteeIndex: SubcommitteeIndex,
|
|
69
|
-
aggregationBits: new BitVectorType(SYNC_COMMITTEE_SIZE / SYNC_COMMITTEE_SUBNET_COUNT),
|
|
70
|
-
signature: BLSSignature,
|
|
71
|
-
},
|
|
72
|
-
{typeName: "SyncCommitteeContribution", jsonCase: "eth2"}
|
|
73
|
-
);
|
|
74
|
-
|
|
75
|
-
export const ContributionAndProof = new ContainerType(
|
|
76
|
-
{
|
|
77
|
-
aggregatorIndex: ValidatorIndex,
|
|
78
|
-
contribution: SyncCommitteeContribution,
|
|
79
|
-
selectionProof: BLSSignature,
|
|
80
|
-
},
|
|
81
|
-
{typeName: "ContributionAndProof", jsonCase: "eth2", cachePermanentRootStruct: true}
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
export const SignedContributionAndProof = new ContainerType(
|
|
85
|
-
{
|
|
86
|
-
message: ContributionAndProof,
|
|
87
|
-
signature: BLSSignature,
|
|
88
|
-
},
|
|
89
|
-
{typeName: "SignedContributionAndProof", jsonCase: "eth2"}
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
export const SyncAggregatorSelectionData = new ContainerType(
|
|
93
|
-
{
|
|
94
|
-
slot: Slot,
|
|
95
|
-
subcommitteeIndex: SubcommitteeIndex,
|
|
96
|
-
},
|
|
97
|
-
{typeName: "SyncAggregatorSelectionData", jsonCase: "eth2"}
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
export const SyncCommitteeBits = new BitVectorType(SYNC_COMMITTEE_SIZE);
|
|
101
|
-
|
|
102
|
-
export const SyncAggregate = new ContainerType(
|
|
103
|
-
{
|
|
104
|
-
syncCommitteeBits: SyncCommitteeBits,
|
|
105
|
-
syncCommitteeSignature: BLSSignature,
|
|
106
|
-
},
|
|
107
|
-
{typeName: "SyncCommitteeBits", jsonCase: "eth2"}
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
export const BeaconBlockBody = new ContainerType(
|
|
111
|
-
{
|
|
112
|
-
...phase0Ssz.BeaconBlockBody.fields,
|
|
113
|
-
syncAggregate: SyncAggregate,
|
|
114
|
-
},
|
|
115
|
-
{typeName: "BeaconBlockBody", jsonCase: "eth2", cachePermanentRootStruct: true}
|
|
116
|
-
);
|
|
117
|
-
|
|
118
|
-
export const BeaconBlock = new ContainerType(
|
|
119
|
-
{
|
|
120
|
-
slot: Slot,
|
|
121
|
-
proposerIndex: ValidatorIndex,
|
|
122
|
-
parentRoot: Root,
|
|
123
|
-
stateRoot: Root,
|
|
124
|
-
body: BeaconBlockBody,
|
|
125
|
-
},
|
|
126
|
-
{typeName: "BeaconBlock", jsonCase: "eth2", cachePermanentRootStruct: true}
|
|
127
|
-
);
|
|
128
|
-
|
|
129
|
-
export const SignedBeaconBlock = new ContainerType(
|
|
130
|
-
{
|
|
131
|
-
message: BeaconBlock,
|
|
132
|
-
signature: BLSSignature,
|
|
133
|
-
},
|
|
134
|
-
{typeName: "SignedBeaconBlock", jsonCase: "eth2"}
|
|
135
|
-
);
|
|
136
|
-
|
|
137
|
-
export const EpochParticipation = new ListBasicType(ParticipationFlags, VALIDATOR_REGISTRY_LIMIT);
|
|
138
|
-
export const InactivityScores = new ListBasicType(UintNum64, VALIDATOR_REGISTRY_LIMIT);
|
|
139
|
-
|
|
140
|
-
// we don't reuse phase0.BeaconState fields since we need to replace some keys
|
|
141
|
-
// and we cannot keep order doing that
|
|
142
|
-
export const BeaconState = new ContainerType(
|
|
143
|
-
{
|
|
144
|
-
genesisTime: UintNum64,
|
|
145
|
-
genesisValidatorsRoot: Root,
|
|
146
|
-
slot: Slot,
|
|
147
|
-
fork: phase0Ssz.Fork,
|
|
148
|
-
// History
|
|
149
|
-
latestBlockHeader: phase0Ssz.BeaconBlockHeader,
|
|
150
|
-
blockRoots: phase0Ssz.HistoricalBlockRoots,
|
|
151
|
-
stateRoots: phase0Ssz.HistoricalStateRoots,
|
|
152
|
-
historicalRoots: new ListCompositeType(Root, HISTORICAL_ROOTS_LIMIT),
|
|
153
|
-
// Eth1
|
|
154
|
-
eth1Data: phase0Ssz.Eth1Data,
|
|
155
|
-
eth1DataVotes: phase0Ssz.Eth1DataVotes,
|
|
156
|
-
eth1DepositIndex: UintNum64,
|
|
157
|
-
// Registry
|
|
158
|
-
validators: phase0Ssz.Validators,
|
|
159
|
-
balances: phase0Ssz.Balances,
|
|
160
|
-
randaoMixes: phase0Ssz.RandaoMixes,
|
|
161
|
-
// Slashings
|
|
162
|
-
slashings: phase0Ssz.Slashings,
|
|
163
|
-
// Participation
|
|
164
|
-
previousEpochParticipation: EpochParticipation,
|
|
165
|
-
currentEpochParticipation: EpochParticipation,
|
|
166
|
-
// Finality
|
|
167
|
-
justificationBits: phase0Ssz.JustificationBits,
|
|
168
|
-
previousJustifiedCheckpoint: phase0Ssz.Checkpoint,
|
|
169
|
-
currentJustifiedCheckpoint: phase0Ssz.Checkpoint,
|
|
170
|
-
finalizedCheckpoint: phase0Ssz.Checkpoint,
|
|
171
|
-
// Inactivity
|
|
172
|
-
inactivityScores: InactivityScores,
|
|
173
|
-
// Sync
|
|
174
|
-
currentSyncCommittee: SyncCommittee,
|
|
175
|
-
nextSyncCommittee: SyncCommittee,
|
|
176
|
-
},
|
|
177
|
-
{typeName: "BeaconState", jsonCase: "eth2"}
|
|
178
|
-
);
|
|
179
|
-
|
|
180
|
-
export const LightClientHeader = new ContainerType(
|
|
181
|
-
{
|
|
182
|
-
beacon: phase0Ssz.BeaconBlockHeader,
|
|
183
|
-
},
|
|
184
|
-
{typeName: "LightClientHeader", jsonCase: "eth2"}
|
|
185
|
-
);
|
|
186
|
-
|
|
187
|
-
export const LightClientBootstrap = new ContainerType(
|
|
188
|
-
{
|
|
189
|
-
header: LightClientHeader,
|
|
190
|
-
currentSyncCommittee: SyncCommittee,
|
|
191
|
-
currentSyncCommitteeBranch: CurrentSyncCommitteeBranch,
|
|
192
|
-
},
|
|
193
|
-
{typeName: "LightClientBootstrap", jsonCase: "eth2"}
|
|
194
|
-
);
|
|
195
|
-
|
|
196
|
-
export const LightClientUpdate = new ContainerType(
|
|
197
|
-
{
|
|
198
|
-
attestedHeader: LightClientHeader,
|
|
199
|
-
nextSyncCommittee: SyncCommittee,
|
|
200
|
-
nextSyncCommitteeBranch: NextSyncCommitteeBranch,
|
|
201
|
-
finalizedHeader: LightClientHeader,
|
|
202
|
-
finalityBranch: FinalityBranch,
|
|
203
|
-
syncAggregate: SyncAggregate,
|
|
204
|
-
signatureSlot: Slot,
|
|
205
|
-
},
|
|
206
|
-
{typeName: "LightClientUpdate", jsonCase: "eth2"}
|
|
207
|
-
);
|
|
208
|
-
|
|
209
|
-
export const LightClientFinalityUpdate = new ContainerType(
|
|
210
|
-
{
|
|
211
|
-
attestedHeader: LightClientHeader,
|
|
212
|
-
finalizedHeader: LightClientHeader,
|
|
213
|
-
finalityBranch: FinalityBranch,
|
|
214
|
-
syncAggregate: SyncAggregate,
|
|
215
|
-
signatureSlot: Slot,
|
|
216
|
-
},
|
|
217
|
-
{typeName: "LightClientFinalityUpdate", jsonCase: "eth2"}
|
|
218
|
-
);
|
|
219
|
-
|
|
220
|
-
export const LightClientOptimisticUpdate = new ContainerType(
|
|
221
|
-
{
|
|
222
|
-
attestedHeader: LightClientHeader,
|
|
223
|
-
syncAggregate: SyncAggregate,
|
|
224
|
-
signatureSlot: Slot,
|
|
225
|
-
},
|
|
226
|
-
{typeName: "LightClientOptimisticUpdate", jsonCase: "eth2"}
|
|
227
|
-
);
|
|
228
|
-
|
|
229
|
-
export const LightClientUpdatesByRange = new ContainerType(
|
|
230
|
-
{
|
|
231
|
-
startPeriod: UintNum64,
|
|
232
|
-
count: UintNum64,
|
|
233
|
-
},
|
|
234
|
-
{typeName: "LightClientUpdatesByRange", jsonCase: "eth2"}
|
|
235
|
-
);
|
|
236
|
-
|
|
237
|
-
export const LightClientStore = new ContainerType(
|
|
238
|
-
{
|
|
239
|
-
snapshot: LightClientBootstrap,
|
|
240
|
-
validUpdates: new ListCompositeType(LightClientUpdate, EPOCHS_PER_SYNC_COMMITTEE_PERIOD * SLOTS_PER_EPOCH),
|
|
241
|
-
},
|
|
242
|
-
{typeName: "LightClientStore", jsonCase: "eth2"}
|
|
243
|
-
);
|
package/src/altair/types.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import {ValueOf} from "@chainsafe/ssz";
|
|
2
|
-
import * as ssz from "./sszTypes.js";
|
|
3
|
-
|
|
4
|
-
export type SyncSubnets = ValueOf<typeof ssz.SyncSubnets>;
|
|
5
|
-
export type Metadata = ValueOf<typeof ssz.Metadata>;
|
|
6
|
-
export type SyncCommittee = ValueOf<typeof ssz.SyncCommittee>;
|
|
7
|
-
export type SyncCommitteeMessage = ValueOf<typeof ssz.SyncCommitteeMessage>;
|
|
8
|
-
export type SyncCommitteeContribution = ValueOf<typeof ssz.SyncCommitteeContribution>;
|
|
9
|
-
export type ContributionAndProof = ValueOf<typeof ssz.ContributionAndProof>;
|
|
10
|
-
export type SignedContributionAndProof = ValueOf<typeof ssz.SignedContributionAndProof>;
|
|
11
|
-
export type SyncAggregatorSelectionData = ValueOf<typeof ssz.SyncAggregatorSelectionData>;
|
|
12
|
-
export type SyncAggregate = ValueOf<typeof ssz.SyncAggregate>;
|
|
13
|
-
export type BeaconBlockBody = ValueOf<typeof ssz.BeaconBlockBody>;
|
|
14
|
-
export type BeaconBlock = ValueOf<typeof ssz.BeaconBlock>;
|
|
15
|
-
export type SignedBeaconBlock = ValueOf<typeof ssz.SignedBeaconBlock>;
|
|
16
|
-
export type BeaconState = ValueOf<typeof ssz.BeaconState>;
|
|
17
|
-
|
|
18
|
-
export type LightClientHeader = ValueOf<typeof ssz.LightClientHeader>;
|
|
19
|
-
export type LightClientBootstrap = ValueOf<typeof ssz.LightClientBootstrap>;
|
|
20
|
-
export type LightClientUpdate = ValueOf<typeof ssz.LightClientUpdate>;
|
|
21
|
-
export type LightClientFinalityUpdate = ValueOf<typeof ssz.LightClientFinalityUpdate>;
|
|
22
|
-
export type LightClientOptimisticUpdate = ValueOf<typeof ssz.LightClientOptimisticUpdate>;
|
|
23
|
-
export type LightClientStore = ValueOf<typeof ssz.LightClientStore>;
|
|
24
|
-
export type LightClientUpdatesByRange = ValueOf<typeof ssz.LightClientUpdatesByRange>;
|
package/src/bellatrix/index.ts
DELETED
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
import {ByteListType, ByteVectorType, ContainerType, ListCompositeType} from "@chainsafe/ssz";
|
|
2
|
-
import {
|
|
3
|
-
BYTES_PER_LOGS_BLOOM,
|
|
4
|
-
HISTORICAL_ROOTS_LIMIT,
|
|
5
|
-
MAX_BYTES_PER_TRANSACTION,
|
|
6
|
-
MAX_EXTRA_DATA_BYTES,
|
|
7
|
-
MAX_TRANSACTIONS_PER_PAYLOAD,
|
|
8
|
-
} from "@lodestar/params";
|
|
9
|
-
import {ssz as altairSsz} from "../altair/index.js";
|
|
10
|
-
import {ssz as phase0Ssz} from "../phase0/index.js";
|
|
11
|
-
import {ssz as primitiveSsz} from "../primitive/index.js";
|
|
12
|
-
import {stringType} from "../utils/stringType.js";
|
|
13
|
-
|
|
14
|
-
const {
|
|
15
|
-
Bytes32,
|
|
16
|
-
UintNum64,
|
|
17
|
-
Slot,
|
|
18
|
-
ValidatorIndex,
|
|
19
|
-
Root,
|
|
20
|
-
BLSSignature,
|
|
21
|
-
UintBn256: Uint256,
|
|
22
|
-
BLSPubkey,
|
|
23
|
-
ExecutionAddress,
|
|
24
|
-
} = primitiveSsz;
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* ByteList[MAX_BYTES_PER_TRANSACTION]
|
|
28
|
-
*
|
|
29
|
-
* Spec v1.0.1
|
|
30
|
-
*/
|
|
31
|
-
export const Transaction = new ByteListType(MAX_BYTES_PER_TRANSACTION);
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Union[OpaqueTransaction]
|
|
35
|
-
*
|
|
36
|
-
* Spec v1.0.1
|
|
37
|
-
*/
|
|
38
|
-
export const Transactions = new ListCompositeType(Transaction, MAX_TRANSACTIONS_PER_PAYLOAD);
|
|
39
|
-
|
|
40
|
-
export const CommonExecutionPayloadType = new ContainerType({
|
|
41
|
-
parentHash: Root,
|
|
42
|
-
feeRecipient: ExecutionAddress,
|
|
43
|
-
stateRoot: Bytes32,
|
|
44
|
-
receiptsRoot: Bytes32,
|
|
45
|
-
logsBloom: new ByteVectorType(BYTES_PER_LOGS_BLOOM),
|
|
46
|
-
prevRandao: Bytes32,
|
|
47
|
-
blockNumber: UintNum64,
|
|
48
|
-
gasLimit: UintNum64,
|
|
49
|
-
gasUsed: UintNum64,
|
|
50
|
-
timestamp: UintNum64,
|
|
51
|
-
// TODO: if there is perf issue, consider making ByteListType
|
|
52
|
-
extraData: new ByteListType(MAX_EXTRA_DATA_BYTES),
|
|
53
|
-
baseFeePerGas: Uint256,
|
|
54
|
-
blockHash: Root,
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
export const ExecutionPayload = new ContainerType(
|
|
58
|
-
{
|
|
59
|
-
...CommonExecutionPayloadType.fields,
|
|
60
|
-
transactions: Transactions,
|
|
61
|
-
},
|
|
62
|
-
{typeName: "ExecutionPayload", jsonCase: "eth2"}
|
|
63
|
-
);
|
|
64
|
-
|
|
65
|
-
export const ExecutionPayloadHeader = new ContainerType(
|
|
66
|
-
{
|
|
67
|
-
...CommonExecutionPayloadType.fields,
|
|
68
|
-
transactionsRoot: Root,
|
|
69
|
-
},
|
|
70
|
-
{typeName: "ExecutionPayloadHeader", jsonCase: "eth2"}
|
|
71
|
-
);
|
|
72
|
-
|
|
73
|
-
export const BeaconBlockBody = new ContainerType(
|
|
74
|
-
{
|
|
75
|
-
...altairSsz.BeaconBlockBody.fields,
|
|
76
|
-
executionPayload: ExecutionPayload,
|
|
77
|
-
},
|
|
78
|
-
{typeName: "BeaconBlockBody", jsonCase: "eth2", cachePermanentRootStruct: true}
|
|
79
|
-
);
|
|
80
|
-
|
|
81
|
-
export const BeaconBlock = new ContainerType(
|
|
82
|
-
{
|
|
83
|
-
slot: Slot,
|
|
84
|
-
proposerIndex: ValidatorIndex,
|
|
85
|
-
// Reclare expandedType() with altair block and altair state
|
|
86
|
-
parentRoot: Root,
|
|
87
|
-
stateRoot: Root,
|
|
88
|
-
body: BeaconBlockBody,
|
|
89
|
-
},
|
|
90
|
-
{typeName: "BeaconBlock", jsonCase: "eth2", cachePermanentRootStruct: true}
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
export const SignedBeaconBlock = new ContainerType(
|
|
94
|
-
{
|
|
95
|
-
message: BeaconBlock,
|
|
96
|
-
signature: BLSSignature,
|
|
97
|
-
},
|
|
98
|
-
{typeName: "SignedBeaconBlock", jsonCase: "eth2"}
|
|
99
|
-
);
|
|
100
|
-
|
|
101
|
-
export const PowBlock = new ContainerType(
|
|
102
|
-
{
|
|
103
|
-
blockHash: Root,
|
|
104
|
-
parentHash: Root,
|
|
105
|
-
totalDifficulty: Uint256,
|
|
106
|
-
},
|
|
107
|
-
{typeName: "PowBlock", jsonCase: "eth2"}
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
// we don't reuse phase0.BeaconState fields since we need to replace some keys
|
|
111
|
-
// and we cannot keep order doing that
|
|
112
|
-
export const BeaconState = new ContainerType(
|
|
113
|
-
{
|
|
114
|
-
genesisTime: UintNum64,
|
|
115
|
-
genesisValidatorsRoot: Root,
|
|
116
|
-
slot: primitiveSsz.Slot,
|
|
117
|
-
fork: phase0Ssz.Fork,
|
|
118
|
-
// History
|
|
119
|
-
latestBlockHeader: phase0Ssz.BeaconBlockHeader,
|
|
120
|
-
blockRoots: phase0Ssz.HistoricalBlockRoots,
|
|
121
|
-
stateRoots: phase0Ssz.HistoricalStateRoots,
|
|
122
|
-
historicalRoots: new ListCompositeType(Root, HISTORICAL_ROOTS_LIMIT),
|
|
123
|
-
// Eth1
|
|
124
|
-
eth1Data: phase0Ssz.Eth1Data,
|
|
125
|
-
eth1DataVotes: phase0Ssz.Eth1DataVotes,
|
|
126
|
-
eth1DepositIndex: UintNum64,
|
|
127
|
-
// Registry
|
|
128
|
-
validators: phase0Ssz.Validators,
|
|
129
|
-
balances: phase0Ssz.Balances,
|
|
130
|
-
randaoMixes: phase0Ssz.RandaoMixes,
|
|
131
|
-
// Slashings
|
|
132
|
-
slashings: phase0Ssz.Slashings,
|
|
133
|
-
// Participation
|
|
134
|
-
previousEpochParticipation: altairSsz.EpochParticipation,
|
|
135
|
-
currentEpochParticipation: altairSsz.EpochParticipation,
|
|
136
|
-
// Finality
|
|
137
|
-
justificationBits: phase0Ssz.JustificationBits,
|
|
138
|
-
previousJustifiedCheckpoint: phase0Ssz.Checkpoint,
|
|
139
|
-
currentJustifiedCheckpoint: phase0Ssz.Checkpoint,
|
|
140
|
-
finalizedCheckpoint: phase0Ssz.Checkpoint,
|
|
141
|
-
// Inactivity
|
|
142
|
-
inactivityScores: altairSsz.InactivityScores,
|
|
143
|
-
// Sync
|
|
144
|
-
currentSyncCommittee: altairSsz.SyncCommittee,
|
|
145
|
-
nextSyncCommittee: altairSsz.SyncCommittee,
|
|
146
|
-
// Execution
|
|
147
|
-
latestExecutionPayloadHeader: ExecutionPayloadHeader, // [New in Merge]
|
|
148
|
-
},
|
|
149
|
-
{typeName: "BeaconState", jsonCase: "eth2"}
|
|
150
|
-
);
|
|
151
|
-
|
|
152
|
-
export const BlindedBeaconBlockBody = new ContainerType(
|
|
153
|
-
{
|
|
154
|
-
...altairSsz.BeaconBlockBody.fields,
|
|
155
|
-
executionPayloadHeader: ExecutionPayloadHeader,
|
|
156
|
-
},
|
|
157
|
-
{typeName: "BlindedBeaconBlockBody", jsonCase: "eth2", cachePermanentRootStruct: true}
|
|
158
|
-
);
|
|
159
|
-
|
|
160
|
-
export const BlindedBeaconBlock = new ContainerType(
|
|
161
|
-
{
|
|
162
|
-
slot: Slot,
|
|
163
|
-
proposerIndex: ValidatorIndex,
|
|
164
|
-
// Reclare expandedType() with altair block and altair state
|
|
165
|
-
parentRoot: Root,
|
|
166
|
-
stateRoot: Root,
|
|
167
|
-
body: BlindedBeaconBlockBody,
|
|
168
|
-
},
|
|
169
|
-
{typeName: "BlindedBeaconBlock", jsonCase: "eth2", cachePermanentRootStruct: true}
|
|
170
|
-
);
|
|
171
|
-
|
|
172
|
-
export const SignedBlindedBeaconBlock = new ContainerType(
|
|
173
|
-
{
|
|
174
|
-
message: BlindedBeaconBlock,
|
|
175
|
-
signature: BLSSignature,
|
|
176
|
-
},
|
|
177
|
-
{typeName: "SignedBlindedBeaconBlock", jsonCase: "eth2"}
|
|
178
|
-
);
|
|
179
|
-
|
|
180
|
-
export const ValidatorRegistrationV1 = new ContainerType(
|
|
181
|
-
{
|
|
182
|
-
feeRecipient: ExecutionAddress,
|
|
183
|
-
gasLimit: UintNum64,
|
|
184
|
-
timestamp: UintNum64,
|
|
185
|
-
pubkey: BLSPubkey,
|
|
186
|
-
},
|
|
187
|
-
{typeName: "ValidatorRegistrationV1", jsonCase: "eth2"}
|
|
188
|
-
);
|
|
189
|
-
|
|
190
|
-
export const SignedValidatorRegistrationV1 = new ContainerType(
|
|
191
|
-
{
|
|
192
|
-
message: ValidatorRegistrationV1,
|
|
193
|
-
signature: BLSSignature,
|
|
194
|
-
},
|
|
195
|
-
{typeName: "SignedValidatorRegistrationV1", jsonCase: "eth2"}
|
|
196
|
-
);
|
|
197
|
-
|
|
198
|
-
export const BuilderBid = new ContainerType(
|
|
199
|
-
{
|
|
200
|
-
header: ExecutionPayloadHeader,
|
|
201
|
-
value: Uint256,
|
|
202
|
-
pubkey: BLSPubkey,
|
|
203
|
-
},
|
|
204
|
-
{typeName: "BuilderBid", jsonCase: "eth2"}
|
|
205
|
-
);
|
|
206
|
-
|
|
207
|
-
export const SignedBuilderBid = new ContainerType(
|
|
208
|
-
{
|
|
209
|
-
message: BuilderBid,
|
|
210
|
-
signature: BLSSignature,
|
|
211
|
-
},
|
|
212
|
-
{typeName: "SignedBuilderBid", jsonCase: "eth2"}
|
|
213
|
-
);
|
|
214
|
-
|
|
215
|
-
// PayloadAttributes primarily for SSE event
|
|
216
|
-
export const PayloadAttributes = new ContainerType(
|
|
217
|
-
{timestamp: UintNum64, prevRandao: Bytes32, suggestedFeeRecipient: stringType},
|
|
218
|
-
{typeName: "PayloadAttributes", jsonCase: "eth2"}
|
|
219
|
-
);
|
|
220
|
-
|
|
221
|
-
export const SSEPayloadAttributesCommon = new ContainerType(
|
|
222
|
-
{
|
|
223
|
-
proposerIndex: UintNum64,
|
|
224
|
-
proposalSlot: Slot,
|
|
225
|
-
parentBlockNumber: UintNum64,
|
|
226
|
-
parentBlockRoot: Root,
|
|
227
|
-
parentBlockHash: Root,
|
|
228
|
-
},
|
|
229
|
-
{typeName: "SSEPayloadAttributesCommon", jsonCase: "eth2"}
|
|
230
|
-
);
|
|
231
|
-
|
|
232
|
-
export const SSEPayloadAttributes = new ContainerType(
|
|
233
|
-
{
|
|
234
|
-
...SSEPayloadAttributesCommon.fields,
|
|
235
|
-
payloadAttributes: PayloadAttributes,
|
|
236
|
-
},
|
|
237
|
-
{typeName: "SSEPayloadAttributes", jsonCase: "eth2"}
|
|
238
|
-
);
|
package/src/bellatrix/types.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import {ValueOf} from "@chainsafe/ssz";
|
|
2
|
-
import * as ssz from "./sszTypes.js";
|
|
3
|
-
|
|
4
|
-
export type Transaction = ValueOf<typeof ssz.Transaction>;
|
|
5
|
-
export type Transactions = ValueOf<typeof ssz.Transactions>;
|
|
6
|
-
export type ExecutionPayload = ValueOf<typeof ssz.ExecutionPayload>;
|
|
7
|
-
export type ExecutionPayloadHeader = ValueOf<typeof ssz.ExecutionPayloadHeader>;
|
|
8
|
-
export type BeaconBlockBody = ValueOf<typeof ssz.BeaconBlockBody>;
|
|
9
|
-
export type BeaconBlock = ValueOf<typeof ssz.BeaconBlock>;
|
|
10
|
-
export type SignedBeaconBlock = ValueOf<typeof ssz.SignedBeaconBlock>;
|
|
11
|
-
export type BeaconState = ValueOf<typeof ssz.BeaconState>;
|
|
12
|
-
export type PowBlock = ValueOf<typeof ssz.PowBlock>;
|
|
13
|
-
|
|
14
|
-
export type BlindedBeaconBlockBody = ValueOf<typeof ssz.BlindedBeaconBlockBody>;
|
|
15
|
-
export type BlindedBeaconBlock = ValueOf<typeof ssz.BlindedBeaconBlock>;
|
|
16
|
-
export type SignedBlindedBeaconBlock = ValueOf<typeof ssz.SignedBlindedBeaconBlock>;
|
|
17
|
-
|
|
18
|
-
export type ValidatorRegistrationV1 = ValueOf<typeof ssz.ValidatorRegistrationV1>;
|
|
19
|
-
export type SignedValidatorRegistrationV1 = ValueOf<typeof ssz.SignedValidatorRegistrationV1>;
|
|
20
|
-
export type BuilderBid = ValueOf<typeof ssz.BuilderBid>;
|
|
21
|
-
export type SignedBuilderBid = ValueOf<typeof ssz.SignedBuilderBid>;
|
|
22
|
-
export type SSEPayloadAttributes = ValueOf<typeof ssz.SSEPayloadAttributes>;
|
|
23
|
-
|
|
24
|
-
export type FullOrBlindedExecutionPayload = ExecutionPayload | ExecutionPayloadHeader;
|