import type { CommentEditPubsubMessagePublication } from "../../../../publications/comment-edit/types.js";
import type { CommentIpfsType, CommentPubsubMessagePublication, CommentUpdateType, PostPubsubMessageWithCommunityAuthor, ReplyPubsubMessageWithCommunityAuthor } from "../../../../publications/comment/types.js";
import type { CommentModerationPubsubMessagePublication } from "../../../../publications/comment-moderation/types.js";
import type { VotePubsubMessagePublication } from "../../../../publications/vote/types.js";
import type { CommunityEditPubsubMessagePublication } from "../../../../publications/community-edit/types.js";
import type { PseudonymityAliasRow } from "../db-handler-types.js";
import type { ChallengeRequestMessageType, DecryptedChallengeRequestMessageType } from "../../../../pubsub-messages/types.js";
import type { LocalCommunity } from "../local-community.js";
import type { ChallengeResultAggregate } from "../challenges/index.js";
export declare function isPublicationReply(publication: CommentPubsubMessagePublication): publication is ReplyPubsubMessageWithCommunityAuthor;
export declare function isPublicationPost(publication: CommentPubsubMessagePublication): publication is PostPubsubMessageWithCommunityAuthor;
export declare function calculateLinkProps(community: LocalCommunity, link: CommentPubsubMessagePublication["link"]): Promise<Pick<CommentIpfsType, "thumbnailUrl" | "thumbnailUrlWidth" | "thumbnailUrlHeight"> | undefined>;
export declare function calculateLatestPostProps(community: LocalCommunity): Promise<Pick<CommentIpfsType, "previousCid" | "depth">>;
export declare function calculateReplyProps(community: LocalCommunity, comment: CommentPubsubMessagePublication): Promise<Pick<CommentIpfsType, "previousCid" | "depth" | "postCid">>;
export declare function resolveAliasPrivateKeyForCommentPublication(community: LocalCommunity, opts: {
    mode: PseudonymityAliasRow["mode"];
    originalAuthorPublicKey: PseudonymityAliasRow["originalAuthorPublicKey"];
    postCid?: string;
}): Promise<string>;
export declare function prepareCommentWithAnonymity(community: LocalCommunity, originalComment: CommentPubsubMessagePublication): Promise<{
    publication: CommentPubsubMessagePublication;
    anonymity?: {
        aliasPrivateKey: PseudonymityAliasRow["aliasPrivateKey"];
        originalAuthorPublicKey: PseudonymityAliasRow["originalAuthorPublicKey"];
        mode: PseudonymityAliasRow["mode"];
        originalComment: CommentPubsubMessagePublication;
    };
}>;
export declare function prepareCommentEditWithAlias(community: LocalCommunity, originalEdit: CommentEditPubsubMessagePublication): Promise<{
    timestamp: number;
    signature: {
        type: string;
        signature: string;
        publicKey: string;
        signedPropertyNames: string[];
    };
    protocolVersion: string;
    commentCid: string;
    flairs?: {
        [x: string]: unknown;
        text: string;
        backgroundColor?: string | undefined;
        textColor?: string | undefined;
        expiresAt?: number | undefined;
    }[] | undefined;
    author?: {
        name?: string | undefined;
        previousCommentCid?: string | undefined;
        displayName?: string | undefined;
        wallets?: Record<string, {
            address: string;
            timestamp: number;
            signature: {
                signature: string;
                type: string;
            };
        }> | undefined;
        avatar?: {
            [x: string]: unknown;
            chainTicker: string;
            address: string;
            id: string;
            timestamp: number;
            signature: {
                signature: string;
                type: string;
            };
        } | undefined;
        flairs?: {
            [x: string]: unknown;
            text: string;
            backgroundColor?: string | undefined;
            textColor?: string | undefined;
            expiresAt?: number | undefined;
        }[] | undefined;
    } | undefined;
    communityPublicKey?: string | undefined;
    communityName?: string | undefined;
    spoiler?: boolean | undefined;
    nsfw?: boolean | undefined;
    reason?: string | undefined;
    content?: string | undefined;
    deleted?: boolean | undefined;
}>;
export declare function storeCommentEdit(community: LocalCommunity, commentEditRaw: CommentEditPubsubMessagePublication, challengeRequestId: ChallengeRequestMessageType["challengeRequestId"]): Promise<undefined>;
export declare function storeCommentModeration(community: LocalCommunity, commentModRaw: CommentModerationPubsubMessagePublication, challengeRequestId: ChallengeRequestMessageType["challengeRequestId"]): Promise<undefined>;
export declare function storeVote(community: LocalCommunity, newVoteProps: VotePubsubMessagePublication, challengeRequestId: ChallengeRequestMessageType["challengeRequestId"]): Promise<undefined>;
export declare function storeCommunityEditPublication(community: LocalCommunity, editProps: CommunityEditPubsubMessagePublication, challengeRequestId: ChallengeRequestMessageType["challengeRequestId"]): Promise<undefined>;
export declare function storeComment(community: LocalCommunity, opts: {
    commentPubsub: CommentPubsubMessagePublication;
    pendingApproval?: boolean;
    pseudonymityMode?: PseudonymityAliasRow["mode"];
    originalCommentSignatureEncoded?: string;
    challengeAggregate?: ChallengeResultAggregate;
}): Promise<{
    comment: CommentIpfsType;
    cid: CommentUpdateType["cid"];
}>;
export declare function storePublication(community: LocalCommunity, request: DecryptedChallengeRequestMessageType, pendingApproval?: boolean, challengeAggregate?: ChallengeResultAggregate): Promise<{
    comment: CommentIpfsType;
    cid: CommentUpdateType["cid"];
} | undefined>;
