@lodestar/types 1.35.0-dev.91dadf81de → 1.35.0-dev.955e9f89ed

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.
Files changed (103) hide show
  1. package/lib/altair/index.js.map +1 -1
  2. package/lib/altair/sszTypes.d.ts +1 -1
  3. package/lib/bellatrix/index.js.map +1 -1
  4. package/lib/bellatrix/sszTypes.d.ts +15 -15
  5. package/lib/capella/index.js.map +1 -1
  6. package/lib/capella/sszTypes.d.ts +41 -41
  7. package/lib/deneb/index.js.map +1 -1
  8. package/lib/deneb/sszTypes.d.ts +44 -44
  9. package/lib/electra/index.js.map +1 -1
  10. package/lib/electra/sszTypes.d.ts +67 -67
  11. package/lib/fulu/index.js.map +1 -1
  12. package/lib/fulu/sszTypes.d.ts +22 -22
  13. package/lib/fulu/sszTypes.js.map +1 -1
  14. package/lib/gloas/index.js.map +1 -1
  15. package/lib/gloas/sszTypes.d.ts +12 -12
  16. package/lib/index.d.ts +3 -4
  17. package/lib/index.js +4 -5
  18. package/lib/index.js.map +1 -1
  19. package/lib/phase0/index.d.ts +0 -1
  20. package/lib/phase0/index.js +0 -1
  21. package/lib/phase0/index.js.map +1 -1
  22. package/lib/sszTypes.d.ts +730 -730
  23. package/lib/types.d.ts +2 -2
  24. package/lib/types.js +2 -2
  25. package/lib/types.js.map +1 -1
  26. package/lib/utils/container.js.map +1 -1
  27. package/lib/utils/executionAddress.js +1 -1
  28. package/lib/utils/executionAddress.js.map +1 -1
  29. package/lib/utils/stringType.js +8 -5
  30. package/lib/utils/stringType.js.map +1 -1
  31. package/package.json +8 -17
  32. package/lib/altair/index.d.ts.map +0 -1
  33. package/lib/altair/sszTypes.d.ts.map +0 -1
  34. package/lib/altair/types.d.ts.map +0 -1
  35. package/lib/bellatrix/index.d.ts.map +0 -1
  36. package/lib/bellatrix/sszTypes.d.ts.map +0 -1
  37. package/lib/bellatrix/types.d.ts.map +0 -1
  38. package/lib/capella/index.d.ts.map +0 -1
  39. package/lib/capella/sszTypes.d.ts.map +0 -1
  40. package/lib/capella/types.d.ts.map +0 -1
  41. package/lib/deneb/index.d.ts.map +0 -1
  42. package/lib/deneb/sszTypes.d.ts.map +0 -1
  43. package/lib/deneb/types.d.ts.map +0 -1
  44. package/lib/electra/index.d.ts.map +0 -1
  45. package/lib/electra/sszTypes.d.ts.map +0 -1
  46. package/lib/electra/types.d.ts.map +0 -1
  47. package/lib/fulu/index.d.ts.map +0 -1
  48. package/lib/fulu/sszTypes.d.ts.map +0 -1
  49. package/lib/fulu/types.d.ts.map +0 -1
  50. package/lib/gloas/index.d.ts.map +0 -1
  51. package/lib/gloas/sszTypes.d.ts.map +0 -1
  52. package/lib/gloas/types.d.ts.map +0 -1
  53. package/lib/index.d.ts.map +0 -1
  54. package/lib/phase0/index.d.ts.map +0 -1
  55. package/lib/phase0/sszTypes.d.ts.map +0 -1
  56. package/lib/phase0/types.d.ts.map +0 -1
  57. package/lib/phase0/validator.d.ts.map +0 -1
  58. package/lib/primitive/index.d.ts.map +0 -1
  59. package/lib/primitive/sszTypes.d.ts.map +0 -1
  60. package/lib/primitive/types.d.ts.map +0 -1
  61. package/lib/sszTypes.d.ts.map +0 -1
  62. package/lib/types.d.ts.map +0 -1
  63. package/lib/utils/container.d.ts.map +0 -1
  64. package/lib/utils/executionAddress.d.ts.map +0 -1
  65. package/lib/utils/stringType.d.ts.map +0 -1
  66. package/lib/utils/typeguards.d.ts.map +0 -1
  67. package/lib/utils/validatorStatus.d.ts.map +0 -1
  68. package/src/altair/index.ts +0 -5
  69. package/src/altair/sszTypes.ts +0 -243
  70. package/src/altair/types.ts +0 -24
  71. package/src/bellatrix/index.ts +0 -5
  72. package/src/bellatrix/sszTypes.ts +0 -238
  73. package/src/bellatrix/types.ts +0 -24
  74. package/src/capella/index.ts +0 -5
  75. package/src/capella/sszTypes.ts +0 -281
  76. package/src/capella/types.ts +0 -33
  77. package/src/deneb/index.ts +0 -5
  78. package/src/deneb/sszTypes.ts +0 -329
  79. package/src/deneb/types.ts +0 -55
  80. package/src/electra/index.ts +0 -5
  81. package/src/electra/sszTypes.ts +0 -451
  82. package/src/electra/types.ts +0 -54
  83. package/src/fulu/index.ts +0 -5
  84. package/src/fulu/sszTypes.ts +0 -138
  85. package/src/fulu/types.ts +0 -31
  86. package/src/gloas/index.ts +0 -5
  87. package/src/gloas/sszTypes.ts +0 -5
  88. package/src/gloas/types.ts +0 -6
  89. package/src/index.ts +0 -15
  90. package/src/phase0/index.ts +0 -6
  91. package/src/phase0/sszTypes.ts +0 -514
  92. package/src/phase0/types.ts +0 -46
  93. package/src/phase0/validator.ts +0 -78
  94. package/src/primitive/index.ts +0 -3
  95. package/src/primitive/sszTypes.ts +0 -70
  96. package/src/primitive/types.ts +0 -53
  97. package/src/sszTypes.ts +0 -86
  98. package/src/types.ts +0 -375
  99. package/src/utils/container.ts +0 -38
  100. package/src/utils/executionAddress.ts +0 -48
  101. package/src/utils/stringType.ts +0 -58
  102. package/src/utils/typeguards.ts +0 -98
  103. package/src/utils/validatorStatus.ts +0 -52
@@ -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
- };
@@ -1,5 +0,0 @@
1
- export * from "./types.js";
2
-
3
- import * as ssz from "./sszTypes.js";
4
- import * as ts from "./types.js";
5
- export {ts, ssz};
@@ -1,5 +0,0 @@
1
- import {ssz as fuluSsz} from "../fulu/index.js";
2
-
3
- export const BeaconState = fuluSsz.BeaconState;
4
- export const BeaconBlock = fuluSsz.BeaconBlock;
5
- export const SignedBeaconBlock = fuluSsz.SignedBeaconBlock;
@@ -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";
@@ -1,6 +0,0 @@
1
- export * from "./types.js";
2
- export * from "./validator.js";
3
-
4
- import * as ssz from "./sszTypes.js";
5
- import * as ts from "./types.js";
6
- export {ts, ssz};