@lodestar/api 1.38.0 → 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 +7 -0
- 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 +8 -1
- package/src/builder/routes.ts +1 -1
- package/src/utils/codecs.ts +1 -11
|
@@ -2,6 +2,7 @@ import {ContainerType, ValueOf} from "@chainsafe/ssz";
|
|
|
2
2
|
import {ChainForkConfig} from "@lodestar/config";
|
|
3
3
|
import {MAX_VALIDATORS_PER_COMMITTEE} from "@lodestar/params";
|
|
4
4
|
import {
|
|
5
|
+
ArrayOf,
|
|
5
6
|
CommitteeIndex,
|
|
6
7
|
Epoch,
|
|
7
8
|
RootHex,
|
|
@@ -13,7 +14,7 @@ import {
|
|
|
13
14
|
phase0,
|
|
14
15
|
ssz,
|
|
15
16
|
} from "@lodestar/types";
|
|
16
|
-
import {
|
|
17
|
+
import {JsonOnlyReq} from "../../../utils/codecs.js";
|
|
17
18
|
import {Endpoint, RequestCodec, RouteDefinitions, Schema} from "../../../utils/index.js";
|
|
18
19
|
import {
|
|
19
20
|
ExecutionOptimisticAndFinalizedCodec,
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import {ContainerType, ValueOf} from "@chainsafe/ssz";
|
|
2
2
|
import {ChainForkConfig, SpecJson} from "@lodestar/config";
|
|
3
|
-
import {ssz} from "@lodestar/types";
|
|
3
|
+
import {ArrayOf, 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, 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,
|
|
@@ -498,6 +498,10 @@ export type Endpoints = {
|
|
|
498
498
|
* a validator client to correctly determine if one of its validators has been selected to
|
|
499
499
|
* perform an aggregation duty in this slot.
|
|
500
500
|
*
|
|
501
|
+
* Validator clients running in a distributed validator cluster must query this endpoint
|
|
502
|
+
* at the start of an epoch for the current and lookahead (next) epochs for all validators
|
|
503
|
+
* that have attester duties in the current and lookahead epochs.
|
|
504
|
+
*
|
|
501
505
|
* Note that this endpoint is not implemented by the beacon node and will return a 501 error
|
|
502
506
|
*
|
|
503
507
|
* Returns an array of threshold aggregated beacon committee selection proofs
|
|
@@ -521,6 +525,9 @@ export type Endpoints = {
|
|
|
521
525
|
* a validator client to correctly determine if one of its validators has been selected to
|
|
522
526
|
* perform a sync committee contribution (sync aggregation) duty in this slot.
|
|
523
527
|
*
|
|
528
|
+
* Validator clients running in a distributed validator cluster must query this endpoint
|
|
529
|
+
* at the start of each slot for all validators that are included in the current sync committee.
|
|
530
|
+
*
|
|
524
531
|
* Note that this endpoint is not implemented by the beacon node and will return a 501 error
|
|
525
532
|
*
|
|
526
533
|
* Returns an array of threshold aggregated sync committee selection proofs
|
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),
|