2023-03-29 04:02:16 +00:00
|
|
|
import {
|
|
|
|
ByteVectorType,
|
|
|
|
ListCompositeType,
|
2023-06-18 07:42:56 +00:00
|
|
|
VectorCompositeType,
|
|
|
|
} from "@chainsafe/ssz";
|
|
|
|
import * as capella from "@lodestar/types/capella";
|
|
|
|
import { BEACON_SYNC_COMMITTEE_SIZE } from "./constants.js";
|
2023-03-29 04:02:16 +00:00
|
|
|
|
|
|
|
const MAX_BATCHSIZE = 10000;
|
|
|
|
|
2023-06-18 07:42:56 +00:00
|
|
|
export const LightClientUpdateSSZ = capella.ssz.LightClientUpdate;
|
2023-03-29 04:02:16 +00:00
|
|
|
export const LightClientUpdatesSSZ = new ListCompositeType(
|
|
|
|
LightClientUpdateSSZ as any,
|
2023-06-18 07:42:56 +00:00
|
|
|
MAX_BATCHSIZE
|
2023-03-29 04:02:16 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
export const CommitteeSSZ = new VectorCompositeType(
|
|
|
|
new ByteVectorType(48),
|
2023-06-18 07:42:56 +00:00
|
|
|
BEACON_SYNC_COMMITTEE_SIZE
|
2023-03-29 04:02:16 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
const HashSSZ = new ByteVectorType(32);
|
|
|
|
export const HashesSSZ = new ListCompositeType(HashSSZ, MAX_BATCHSIZE);
|