@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/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
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
import {BitVectorType, ContainerType, ListBasicType, ListCompositeType, VectorCompositeType} from "@chainsafe/ssz";
|
|
2
|
-
import {
|
|
3
|
-
BUILDER_PENDING_WITHDRAWALS_LIMIT,
|
|
4
|
-
HISTORICAL_ROOTS_LIMIT,
|
|
5
|
-
MAX_PAYLOAD_ATTESTATIONS,
|
|
6
|
-
NUMBER_OF_COLUMNS,
|
|
7
|
-
PTC_SIZE,
|
|
8
|
-
SLOTS_PER_EPOCH,
|
|
9
|
-
SLOTS_PER_HISTORICAL_ROOT,
|
|
10
|
-
} from "@lodestar/params";
|
|
11
|
-
import {ssz as altairSsz} from "../altair/index.js";
|
|
12
|
-
import {ssz as capellaSsz} from "../capella/index.js";
|
|
13
|
-
import {ssz as denebSsz} from "../deneb/index.js";
|
|
14
|
-
import {ssz as electraSsz} from "../electra/index.js";
|
|
15
|
-
import {ssz as fuluSsz} from "../fulu/index.js";
|
|
16
|
-
import {ssz as phase0Ssz} from "../phase0/index.js";
|
|
17
|
-
import {ssz as primitiveSsz} from "../primitive/index.js";
|
|
18
|
-
|
|
19
|
-
// biome-ignore lint/suspicious/noShadowRestrictedNames: We explicitly want `Boolean` name to be imported
|
|
20
|
-
const {Gwei, ExecutionAddress, ValidatorIndex, Epoch, BLSSignature, Bytes32, Root, Slot, Boolean, UintBn64, UintNum64} =
|
|
21
|
-
primitiveSsz;
|
|
22
|
-
|
|
23
|
-
export const BuilderPendingWithdrawal = new ContainerType(
|
|
24
|
-
{
|
|
25
|
-
feeRecipient: ExecutionAddress,
|
|
26
|
-
amount: Gwei,
|
|
27
|
-
builderIndex: ValidatorIndex,
|
|
28
|
-
withdrawableEpoch: Epoch,
|
|
29
|
-
},
|
|
30
|
-
{typeName: "BuilderPendingWithdrawal", jsonCase: "eth2"}
|
|
31
|
-
);
|
|
32
|
-
|
|
33
|
-
export const BuilderPendingPayment = new ContainerType(
|
|
34
|
-
{
|
|
35
|
-
weight: Gwei,
|
|
36
|
-
withdrawal: BuilderPendingWithdrawal,
|
|
37
|
-
},
|
|
38
|
-
{typeName: "BuilderPendingPayment", jsonCase: "eth2"}
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
export const PayloadAttestationData = new ContainerType(
|
|
42
|
-
{
|
|
43
|
-
beaconBlockRoot: Root,
|
|
44
|
-
slot: Slot,
|
|
45
|
-
payloadPresent: Boolean,
|
|
46
|
-
blobDataAvailable: Boolean,
|
|
47
|
-
},
|
|
48
|
-
{typeName: "PayloadAttestationData", jsonCase: "eth2"}
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
export const PayloadAttestation = new ContainerType(
|
|
52
|
-
{
|
|
53
|
-
aggregationBits: new BitVectorType(PTC_SIZE),
|
|
54
|
-
data: PayloadAttestationData,
|
|
55
|
-
signature: BLSSignature,
|
|
56
|
-
},
|
|
57
|
-
{typeName: "PayloadAttestation", jsonCase: "eth2"}
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
export const PayloadAttestationMessage = new ContainerType(
|
|
61
|
-
{
|
|
62
|
-
validatorIndex: ValidatorIndex,
|
|
63
|
-
data: PayloadAttestationData,
|
|
64
|
-
signature: BLSSignature,
|
|
65
|
-
},
|
|
66
|
-
{typeName: "PayloadAttestationMessage", jsonCase: "eth2"}
|
|
67
|
-
);
|
|
68
|
-
|
|
69
|
-
export const IndexedPayloadAttestation = new ContainerType(
|
|
70
|
-
{
|
|
71
|
-
attestingIndices: new ListBasicType(ValidatorIndex, PTC_SIZE),
|
|
72
|
-
data: PayloadAttestationData,
|
|
73
|
-
signature: BLSSignature,
|
|
74
|
-
},
|
|
75
|
-
{typeName: "IndexedPayloadAttestation", jsonCase: "eth2"}
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
export const ExecutionPayloadBid = new ContainerType(
|
|
79
|
-
{
|
|
80
|
-
parentBlockHash: Bytes32,
|
|
81
|
-
parentBlockRoot: Root,
|
|
82
|
-
blockHash: Bytes32,
|
|
83
|
-
feeRecipient: ExecutionAddress,
|
|
84
|
-
gasLimit: UintBn64,
|
|
85
|
-
builderIndex: ValidatorIndex,
|
|
86
|
-
slot: Slot,
|
|
87
|
-
value: Gwei,
|
|
88
|
-
blobKzgCommitmentsRoot: Root,
|
|
89
|
-
},
|
|
90
|
-
{typeName: "ExecutionPayloadBid", jsonCase: "eth2"}
|
|
91
|
-
);
|
|
92
|
-
|
|
93
|
-
export const SignedExecutionPayloadBid = new ContainerType(
|
|
94
|
-
{
|
|
95
|
-
message: ExecutionPayloadBid,
|
|
96
|
-
signature: BLSSignature,
|
|
97
|
-
},
|
|
98
|
-
{typeName: "SignedExecutionPayloadBid", jsonCase: "eth2"}
|
|
99
|
-
);
|
|
100
|
-
|
|
101
|
-
export const ExecutionPayloadEnvelope = new ContainerType(
|
|
102
|
-
{
|
|
103
|
-
payload: electraSsz.ExecutionPayload,
|
|
104
|
-
executionRequests: electraSsz.ExecutionRequests,
|
|
105
|
-
builderIndex: ValidatorIndex,
|
|
106
|
-
beaconBlockRoot: Root,
|
|
107
|
-
slot: Slot,
|
|
108
|
-
blobKzgCommitments: denebSsz.BlobKzgCommitments,
|
|
109
|
-
stateRoot: Root,
|
|
110
|
-
},
|
|
111
|
-
{typeName: "ExecutionPayloadEnvelope", jsonCase: "eth2"}
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
export const SignedExecutionPayloadEnvelope = new ContainerType(
|
|
115
|
-
{
|
|
116
|
-
message: ExecutionPayloadEnvelope,
|
|
117
|
-
signature: BLSSignature,
|
|
118
|
-
},
|
|
119
|
-
{typeName: "SignedExecutionPayloadEnvelope", jsonCase: "eth2"}
|
|
120
|
-
);
|
|
121
|
-
|
|
122
|
-
export const BeaconBlockBody = new ContainerType(
|
|
123
|
-
{
|
|
124
|
-
randaoReveal: phase0Ssz.BeaconBlockBody.fields.randaoReveal,
|
|
125
|
-
eth1Data: phase0Ssz.BeaconBlockBody.fields.eth1Data,
|
|
126
|
-
graffiti: phase0Ssz.BeaconBlockBody.fields.graffiti,
|
|
127
|
-
proposerSlashings: phase0Ssz.BeaconBlockBody.fields.proposerSlashings,
|
|
128
|
-
attesterSlashings: electraSsz.BeaconBlockBody.fields.attesterSlashings,
|
|
129
|
-
attestations: electraSsz.BeaconBlockBody.fields.attestations,
|
|
130
|
-
deposits: phase0Ssz.BeaconBlockBody.fields.deposits,
|
|
131
|
-
voluntaryExits: phase0Ssz.BeaconBlockBody.fields.voluntaryExits,
|
|
132
|
-
syncAggregate: altairSsz.BeaconBlockBody.fields.syncAggregate,
|
|
133
|
-
// executionPayload: ExecutionPayload, // Removed in GLOAS:EIP7732
|
|
134
|
-
blsToExecutionChanges: capellaSsz.BeaconBlockBody.fields.blsToExecutionChanges,
|
|
135
|
-
// blobKzgCommitments: denebSsz.BeaconBlockBody.fields.blobKzgCommitments, // Removed in GLOAS:EIP7732
|
|
136
|
-
// executionRequests: ExecutionRequests, // Removed in GLOAS:EIP7732
|
|
137
|
-
signedExecutionPayloadBid: SignedExecutionPayloadBid, // New in GLOAS:EIP7732
|
|
138
|
-
payloadAttestations: new ListCompositeType(PayloadAttestation, MAX_PAYLOAD_ATTESTATIONS), // New in GLOAS:EIP7732
|
|
139
|
-
},
|
|
140
|
-
{typeName: "BeaconBlockBody", jsonCase: "eth2", cachePermanentRootStruct: true}
|
|
141
|
-
);
|
|
142
|
-
|
|
143
|
-
export const BeaconBlock = new ContainerType(
|
|
144
|
-
{
|
|
145
|
-
...fuluSsz.BeaconBlock.fields,
|
|
146
|
-
body: BeaconBlockBody, // Modified in GLOAS
|
|
147
|
-
},
|
|
148
|
-
{typeName: "BeaconBlock", jsonCase: "eth2", cachePermanentRootStruct: true}
|
|
149
|
-
);
|
|
150
|
-
|
|
151
|
-
export const SignedBeaconBlock = new ContainerType(
|
|
152
|
-
{
|
|
153
|
-
message: BeaconBlock, // Modified in GLOAS
|
|
154
|
-
signature: BLSSignature,
|
|
155
|
-
},
|
|
156
|
-
{typeName: "SignedBeaconBlock", jsonCase: "eth2"}
|
|
157
|
-
);
|
|
158
|
-
|
|
159
|
-
export const BeaconState = new ContainerType(
|
|
160
|
-
{
|
|
161
|
-
genesisTime: UintNum64,
|
|
162
|
-
genesisValidatorsRoot: Root,
|
|
163
|
-
slot: primitiveSsz.Slot,
|
|
164
|
-
fork: phase0Ssz.Fork,
|
|
165
|
-
// History
|
|
166
|
-
latestBlockHeader: phase0Ssz.BeaconBlockHeader,
|
|
167
|
-
blockRoots: phase0Ssz.HistoricalBlockRoots,
|
|
168
|
-
stateRoots: phase0Ssz.HistoricalStateRoots,
|
|
169
|
-
// historical_roots Frozen in Capella, replaced by historical_summaries
|
|
170
|
-
historicalRoots: new ListCompositeType(Root, HISTORICAL_ROOTS_LIMIT),
|
|
171
|
-
// Eth1
|
|
172
|
-
eth1Data: phase0Ssz.Eth1Data,
|
|
173
|
-
eth1DataVotes: phase0Ssz.Eth1DataVotes,
|
|
174
|
-
eth1DepositIndex: UintNum64,
|
|
175
|
-
// Registry
|
|
176
|
-
validators: phase0Ssz.Validators,
|
|
177
|
-
balances: phase0Ssz.Balances,
|
|
178
|
-
randaoMixes: phase0Ssz.RandaoMixes,
|
|
179
|
-
// Slashings
|
|
180
|
-
slashings: phase0Ssz.Slashings,
|
|
181
|
-
// Participation
|
|
182
|
-
previousEpochParticipation: altairSsz.EpochParticipation,
|
|
183
|
-
currentEpochParticipation: altairSsz.EpochParticipation,
|
|
184
|
-
// Finality
|
|
185
|
-
justificationBits: phase0Ssz.JustificationBits,
|
|
186
|
-
previousJustifiedCheckpoint: phase0Ssz.Checkpoint,
|
|
187
|
-
currentJustifiedCheckpoint: phase0Ssz.Checkpoint,
|
|
188
|
-
finalizedCheckpoint: phase0Ssz.Checkpoint,
|
|
189
|
-
// Inactivity
|
|
190
|
-
inactivityScores: altairSsz.InactivityScores,
|
|
191
|
-
// Sync
|
|
192
|
-
currentSyncCommittee: altairSsz.SyncCommittee,
|
|
193
|
-
nextSyncCommittee: altairSsz.SyncCommittee,
|
|
194
|
-
// Execution
|
|
195
|
-
// latestExecutionPayloadHeader: ExecutionPayloadHeader, // Removed in GLOAS:EIP7732
|
|
196
|
-
latestExecutionPayloadBid: ExecutionPayloadBid, // New in GLOAS:EIP7732
|
|
197
|
-
// Withdrawals
|
|
198
|
-
nextWithdrawalIndex: capellaSsz.BeaconState.fields.nextWithdrawalIndex,
|
|
199
|
-
nextWithdrawalValidatorIndex: capellaSsz.BeaconState.fields.nextWithdrawalValidatorIndex,
|
|
200
|
-
// Deep history valid from Capella onwards
|
|
201
|
-
historicalSummaries: capellaSsz.BeaconState.fields.historicalSummaries,
|
|
202
|
-
depositRequestsStartIndex: UintBn64,
|
|
203
|
-
depositBalanceToConsume: Gwei,
|
|
204
|
-
exitBalanceToConsume: Gwei,
|
|
205
|
-
earliestExitEpoch: Epoch,
|
|
206
|
-
consolidationBalanceToConsume: Gwei,
|
|
207
|
-
earliestConsolidationEpoch: Epoch,
|
|
208
|
-
pendingDeposits: electraSsz.BeaconState.fields.pendingDeposits,
|
|
209
|
-
pendingPartialWithdrawals: electraSsz.BeaconState.fields.pendingPartialWithdrawals,
|
|
210
|
-
pendingConsolidations: electraSsz.BeaconState.fields.pendingConsolidations,
|
|
211
|
-
proposerLookahead: fuluSsz.BeaconState.fields.proposerLookahead,
|
|
212
|
-
executionPayloadAvailability: new BitVectorType(SLOTS_PER_HISTORICAL_ROOT), // New in GLOAS:EIP7732
|
|
213
|
-
builderPendingPayments: new VectorCompositeType(BuilderPendingPayment, 2 * SLOTS_PER_EPOCH), // New in GLOAS:EIP7732
|
|
214
|
-
builderPendingWithdrawals: new ListCompositeType(BuilderPendingWithdrawal, BUILDER_PENDING_WITHDRAWALS_LIMIT), // New in GLOAS:EIP7732
|
|
215
|
-
latestBlockHash: Bytes32, // New in GLOAS:EIP7732
|
|
216
|
-
latestWithdrawalsRoot: Root, // New in GLOAS:EIP7732
|
|
217
|
-
},
|
|
218
|
-
{typeName: "BeaconState", jsonCase: "eth2"}
|
|
219
|
-
);
|
|
220
|
-
|
|
221
|
-
export const DataColumnSidecar = new ContainerType(
|
|
222
|
-
{
|
|
223
|
-
index: fuluSsz.DataColumnSidecar.fields.index,
|
|
224
|
-
column: fuluSsz.DataColumnSidecar.fields.column,
|
|
225
|
-
kzgCommitments: fuluSsz.DataColumnSidecar.fields.kzgCommitments,
|
|
226
|
-
kzgProofs: fuluSsz.DataColumnSidecar.fields.kzgProofs,
|
|
227
|
-
// signedBlockHeader: phase0Ssz.SignedBeaconBlockHeader, // Removed in GLOAS:EIP7732
|
|
228
|
-
// kzgCommitmentsInclusionProof: KzgCommitmentsInclusionProof, // Removed in GLOAS:EIP7732
|
|
229
|
-
beaconBlockRoot: Root, // New in GLOAS:EIP7732
|
|
230
|
-
},
|
|
231
|
-
{typeName: "DataColumnSidecar", jsonCase: "eth2"}
|
|
232
|
-
);
|
|
233
|
-
|
|
234
|
-
export const DataColumnSidecars = new ListCompositeType(DataColumnSidecar, NUMBER_OF_COLUMNS);
|
package/src/gloas/types.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {ValueOf} from "@chainsafe/ssz";
|
|
2
|
-
import * as ssz from "./sszTypes.js";
|
|
3
|
-
|
|
4
|
-
export type BuilderPendingWithdrawal = ValueOf<typeof ssz.BuilderPendingWithdrawal>;
|
|
5
|
-
export type BuilderPendingPayment = ValueOf<typeof ssz.BuilderPendingPayment>;
|
|
6
|
-
export type PayloadAttestationData = ValueOf<typeof ssz.PayloadAttestationData>;
|
|
7
|
-
export type PayloadAttestation = ValueOf<typeof ssz.PayloadAttestation>;
|
|
8
|
-
export type PayloadAttestationMessage = ValueOf<typeof ssz.PayloadAttestationMessage>;
|
|
9
|
-
export type IndexedPayloadAttestation = ValueOf<typeof ssz.IndexedPayloadAttestation>;
|
|
10
|
-
export type ExecutionPayloadBid = ValueOf<typeof ssz.ExecutionPayloadBid>;
|
|
11
|
-
export type SignedExecutionPayloadBid = ValueOf<typeof ssz.SignedExecutionPayloadBid>;
|
|
12
|
-
export type ExecutionPayloadEnvelope = ValueOf<typeof ssz.ExecutionPayloadEnvelope>;
|
|
13
|
-
export type SignedExecutionPayloadEnvelope = ValueOf<typeof ssz.SignedExecutionPayloadEnvelope>;
|
|
14
|
-
export type BeaconBlockBody = ValueOf<typeof ssz.BeaconBlockBody>;
|
|
15
|
-
export type BeaconBlock = ValueOf<typeof ssz.BeaconBlock>;
|
|
16
|
-
export type SignedBeaconBlock = ValueOf<typeof ssz.SignedBeaconBlock>;
|
|
17
|
-
export type BeaconState = ValueOf<typeof ssz.BeaconState>;
|
|
18
|
-
|
|
19
|
-
export type DataColumnSidecar = ValueOf<typeof ssz.DataColumnSidecar>;
|
|
20
|
-
export type DataColumnSidecars = ValueOf<typeof ssz.DataColumnSidecars>;
|
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";
|