@lodestar/api 1.45.0-dev.e6d38ecb03 → 1.45.0-dev.f535421f29

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.
@@ -4,8 +4,6 @@ import {
4
4
  ForkPostDeneb,
5
5
  ForkPostGloas,
6
6
  ForkPreDeneb,
7
- MIN_SEED_LOOKAHEAD,
8
- SLOTS_PER_EPOCH,
9
7
  VALIDATOR_REGISTRY_LIMIT,
10
8
  isForkPostDeneb,
11
9
  isForkPostElectra,
@@ -248,10 +246,6 @@ export const SignedValidatorRegistrationV1ListType = ArrayOf(
248
246
  ssz.bellatrix.SignedValidatorRegistrationV1,
249
247
  VALIDATOR_REGISTRY_LIMIT
250
248
  );
251
- export const SignedProposerPreferencesListType = ArrayOf(
252
- ssz.gloas.SignedProposerPreferences,
253
- (MIN_SEED_LOOKAHEAD + 1) * SLOTS_PER_EPOCH
254
- );
255
249
 
256
250
  export type ValidatorIndices = ValueOf<typeof ValidatorIndicesType>;
257
251
  export type AttesterDuty = ValueOf<typeof AttesterDutyType>;
@@ -279,13 +273,6 @@ export type SyncCommitteeSelectionList = ValueOf<typeof SyncCommitteeSelectionLi
279
273
  export type LivenessResponseData = ValueOf<typeof LivenessResponseDataType>;
280
274
  export type LivenessResponseDataList = ValueOf<typeof LivenessResponseDataListType>;
281
275
  export type SignedValidatorRegistrationV1List = ValueOf<typeof SignedValidatorRegistrationV1ListType>;
282
- export type SignedProposerPreferencesList = ValueOf<typeof SignedProposerPreferencesListType>;
283
-
284
- // The beacon node does not return any data if there is no canonical block at the requested slot (missed slot).
285
- // In this case, we receive a success response (204) which is not handled as an error. The generic response
286
- // handler already checks the status code and will not attempt to parse the body, but it will return no value.
287
- // It is important that this type indicates that there might be no value to ensure it is properly handled downstream.
288
- export type MaybePayloadAttestationData = gloas.PayloadAttestationData | undefined;
289
276
 
290
277
  export type Endpoints = {
291
278
  /**
@@ -496,7 +483,7 @@ export type Endpoints = {
496
483
  slot: Slot;
497
484
  },
498
485
  {params: {slot: Slot}},
499
- MaybePayloadAttestationData,
486
+ gloas.PayloadAttestationData,
500
487
  VersionMeta
501
488
  >;
502
489
 
@@ -659,20 +646,6 @@ export type Endpoints = {
659
646
  EmptyResponseData,
660
647
  EmptyMeta
661
648
  >;
662
-
663
- /**
664
- * Submit signed proposer preferences
665
- *
666
- * Verifies given signed proposer preferences and publishes them on the `proposer_preferences`
667
- * gossipsub topic. Supersedes `prepareBeaconProposer` and `registerValidator` from Gloas onwards.
668
- */
669
- submitProposerPreferences: Endpoint<
670
- "POST",
671
- {signedProposerPreferences: SignedProposerPreferencesList},
672
- {body: unknown; headers: {[MetaHeader.Version]: string}},
673
- EmptyResponseData,
674
- EmptyMeta
675
- >;
676
649
  };
677
650
 
678
651
  export function getDefinitions(config: ChainForkConfig): RouteDefinitions<Endpoints> {
@@ -1009,7 +982,7 @@ export function getDefinitions(config: ChainForkConfig): RouteDefinitions<Endpoi
1009
982
  },
1010
983
  },
1011
984
  resp: {
1012
- data: WithVersion<MaybePayloadAttestationData, VersionMeta>(() => ssz.gloas.PayloadAttestationData),
985
+ data: ssz.gloas.PayloadAttestationData,
1013
986
  meta: VersionCodec,
1014
987
  },
1015
988
  },
@@ -1237,33 +1210,6 @@ export function getDefinitions(config: ChainForkConfig): RouteDefinitions<Endpoi
1237
1210
  requestWireFormat: WireFormat.ssz,
1238
1211
  },
1239
1212
  },
1240
- submitProposerPreferences: {
1241
- url: "/eth/v1/validator/proposer_preferences",
1242
- method: "POST",
1243
- req: {
1244
- writeReqJson: ({signedProposerPreferences}) => ({
1245
- body: SignedProposerPreferencesListType.toJson(signedProposerPreferences),
1246
- headers: {[MetaHeader.Version]: config.getForkName(signedProposerPreferences[0]?.message.proposalSlot ?? 0)},
1247
- }),
1248
- parseReqJson: ({body, headers}) => {
1249
- toForkName(fromHeaders(headers, MetaHeader.Version));
1250
- return {signedProposerPreferences: SignedProposerPreferencesListType.fromJson(body)};
1251
- },
1252
- writeReqSsz: ({signedProposerPreferences}) => ({
1253
- body: SignedProposerPreferencesListType.serialize(signedProposerPreferences),
1254
- headers: {[MetaHeader.Version]: config.getForkName(signedProposerPreferences[0]?.message.proposalSlot ?? 0)},
1255
- }),
1256
- parseReqSsz: ({body, headers}) => {
1257
- toForkName(fromHeaders(headers, MetaHeader.Version));
1258
- return {signedProposerPreferences: SignedProposerPreferencesListType.deserialize(body)};
1259
- },
1260
- schema: {
1261
- body: Schema.ObjectArray,
1262
- headers: {[MetaHeader.Version]: Schema.String},
1263
- },
1264
- },
1265
- resp: EmptyResponseCodec,
1266
- },
1267
1213
  };
1268
1214
  }
1269
1215
 
@@ -75,9 +75,6 @@ export function fromValidatorIdsStr(ids?: string[]): (string | number)[] | undef
75
75
  return ids?.map((id) => (typeof id === "string" && id.startsWith("0x") ? id : fromU64Str(id)));
76
76
  }
77
77
 
78
- export const toBuilderIdsStr = toValidatorIdsStr;
79
- export const fromBuilderIdsStr = fromValidatorIdsStr;
80
-
81
78
  const GRAFFITI_HEX_LENGTH = 66;
82
79
 
83
80
  export function toGraffitiHex(utf8?: string): string | undefined {
@@ -111,11 +111,6 @@ export function createFastifyHandler<E extends Endpoint>(
111
111
  resp.statusCode = response.status;
112
112
  }
113
113
 
114
- // A 204 No Content response has no body
115
- if (resp.statusCode === 204) {
116
- return;
117
- }
118
-
119
114
  switch (responseWireFormat) {
120
115
  case WireFormat.json: {
121
116
  const metaHeaders = definition.resp.meta.toHeadersObject(response?.meta);