import { BLSPubkey, Epoch } from "@lodestar/types"; import { MinMaxSurround } from "../minMaxSurround/index.js"; import { SlashingProtectionAttestation } from "../types.js"; import { AttestationByTargetRepository } from "./attestationByTargetRepository.js"; import { AttestationLowerBoundRepository } from "./attestationLowerBoundRepository.js"; import { InvalidAttestationError, InvalidAttestationErrorCode } from "./errors.js"; export { AttestationByTargetRepository, AttestationLowerBoundRepository, InvalidAttestationError, InvalidAttestationErrorCode, }; declare enum SafeStatus { SAME_DATA = "SAFE_STATUS_SAME_DATA", OK = "SAFE_STATUS_OK" } export declare class SlashingProtectionAttestationService { private attestationByTarget; private attestationLowerBound; private minMaxSurround; constructor(signedAttestationDb: AttestationByTargetRepository, attestationLowerBound: AttestationLowerBoundRepository, minMaxSurround: MinMaxSurround); /** * Check an attestation for slash safety, and if it is safe, record it in the database * This is the safe, externally-callable interface for checking attestations */ checkAndInsertAttestation(pubKey: BLSPubkey, attestation: SlashingProtectionAttestation): Promise; /** * Check an attestation from `pubKey` for slash safety. */ checkAttestation(pubKey: BLSPubkey, attestation: SlashingProtectionAttestation): Promise; /** * Insert an attestation into the slashing database * This should *only* be called in the same (exclusive) transaction as `checkAttestation` * so that the check isn't invalidated by a concurrent mutation */ insertAttestation(pubKey: BLSPubkey, attestation: SlashingProtectionAttestation): Promise; /** * Retrieve an attestation from the slashing protection database for a given `pubkey` and `epoch` */ getAttestationForEpoch(pubkey: BLSPubkey, epoch: Epoch): Promise; /** * Interchange import / export functionality */ importAttestations(pubkey: BLSPubkey, attestations: SlashingProtectionAttestation[]): Promise; /** * Interchange import / export functionality */ exportAttestations(pubkey: BLSPubkey): Promise; listPubkeys(): Promise; } //# sourceMappingURL=index.d.ts.map