@lodestar/types 1.20.0-dev.85dc0ba06d → 1.20.0-dev.8cb08ff56f
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/README.md +3 -3
- package/lib/deneb/types.d.ts +3 -2
- package/lib/index.d.ts +3 -1
- package/lib/index.js +2 -1
- package/lib/index.js.map +1 -1
- package/lib/sszTypes.d.ts +15675 -3868
- package/lib/sszTypes.js +107 -11
- package/lib/sszTypes.js.map +1 -1
- package/lib/types.d.ts +154 -1
- package/lib/types.js +1 -1
- package/lib/types.js.map +1 -1
- package/lib/utils/typeguards.d.ts +10 -8
- package/lib/utils/typeguards.js +14 -10
- package/lib/utils/typeguards.js.map +1 -1
- package/package.json +3 -6
- package/lib/allForks/index.d.ts +0 -5
- package/lib/allForks/index.js +0 -7
- package/lib/allForks/index.js.map +0 -1
- package/lib/allForks/sszTypes.d.ts +0 -7302
- package/lib/allForks/sszTypes.js +0 -156
- package/lib/allForks/sszTypes.js.map +0 -1
- package/lib/allForks/types.d.ts +0 -144
- package/lib/allForks/types.js +0 -2
- package/lib/allForks/types.js.map +0 -1
package/README.md
CHANGED
|
@@ -67,13 +67,13 @@ import {Epoch, ssz} from "@lodestar/types";
|
|
|
67
67
|
const epoch: Epoch = ssz.Epoch.defaultValue();
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
In some cases, we need interfaces that accept types across all forks, like when the fork is not known ahead of time.
|
|
70
|
+
In some cases, we need interfaces that accept types across all forks, like when the fork is not known ahead of time. SSZ Types typed to these interfaces are also provided under an `allForks` namespace, but keyed by `ForkName`.
|
|
71
71
|
|
|
72
72
|
```typescript
|
|
73
73
|
import {ForkName} from "@lodestar/params";
|
|
74
|
-
import {
|
|
74
|
+
import {ssz, BeaconState} from "@lodestar/types";
|
|
75
75
|
|
|
76
|
-
const state:
|
|
76
|
+
const state: BeaconState<ForkName.phase0> = ssz.allForks[ForkName.phase0].BeaconState.defaultValue();
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
## License
|
package/lib/deneb/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ValueOf } from "@chainsafe/ssz";
|
|
2
|
-
import {
|
|
2
|
+
import { ForkName } from "@lodestar/params";
|
|
3
|
+
import type { BlockContents } from "../types.js";
|
|
3
4
|
import * as ssz from "./sszTypes.js";
|
|
4
5
|
export type KZGProof = ValueOf<typeof ssz.KZGProof>;
|
|
5
6
|
export type KZGCommitment = ValueOf<typeof ssz.KZGCommitment>;
|
|
@@ -36,5 +37,5 @@ export type LightClientFinalityUpdate = ValueOf<typeof ssz.LightClientFinalityUp
|
|
|
36
37
|
export type LightClientOptimisticUpdate = ValueOf<typeof ssz.LightClientOptimisticUpdate>;
|
|
37
38
|
export type LightClientStore = ValueOf<typeof ssz.LightClientStore>;
|
|
38
39
|
export type ProducedBlobSidecars = Omit<BlobSidecars, "signedBlockHeader" | "kzgCommitmentInclusionProof">;
|
|
39
|
-
export type Contents = Omit<BlockContents
|
|
40
|
+
export type Contents = Omit<BlockContents<ForkName.deneb>, "block">;
|
|
40
41
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from "./types.js";
|
|
2
2
|
import * as ssz from "./sszTypes.js";
|
|
3
|
-
|
|
3
|
+
import { sszTypesFor } from "./sszTypes.js";
|
|
4
|
+
import type { SSZTypesFor } from "./sszTypes.js";
|
|
5
|
+
export { sszTypesFor, SSZTypesFor, ssz };
|
|
4
6
|
export * from "./utils/typeguards.js";
|
|
5
7
|
export { StringType, stringType } from "./utils/stringType.js";
|
|
6
8
|
export * from "./utils/container.js";
|
package/lib/index.js
CHANGED
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AACrC,OAAO,EAAC,GAAG,EAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,GAAG,MAAM,eAAe,CAAC;AACrC,OAAO,EAAC,WAAW,EAAC,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAC,WAAW,EAAe,GAAG,EAAC,CAAC;AACvC,aAAa;AACb,cAAc,uBAAuB,CAAC;AACtC,cAAc;AACd,OAAO,EAAC,UAAU,EAAE,UAAU,EAAC,MAAM,uBAAuB,CAAC;AAC7D,kBAAkB;AAClB,cAAc,sBAAsB,CAAC"}
|