import { type ChallengeResultAggregate } from "../challenges/index.js";
import type { Challenge } from "../../../../community/types.js";
import type { ChallengeAnswerMessageType, ChallengeRequestMessageType, ChallengeVerificationMessageType, DecryptedChallengeRequest, DecryptedChallengeRequestMessageType, DecryptedChallengeRequestMessageTypeWithCommunityAuthor, DecryptedChallengeVerification, DecryptedChallengeVerificationMessageType, PublicationFromDecryptedChallengeRequest, PublicationWithCommunityAuthorFromDecryptedChallengeRequest } from "../../../../pubsub-messages/types.js";
import type { IpfsHttpClientPubsubMessage } from "../../../../types.js";
import type { LocalCommunity } from "../local-community.js";
export declare function cleanUpChallengeAnswerPromise(community: LocalCommunity, challengeRequestIdString: string): void;
export declare function decryptOrRespondWithFailure(community: LocalCommunity, request: ChallengeRequestMessageType | ChallengeAnswerMessageType): Promise<string>;
export declare function publishChallenges(community: LocalCommunity, challenges: Omit<Challenge, "verify">[], request: DecryptedChallengeRequestMessageTypeWithCommunityAuthor): Promise<void>;
export declare function publishFailedChallengeVerification(community: LocalCommunity, result: Pick<ChallengeVerificationMessageType, "challengeErrors" | "reason">, challengeRequestId: ChallengeRequestMessageType["challengeRequestId"]): Promise<void>;
export declare function publishIdempotentDuplicateVerification(community: LocalCommunity, request: DecryptedChallengeRequestMessageType, challengeRequestId: ChallengeRequestMessageType["challengeRequestId"], duplicateReason: string): Promise<void>;
export declare function storePublicationAndEncryptForChallengeVerification(community: LocalCommunity, request: DecryptedChallengeRequestMessageType, pendingApproval?: boolean, challengeAggregate?: ChallengeResultAggregate): Promise<(DecryptedChallengeVerification & Required<Pick<DecryptedChallengeVerificationMessageType, "encrypted">>) | undefined>;
export declare function publishChallengeVerification(community: LocalCommunity, challengeResult: Pick<ChallengeVerificationMessageType, "challengeErrors" | "challengeSuccess" | "reason">, request: DecryptedChallengeRequestMessageType, pendingApproval?: boolean, challengeAggregate?: ChallengeResultAggregate): Promise<void>;
export declare function parseChallengeRequestPublicationOrRespondWithFailure(community: LocalCommunity, request: ChallengeRequestMessageType, decryptedRawString: string): Promise<DecryptedChallengeRequest>;
export declare function buildRuntimeChallengeRequestPublication({ publication, authorCommunity }: {
    publication: PublicationFromDecryptedChallengeRequest;
    authorCommunity?: PublicationWithCommunityAuthorFromDecryptedChallengeRequest["author"]["community"];
}): PublicationWithCommunityAuthorFromDecryptedChallengeRequest;
export declare function buildRuntimeChallengeRequest({ request, authorCommunity }: {
    request: DecryptedChallengeRequestMessageType;
    authorCommunity?: PublicationWithCommunityAuthorFromDecryptedChallengeRequest["author"]["community"];
}): DecryptedChallengeRequestMessageTypeWithCommunityAuthor;
export declare function handleChallengeRequest(community: LocalCommunity, request: ChallengeRequestMessageType, isLocalPublisher: boolean): Promise<void>;
export declare function parseChallengeAnswerOrRespondWithFailure(community: LocalCommunity, challengeAnswer: ChallengeAnswerMessageType, decryptedRawString: string): Promise<{
    challengeAnswers: string[];
}>;
export declare function handleChallengeAnswer(community: LocalCommunity, challengeAnswer: ChallengeAnswerMessageType): Promise<void>;
export declare function handleChallengeExchange(community: LocalCommunity, pubsubMsg: IpfsHttpClientPubsubMessage): Promise<void>;
