@lodestar/types 1.30.0-dev.dd729f5ece → 1.30.0-dev.fa898bb319
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/fulu/index.d.ts +5 -0
- package/lib/fulu/index.js +5 -0
- package/lib/fulu/index.js.map +1 -0
- package/lib/fulu/sszTypes.d.ts +65 -0
- package/lib/fulu/sszTypes.js +41 -0
- package/lib/fulu/sszTypes.js.map +1 -0
- package/lib/fulu/types.d.ts +14 -0
- package/lib/fulu/types.js +2 -0
- package/lib/fulu/types.js.map +1 -0
- package/lib/primitive/sszTypes.d.ts +3 -0
- package/lib/primitive/sszTypes.js +3 -0
- package/lib/primitive/sszTypes.js.map +1 -1
- package/lib/primitive/types.d.ts +3 -0
- package/lib/sszTypes.d.ts +13003 -12
- package/lib/sszTypes.js +23 -14
- package/lib/sszTypes.js.map +1 -1
- package/lib/types.d.ts +5 -3
- package/lib/types.js +1 -0
- package/lib/types.js.map +1 -1
- package/package.json +4 -6
package/lib/sszTypes.js
CHANGED
|
@@ -1,25 +1,34 @@
|
|
|
1
1
|
import { ForkName } from "@lodestar/params";
|
|
2
|
-
import { ssz as
|
|
3
|
-
import { ssz as
|
|
4
|
-
import { ssz as
|
|
5
|
-
import { ssz as
|
|
6
|
-
import { ssz as
|
|
7
|
-
import { ssz as
|
|
2
|
+
import { ssz as altairSsz } from "./altair/index.js";
|
|
3
|
+
import { ssz as bellatrixSsz } from "./bellatrix/index.js";
|
|
4
|
+
import { ssz as capellaSsz } from "./capella/index.js";
|
|
5
|
+
import { ssz as denebSsz } from "./deneb/index.js";
|
|
6
|
+
import { ssz as electraSsz } from "./electra/index.js";
|
|
7
|
+
import { ssz as fuluSsz } from "./fulu/index.js";
|
|
8
|
+
import { ssz as phase0Ssz } from "./phase0/index.js";
|
|
8
9
|
export * from "./primitive/sszTypes.js";
|
|
9
|
-
export { phase0, altair, bellatrix, capella, deneb, electra, electra as fulu };
|
|
10
10
|
/**
|
|
11
11
|
* Index the ssz types that differ by fork
|
|
12
12
|
* A record of AllForksSSZTypes indexed by fork
|
|
13
13
|
*/
|
|
14
14
|
const typesByFork = {
|
|
15
|
-
[ForkName.phase0]: { ...
|
|
16
|
-
[ForkName.altair]: { ...
|
|
17
|
-
[ForkName.bellatrix]: { ...
|
|
18
|
-
[ForkName.capella]: { ...
|
|
19
|
-
[ForkName.deneb]: { ...
|
|
20
|
-
[ForkName.electra]: { ...
|
|
21
|
-
[ForkName.fulu]: { ...
|
|
15
|
+
[ForkName.phase0]: { ...phase0Ssz },
|
|
16
|
+
[ForkName.altair]: { ...phase0Ssz, ...altairSsz },
|
|
17
|
+
[ForkName.bellatrix]: { ...phase0Ssz, ...altairSsz, ...bellatrixSsz },
|
|
18
|
+
[ForkName.capella]: { ...phase0Ssz, ...altairSsz, ...bellatrixSsz, ...capellaSsz },
|
|
19
|
+
[ForkName.deneb]: { ...phase0Ssz, ...altairSsz, ...bellatrixSsz, ...capellaSsz, ...denebSsz },
|
|
20
|
+
[ForkName.electra]: { ...phase0Ssz, ...altairSsz, ...bellatrixSsz, ...capellaSsz, ...denebSsz, ...electraSsz },
|
|
21
|
+
[ForkName.fulu]: { ...phase0Ssz, ...altairSsz, ...bellatrixSsz, ...capellaSsz, ...denebSsz, ...electraSsz, ...fuluSsz },
|
|
22
22
|
};
|
|
23
|
+
// Export these types to ensure that each fork is a superset of the previous one (with overridden types obviously)
|
|
24
|
+
// This allows us to only declare types that change in each fork in each fork subdirectory
|
|
25
|
+
export const phase0 = typesByFork[ForkName.phase0];
|
|
26
|
+
export const altair = typesByFork[ForkName.altair];
|
|
27
|
+
export const bellatrix = typesByFork[ForkName.bellatrix];
|
|
28
|
+
export const capella = typesByFork[ForkName.capella];
|
|
29
|
+
export const deneb = typesByFork[ForkName.deneb];
|
|
30
|
+
export const electra = typesByFork[ForkName.electra];
|
|
31
|
+
export const fulu = typesByFork[ForkName.fulu];
|
|
23
32
|
export function sszTypesFor(fork, typeName) {
|
|
24
33
|
return (typeName === undefined ? typesByFork[fork] : typesByFork[fork][typeName]);
|
|
25
34
|
}
|
package/lib/sszTypes.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sszTypes.js","sourceRoot":"","sources":["../src/sszTypes.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAC,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"sszTypes.js","sourceRoot":"","sources":["../src/sszTypes.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAC,GAAG,IAAI,SAAS,EAAC,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAC,GAAG,IAAI,YAAY,EAAC,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAC,GAAG,IAAI,UAAU,EAAC,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAC,GAAG,IAAI,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAC,GAAG,IAAI,UAAU,EAAC,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAC,GAAG,IAAI,OAAO,EAAC,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAC,GAAG,IAAI,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAEnD,cAAc,yBAAyB,CAAC;AAExC;;;GAGG;AACH,MAAM,WAAW,GAAG;IAClB,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAC,GAAG,SAAS,EAAC;IACjC,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,EAAC,GAAG,SAAS,EAAE,GAAG,SAAS,EAAC;IAC/C,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,EAAC,GAAG,SAAS,EAAE,GAAG,SAAS,EAAE,GAAG,YAAY,EAAC;IACnE,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,EAAC,GAAG,SAA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CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,QAAmC,CAAC,CAC/E,CAAC;AACzB,CAAC"}
|
package/lib/types.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { ts as bellatrix } from "./bellatrix/index.js";
|
|
|
4
4
|
import { ts as capella } from "./capella/index.js";
|
|
5
5
|
import { ts as deneb } from "./deneb/index.js";
|
|
6
6
|
import { ts as electra } from "./electra/index.js";
|
|
7
|
+
import { ts as fulu } from "./fulu/index.js";
|
|
7
8
|
import { ts as phase0 } from "./phase0/index.js";
|
|
8
9
|
import { Slot } from "./primitive/types.js";
|
|
9
10
|
export * from "./primitive/types.js";
|
|
@@ -13,6 +14,7 @@ export { ts as bellatrix } from "./bellatrix/index.js";
|
|
|
13
14
|
export { ts as capella } from "./capella/index.js";
|
|
14
15
|
export { ts as deneb } from "./deneb/index.js";
|
|
15
16
|
export { ts as electra } from "./electra/index.js";
|
|
17
|
+
export { ts as fulu } from "./fulu/index.js";
|
|
16
18
|
/** Common non-spec type to represent roots as strings */
|
|
17
19
|
export type RootHex = string;
|
|
18
20
|
/** Handy enum to represent the block production source */
|
|
@@ -225,7 +227,7 @@ type TypesByFork = {
|
|
|
225
227
|
BeaconBlockBody: electra.BeaconBlockBody;
|
|
226
228
|
BeaconState: electra.BeaconState;
|
|
227
229
|
SignedBeaconBlock: electra.SignedBeaconBlock;
|
|
228
|
-
Metadata:
|
|
230
|
+
Metadata: fulu.Metadata;
|
|
229
231
|
LightClientHeader: deneb.LightClientHeader;
|
|
230
232
|
LightClientBootstrap: electra.LightClientBootstrap;
|
|
231
233
|
LightClientUpdate: electra.LightClientUpdate;
|
|
@@ -235,8 +237,8 @@ type TypesByFork = {
|
|
|
235
237
|
BlindedBeaconBlock: electra.BlindedBeaconBlock;
|
|
236
238
|
BlindedBeaconBlockBody: electra.BlindedBeaconBlockBody;
|
|
237
239
|
SignedBlindedBeaconBlock: electra.SignedBlindedBeaconBlock;
|
|
238
|
-
ExecutionPayload:
|
|
239
|
-
ExecutionPayloadHeader:
|
|
240
|
+
ExecutionPayload: electra.ExecutionPayload;
|
|
241
|
+
ExecutionPayloadHeader: electra.ExecutionPayloadHeader;
|
|
240
242
|
BuilderBid: electra.BuilderBid;
|
|
241
243
|
SignedBuilderBid: electra.SignedBuilderBid;
|
|
242
244
|
SSEPayloadAttributes: electra.SSEPayloadAttributes;
|
package/lib/types.js
CHANGED
|
@@ -6,6 +6,7 @@ export { ts as bellatrix } from "./bellatrix/index.js";
|
|
|
6
6
|
export { ts as capella } from "./capella/index.js";
|
|
7
7
|
export { ts as deneb } from "./deneb/index.js";
|
|
8
8
|
export { ts as electra } from "./electra/index.js";
|
|
9
|
+
export { ts as fulu } from "./fulu/index.js";
|
|
9
10
|
/** Handy enum to represent the block production source */
|
|
10
11
|
export var ProducedBlockSource;
|
|
11
12
|
(function (ProducedBlockSource) {
|
package/lib/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,GAMT,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,QAAQ,GAMT,MAAM,kBAAkB,CAAC;AAU1B,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAC,EAAE,IAAI,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAC,EAAE,IAAI,MAAM,EAAC,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAC,EAAE,IAAI,SAAS,EAAC,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAC,EAAE,IAAI,OAAO,EAAC,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAC,EAAE,IAAI,KAAK,EAAC,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAC,EAAE,IAAI,OAAO,EAAC,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAC,EAAE,IAAI,IAAI,EAAC,MAAM,iBAAiB,CAAC;AAK3C,0DAA0D;AAC1D,MAAM,CAAN,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC7B,0CAAmB,CAAA;IACnB,wCAAiB,CAAA;AACnB,CAAC,EAHW,mBAAmB,KAAnB,mBAAmB,QAG9B"}
|
package/package.json
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"bugs": {
|
|
12
12
|
"url": "https://github.com/ChainSafe/lodestar/issues"
|
|
13
13
|
},
|
|
14
|
-
"version": "1.30.0-dev.
|
|
14
|
+
"version": "1.30.0-dev.fa898bb319",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": {
|
|
@@ -62,16 +62,14 @@
|
|
|
62
62
|
"lint": "biome check src/ test/",
|
|
63
63
|
"lint:fix": "yarn run lint --write",
|
|
64
64
|
"test": "yarn test:unit",
|
|
65
|
-
"test:
|
|
66
|
-
"test:constants:mainnet": "vitest run --project constants-mainnet",
|
|
67
|
-
"test:unit": "wrapper() { yarn test:constants:minimal $@ && yarn test:constants:mainnet $@ && LODESTAR_PRESET=mainnet vitest run --project unit $@; }; wrapper",
|
|
65
|
+
"test:unit": "vitest run --project unit --project unit-minimal",
|
|
68
66
|
"test:browsers": "vitest run --project browser",
|
|
69
67
|
"check-readme": "typescript-docs-verifier"
|
|
70
68
|
},
|
|
71
69
|
"types": "lib/index.d.ts",
|
|
72
70
|
"dependencies": {
|
|
73
71
|
"@chainsafe/ssz": "^1.2.0",
|
|
74
|
-
"@lodestar/params": "1.30.0-dev.
|
|
72
|
+
"@lodestar/params": "1.30.0-dev.fa898bb319",
|
|
75
73
|
"ethereum-cryptography": "^2.0.0"
|
|
76
74
|
},
|
|
77
75
|
"keywords": [
|
|
@@ -80,5 +78,5 @@
|
|
|
80
78
|
"beacon",
|
|
81
79
|
"blockchain"
|
|
82
80
|
],
|
|
83
|
-
"gitHead": "
|
|
81
|
+
"gitHead": "9bd944add3247a4c2d2125c9b542d391468a2ad8"
|
|
84
82
|
}
|