@lodestar/types 1.28.0-dev.2b1c82a795 → 1.28.0-dev.8be81d6acf

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 (2) hide show
  1. package/README.md +4 -6
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -67,15 +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. Those are directly available without a namespace and SSZ Types typed to these interfaces can be retrieved by calling `sszTypesFor` with the `ForkName`.
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
- import {ForkName, ForkPostAltair} from "@lodestar/params";
74
- import {sszTypesFor, BeaconState} from "@lodestar/types";
73
+ import {ForkName} from "@lodestar/params";
74
+ import {ssz, BeaconState} from "@lodestar/types";
75
75
 
76
- const fork = ForkName.altair;
77
-
78
- const state: BeaconState<ForkPostAltair> = sszTypesFor(fork).BeaconState.defaultValue();
76
+ const state: BeaconState<ForkName.phase0> = ssz.allForks[ForkName.phase0].BeaconState.defaultValue();
79
77
  ```
80
78
 
81
79
  ## License
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.28.0-dev.2b1c82a795",
14
+ "version": "1.28.0-dev.8be81d6acf",
15
15
  "type": "module",
16
16
  "exports": {
17
17
  ".": {
@@ -74,7 +74,7 @@
74
74
  "types": "lib/index.d.ts",
75
75
  "dependencies": {
76
76
  "@chainsafe/ssz": "^1.0.2",
77
- "@lodestar/params": "1.28.0-dev.2b1c82a795",
77
+ "@lodestar/params": "1.28.0-dev.8be81d6acf",
78
78
  "ethereum-cryptography": "^2.0.0"
79
79
  },
80
80
  "keywords": [
@@ -83,5 +83,5 @@
83
83
  "beacon",
84
84
  "blockchain"
85
85
  ],
86
- "gitHead": "0f15aa6b8a65e60d9160844f54ffd5262f7f5332"
86
+ "gitHead": "eb51f46304ee9727f57a7cc839b9af4c83f87a7a"
87
87
  }