@lodestar/api 1.39.0-dev.075956b855 → 1.39.0-dev.100ab480bb
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/beacon/routes/beacon/index.d.ts +0 -1
- package/lib/beacon/routes/beacon/index.d.ts.map +1 -1
- package/lib/beacon/routes/beacon/index.js.map +1 -1
- package/lib/beacon/routes/beacon/pool.d.ts.map +1 -1
- package/lib/beacon/routes/beacon/pool.js +2 -2
- package/lib/beacon/routes/beacon/pool.js.map +1 -1
- package/lib/beacon/routes/beacon/rewards.d.ts +4 -115
- package/lib/beacon/routes/beacon/rewards.d.ts.map +1 -1
- package/lib/beacon/routes/beacon/rewards.js +5 -48
- package/lib/beacon/routes/beacon/rewards.js.map +1 -1
- package/lib/beacon/routes/beacon/state.d.ts.map +1 -1
- package/lib/beacon/routes/beacon/state.js +2 -2
- package/lib/beacon/routes/beacon/state.js.map +1 -1
- package/lib/beacon/routes/config.d.ts.map +1 -1
- package/lib/beacon/routes/config.js +2 -2
- package/lib/beacon/routes/config.js.map +1 -1
- package/lib/beacon/routes/debug.d.ts.map +1 -1
- package/lib/beacon/routes/debug.js +2 -2
- package/lib/beacon/routes/debug.js.map +1 -1
- package/lib/beacon/routes/lodestar.d.ts.map +1 -1
- package/lib/beacon/routes/lodestar.js +2 -2
- package/lib/beacon/routes/lodestar.js.map +1 -1
- package/lib/beacon/routes/node.d.ts.map +1 -1
- package/lib/beacon/routes/node.js +2 -2
- package/lib/beacon/routes/node.js.map +1 -1
- package/lib/beacon/routes/proof.d.ts.map +1 -1
- package/lib/beacon/routes/proof.js +1 -2
- package/lib/beacon/routes/proof.js.map +1 -1
- package/lib/beacon/routes/validator.d.ts.map +1 -1
- package/lib/beacon/routes/validator.js +2 -2
- package/lib/beacon/routes/validator.js.map +1 -1
- package/lib/builder/routes.d.ts.map +1 -1
- package/lib/builder/routes.js +2 -2
- package/lib/builder/routes.js.map +1 -1
- package/lib/utils/codecs.d.ts +1 -2
- package/lib/utils/codecs.d.ts.map +1 -1
- package/lib/utils/codecs.js +0 -10
- package/lib/utils/codecs.js.map +1 -1
- package/package.json +6 -6
- package/src/beacon/routes/beacon/index.ts +0 -7
- package/src/beacon/routes/beacon/pool.ts +1 -1
- package/src/beacon/routes/beacon/rewards.ts +8 -108
- package/src/beacon/routes/beacon/state.ts +2 -1
- package/src/beacon/routes/config.ts +1 -2
- package/src/beacon/routes/debug.ts +1 -2
- package/src/beacon/routes/lodestar.ts +1 -2
- package/src/beacon/routes/node.ts +1 -2
- package/src/beacon/routes/proof.ts +1 -2
- package/src/beacon/routes/validator.ts +1 -1
- package/src/builder/routes.ts +1 -1
- package/src/utils/codecs.ts +1 -11
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import {ContainerType, Type, ValueOf} from "@chainsafe/ssz";
|
|
2
2
|
import {ChainForkConfig} from "@lodestar/config";
|
|
3
|
-
import {BeaconState, StringType, fulu, ssz} from "@lodestar/types";
|
|
3
|
+
import {ArrayOf, BeaconState, StringType, fulu, ssz} from "@lodestar/types";
|
|
4
4
|
import {
|
|
5
|
-
ArrayOf,
|
|
6
5
|
EmptyArgs,
|
|
7
6
|
EmptyMeta,
|
|
8
7
|
EmptyMetaCodec,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import {ContainerType, Type, ValueOf} from "@chainsafe/ssz";
|
|
2
2
|
import {ChainForkConfig} from "@lodestar/config";
|
|
3
|
-
import {BeaconState, Epoch, RootHex, Slot, ssz} from "@lodestar/types";
|
|
3
|
+
import {ArrayOf, BeaconState, Epoch, RootHex, Slot, ssz} from "@lodestar/types";
|
|
4
4
|
import {
|
|
5
|
-
ArrayOf,
|
|
6
5
|
EmptyArgs,
|
|
7
6
|
EmptyMeta,
|
|
8
7
|
EmptyRequest,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import {ContainerType, OptionalType, ValueOf} from "@chainsafe/ssz";
|
|
2
2
|
import {ChainForkConfig} from "@lodestar/config";
|
|
3
|
-
import {StringType, fulu, ssz, stringType} from "@lodestar/types";
|
|
3
|
+
import {ArrayOf, StringType, fulu, ssz, stringType} from "@lodestar/types";
|
|
4
4
|
import {
|
|
5
|
-
ArrayOf,
|
|
6
5
|
EmptyArgs,
|
|
7
6
|
EmptyMeta,
|
|
8
7
|
EmptyMetaCodec,
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import {CompactMultiProof, ProofType} from "@chainsafe/persistent-merkle-tree";
|
|
2
2
|
import {ByteListType, ContainerType} from "@chainsafe/ssz";
|
|
3
3
|
import {ChainForkConfig} from "@lodestar/config";
|
|
4
|
-
import {ssz} from "@lodestar/types";
|
|
4
|
+
import {ArrayOf, ssz} from "@lodestar/types";
|
|
5
5
|
import {fromHex, toHex} from "@lodestar/utils";
|
|
6
|
-
import {ArrayOf} from "../../utils/codecs.js";
|
|
7
6
|
import {Endpoint, RouteDefinitions, Schema} from "../../utils/index.js";
|
|
8
7
|
import {VersionCodec, VersionMeta} from "../../utils/metadata.js";
|
|
9
8
|
|
|
@@ -8,6 +8,7 @@ import {
|
|
|
8
8
|
isForkPostElectra,
|
|
9
9
|
} from "@lodestar/params";
|
|
10
10
|
import {
|
|
11
|
+
ArrayOf,
|
|
11
12
|
Attestation,
|
|
12
13
|
BLSSignature,
|
|
13
14
|
BeaconBlock,
|
|
@@ -28,7 +29,6 @@ import {
|
|
|
28
29
|
} from "@lodestar/types";
|
|
29
30
|
import {fromHex, toHex, toRootHex} from "@lodestar/utils";
|
|
30
31
|
import {
|
|
31
|
-
ArrayOf,
|
|
32
32
|
EmptyMeta,
|
|
33
33
|
EmptyMetaCodec,
|
|
34
34
|
EmptyResponseCodec,
|
package/src/builder/routes.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {ChainForkConfig} from "@lodestar/config";
|
|
2
2
|
import {ForkName, VALIDATOR_REGISTRY_LIMIT, isForkPostDeneb} from "@lodestar/params";
|
|
3
3
|
import {
|
|
4
|
+
ArrayOf,
|
|
4
5
|
BLSPubkey,
|
|
5
6
|
ExecutionPayload,
|
|
6
7
|
ExecutionPayloadAndBlobsBundle,
|
|
@@ -14,7 +15,6 @@ import {
|
|
|
14
15
|
} from "@lodestar/types";
|
|
15
16
|
import {fromHex, toPubkeyHex, toRootHex} from "@lodestar/utils";
|
|
16
17
|
import {
|
|
17
|
-
ArrayOf,
|
|
18
18
|
EmptyArgs,
|
|
19
19
|
EmptyMeta,
|
|
20
20
|
EmptyRequest,
|
package/src/utils/codecs.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {Type} from "@chainsafe/ssz";
|
|
2
2
|
import {ForkName} from "@lodestar/params";
|
|
3
3
|
import {objectToExpectedCase} from "@lodestar/utils";
|
|
4
4
|
import {
|
|
@@ -68,16 +68,6 @@ export const EmptyResponseCodec: ResponseCodec<EmptyResponseEndpoint> = {
|
|
|
68
68
|
isEmpty: true,
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
export function ArrayOf<T>(elementType: Type<T>, limit = Infinity): ArrayType<Type<T>, unknown, unknown> {
|
|
72
|
-
if (isCompositeType(elementType)) {
|
|
73
|
-
return new ListCompositeType(elementType, limit) as unknown as ArrayType<Type<T>, unknown, unknown>;
|
|
74
|
-
}
|
|
75
|
-
if (isBasicType(elementType)) {
|
|
76
|
-
return new ListBasicType(elementType, limit) as unknown as ArrayType<Type<T>, unknown, unknown>;
|
|
77
|
-
}
|
|
78
|
-
throw Error(`Unknown type ${elementType.typeName}`);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
71
|
export function WithMeta<T, M extends {version: ForkName}>(getType: (m: M) => Type<T>): ResponseDataCodec<T, M> {
|
|
82
72
|
return {
|
|
83
73
|
toJson: (data, meta: M) => getType(meta).toJson(data),
|