import { ForkSeq } from "@lodestar/params";
import { computeEpochAtSlot } from "@lodestar/state-transition";
export { GossipedInputType };
var GossipedInputType;
(function (GossipedInputType) {
    GossipedInputType["block"] = "block";
    GossipedInputType["blob"] = "blob";
    GossipedInputType["dataColumn"] = "data_column";
})(GossipedInputType || (GossipedInputType = {}));
export function blockRequiresBlobs(config, blockSlot, clockSlot) {
    return (config.getForkSeq(blockSlot) >= ForkSeq.deneb &&
        // Only request blobs if they are recent enough
        computeEpochAtSlot(blockSlot) >= computeEpochAtSlot(clockSlot) - config.MIN_EPOCHS_FOR_BLOB_SIDECARS_REQUESTS);
}
export { AttestationImportOpt };
var AttestationImportOpt;
(function (AttestationImportOpt) {
    AttestationImportOpt[AttestationImportOpt["Skip"] = 0] = "Skip";
    AttestationImportOpt[AttestationImportOpt["Force"] = 1] = "Force";
})(AttestationImportOpt || (AttestationImportOpt = {}));
export { BlobSidecarValidation };
var BlobSidecarValidation;
(function (BlobSidecarValidation) {
    /** When recieved in gossip the blobs are individually verified before import */
    BlobSidecarValidation[BlobSidecarValidation["Individual"] = 0] = "Individual";
    /**
     * Blobs when recieved in req/resp can be fully verified before import
     * but currently used in spec tests where blobs come without proofs and assumed
     * to be valid
     */
    BlobSidecarValidation[BlobSidecarValidation["Full"] = 1] = "Full";
})(BlobSidecarValidation || (BlobSidecarValidation = {}));
//# sourceMappingURL=types.js.map