import { Comment } from "../publications/comment/comment.js"; import { PKC } from "../pkc/pkc.js"; import Vote from "../publications/vote/vote.js"; import { RemoteCommunity } from "../community/remote-community.js"; import type { InputPKCOptions, NameResolver } from "../types.js"; import Publication from "../publications/publication.js"; import { EventEmitter } from "events"; import { LocalCommunity } from "../runtime/node/community/local-community.js"; import { RpcLocalCommunity } from "../community/rpc-local-community.js"; import type { CreateNewLocalCommunityUserOptions, CommunityIpfsType, CommunityChallengeSetting } from "../community/types.js"; import type { SignerType } from "../signer/types.js"; import type { CreateVoteOptions } from "../publications/vote/types.js"; import type { CommentIpfsWithCidDefined, CommentWithinRepliesPostsPageJson, CreateCommentOptions } from "../publications/comment/types.js"; import { BasePages, PostsPages, RepliesPages } from "../pages/pages.js"; import { CommentEdit } from "../publications/comment-edit/comment-edit.js"; import type { CreateCommentEditOptions } from "../publications/comment-edit/types.js"; import type { ChallengeVerificationMessageType, DecryptedChallengeVerificationMessageType, PubsubMessage } from "../pubsub-messages/types.js"; import { CommentModeration } from "../publications/comment-moderation/comment-moderation.js"; import type { PageTypeJson } from "../pages/types.js"; interface MockPKCOptions { pkcOptions?: InputPKCOptions; forceMockPubsub?: boolean; stubStorage?: boolean; mockResolve?: boolean; remotePKC?: boolean; } type MockResolverRecords = Map | Record; export declare function selfResolvingMockNameForAddress(address: string): string; export declare function createMockNameResolver({ records, includeDefaultRecords, key, provider, canResolve, resolveFunction }?: { records?: MockResolverRecords; includeDefaultRecords?: boolean; key?: string; provider?: string; canResolve?: NameResolver["canResolve"]; resolveFunction?: NameResolver["resolve"]; }): NameResolver; export declare function createPendingApprovalChallenge(overrides?: Partial): CommunityChallengeSetting; export declare function generateMockPost({ communityAddress, pkc, randomTimestamp, postProps }: { communityAddress: string; pkc: PKC; randomTimestamp?: boolean; postProps?: Partial; }): Promise; export declare function generateMockComment(parentPostOrComment: CommentIpfsWithCidDefined, pkc: PKC, randomTimestamp?: boolean, commentProps?: Partial): Promise; export declare function generateMockVote(parentPostOrComment: CommentIpfsWithCidDefined, vote: -1 | 0 | 1, pkc: PKC, signer?: SignerType): Promise; export declare function loadAllPages(pageCid: string, pagesInstance: PostsPages | RepliesPages): Promise; export declare function loadAllPagesBySortName(pageSortName: string, pagesInstance: BasePages): Promise; export declare function loadAllUniquePostsUnderCommunity(community: RemoteCommunity): Promise; export declare function loadAllUniqueCommentsUnderCommentInstance(comment: Comment): Promise; type TestServerSubs = { onlineSub?: LocalCommunity; ensSub: LocalCommunity; mainSub: LocalCommunity; mathSub: LocalCommunity; NoPubsubResponseSub: LocalCommunity; mathCliSubWithNoMockedPubsub: LocalCommunity; subForPurge: LocalCommunity; subForRemove: LocalCommunity; subForDelete: LocalCommunity; subForChainProviders: LocalCommunity; subForEditContent: LocalCommunity; subForLocked: LocalCommunity; }; export declare function startOnlineCommunity(): Promise; export declare function startCommunities(props: { signers: SignerType[]; noData?: boolean; dataPath?: string; votesPerCommentToPublish: number; numOfCommentsToPublish: number; numOfPostsToPublish: number; startOnlineSub: boolean; }): Promise; export declare function fetchTestServerSubs(): Promise; export declare function mockDefaultOptionsForNodeAndBrowserTests(): Pick; export declare function mockPKCV2({ pkcOptions, forceMockPubsub, stubStorage, mockResolve, remotePKC }?: MockPKCOptions): Promise; export declare function mockPKC(pkcOptions?: InputPKCOptions, forceMockPubsub?: boolean, stubStorage?: boolean, mockResolve?: boolean): Promise; export declare function mockRemotePKC(opts?: MockPKCOptions): Promise; export declare function createOnlinePKC(pkcOptions?: InputPKCOptions): Promise; export declare function mockPKCNoDataPathWithOnlyKuboClient(opts?: MockPKCOptions): Promise; export declare function mockPKCNoDataPathWithOnlyKuboClientNoAdd(opts?: MockPKCOptions): Promise; export declare function mockRpcServerPKC(pkcOptions?: InputPKCOptions): Promise; export declare function mockRpcRemotePKC(opts?: MockPKCOptions): Promise; export declare function mockRPCLocalPKC(pkcOptions?: InputPKCOptions): Promise; export declare function mockGatewayPKC(opts?: MockPKCOptions): Promise; export declare function publishRandomReply({ parentComment, pkc, commentProps }: { parentComment: CommentIpfsWithCidDefined; pkc: PKC; commentProps?: Partial; }): Promise; export declare function publishRandomPost({ communityAddress, pkc, postProps }: { communityAddress: string; pkc: PKC; postProps?: Partial; }): Promise; export declare function publishVote({ commentCid, communityAddress, vote, pkc, voteProps }: { commentCid: string; communityAddress: string; vote: 1 | 0 | -1; pkc: PKC; voteProps?: Partial; }): Promise; export declare function publishWithExpectedResult({ publication, expectedChallengeSuccess, expectedReason }: { publication: Publication; expectedChallengeSuccess: boolean; expectedReason?: string; }): Promise; export declare function iterateThroughPageCidToFindComment(commentCid: string, pageCid: string, pages: PostsPages | RepliesPages): Promise; export declare function findCommentInCommunityInstancePagesPreloadedAndPageCids(opts: { comment: Required & { communityAddress: string; }>; community: RemoteCommunity; }): Promise; export declare function findReplyInParentCommentPagesInstancePreloadedAndPageCids(opts: { reply: Required & { communityAddress: string; }>; parentComment: Comment; }): Promise; export declare function waitTillPostInCommunityInstancePages(post: Required & { communityAddress: string; }>, community: RemoteCommunity): Promise; export declare function waitTillPostInCommunityPages(post: Required & { communityAddress: string; }>, pkc: PKC): Promise; export declare function iterateThroughPagesToFindCommentInParentPagesInstance(commentCid: string, pages: PostsPages | RepliesPages): Promise; export declare function waitTillReplyInParentPagesInstance(reply: Required & { communityAddress: string; }>, parentComment: Comment): Promise; export declare function waitTillReplyInParentPages(reply: Required & { communityAddress: string; }>, pkc: PKC): Promise; export declare function createSubWithNoChallenge(props: CreateNewLocalCommunityUserOptions, pkc: PKC): Promise; export declare function generatePostToAnswerMathQuestion(props: Partial & { communityAddress: string; }, pkc: PKC): Promise; export declare function isRpcFlagOn(): boolean; export declare function isRunningInBrowser(): boolean; export type ResolveWhenConditionIsTrueOptions = { toUpdate: EventEmitter; predicate: () => Promise; eventName?: string; }; export declare function resolveWhenConditionIsTrue(options: ResolveWhenConditionIsTrueOptions): Promise; export declare function disableValidationOfSignatureBeforePublishing(publication: Publication): Promise; export declare function overrideCommentInstancePropsAndSign(comment: Comment, props: CreateCommentOptions): Promise; export declare function overrideCommentEditInstancePropsAndSign(commentEdit: CommentEdit, props: CreateCommentEditOptions): Promise; export declare function ensurePublicationIsSigned(publication: Publication, community: { address: string; signer?: { address: string; }; encryption: { type: string; publicKey: string; }; pubsubTopic?: string; name?: string; }): Promise; export declare function setExtraPropOnCommentAndSign(comment: Comment, extraProps: Object, includeExtraPropInSignedPropertyNames: boolean): Promise; export declare function setExtraPropOnVoteAndSign(vote: Vote, extraProps: Object, includeExtraPropInSignedPropertyNames: boolean): Promise; export declare function setExtraPropOnCommentEditAndSign(commentEdit: CommentEdit, extraProps: Object, includeExtraPropInSignedPropertyNames: boolean): Promise; export declare function setExtraPropOnCommentModerationAndSign(commentModeration: CommentModeration, extraProps: any, includeExtraPropInSignedPropertyNames: boolean): Promise; export declare function setExtraPropOnChallengeRequestAndSign({ publication, extraProps, includeExtraPropsInRequestSignedPropertyNames }: { publication: Publication; extraProps: Object; includeExtraPropsInRequestSignedPropertyNames: boolean; }): Promise; export declare function publishChallengeAnswerMessageWithExtraProps({ publication, challengeAnswers, extraProps, includeExtraPropsInChallengeSignedPropertyNames }: { publication: Publication; challengeAnswers: string[]; extraProps: Object; includeExtraPropsInChallengeSignedPropertyNames: boolean; }): Promise; export declare function publishChallengeMessageWithExtraProps({ publication, pubsubSigner, extraProps, includeExtraPropsInChallengeSignedPropertyNames }: { publication: Publication; pubsubSigner: SignerType; extraProps: Object; includeExtraPropsInChallengeSignedPropertyNames: boolean; }): Promise; export declare function publishChallengeVerificationMessageWithExtraProps({ publication, pubsubSigner, extraProps, includeExtraPropsInChallengeSignedPropertyNames }: { publication: Publication; pubsubSigner: SignerType; extraProps: Object; includeExtraPropsInChallengeSignedPropertyNames: boolean; }): Promise; export declare function publishChallengeVerificationMessageWithEncryption(publication: Publication, pubsubSigner: SignerType, toEncrypt: Object, verificationProps?: Partial): Promise; export declare function addStringToIpfs(content: string): Promise; export declare function publishOverPubsub(pubsubTopic: string, jsonToPublish: PubsubMessage): Promise; export declare function mockPKCWithHeliaConfig(opts?: MockPKCOptions): Promise; type PKCTestConfigCode = "remote-kubo-rpc" | "remote-ipfs-gateway" | "remote-pkc-rpc" | "local-kubo-rpc" | "remote-libp2pjs"; type PKCConfigWithName = { name: string; pkcInstancePromise: (args?: MockPKCOptions) => Promise; testConfigCode: PKCTestConfigCode; }; export declare function setPKCConfigs(configs: PKCTestConfigCode[]): void; export declare function getAvailablePKCConfigsToTestAgainst(opts?: { includeOnlyTheseTests?: PKCTestConfigCode[]; includeAllPossibleConfigOnEnv?: boolean; }): PKCConfigWithName[]; export declare function createNewIpns(): Promise<{ signer: import("../signer/index.js").SignerWithPublicKeyAddress; publishToIpns: (content: string, opts?: { verifyResolves?: boolean; ttl?: string; }) => Promise; publishToIpnsValue: (value: string, opts?: { verifyResolves?: boolean; ttl?: string; }) => Promise; pkc: PKC; }>; export declare function createDelegatedCommunityIpns(communityOpts?: Partial, opts?: { contentSigner?: SignerType; intermediateHopsCount?: number; omitAnchorClaim?: boolean; }): Promise<{ anchorName: string; terminalName: string; intermediateNames: string[]; ipnsHops: string[]; communityRecord: { challenges: { [x: string]: unknown; type: string; exclude?: { [x: string]: unknown; community?: { addresses: string[]; maxCommentCids: number; postScore?: number | undefined; replyScore?: number | undefined; firstCommentTimestamp?: number | undefined; } | undefined; postScore?: number | undefined; replyScore?: number | undefined; postCount?: number | undefined; replyCount?: number | undefined; firstCommentTimestamp?: number | undefined; challenges?: number[] | undefined; roles?: string[] | undefined; publicKeys?: string[] | undefined; names?: string[] | undefined; rateLimit?: number | undefined; rateLimitChallengeSuccess?: boolean | undefined; publicationType?: { [x: string]: unknown; post?: boolean | undefined; reply?: boolean | undefined; vote?: boolean | undefined; commentEdit?: boolean | undefined; commentModeration?: boolean | undefined; communityEdit?: boolean | undefined; } | undefined; }[] | undefined; description?: string | undefined; challenge?: string | undefined; caseInsensitive?: boolean | undefined; pendingApproval?: boolean | undefined; publicOptions?: Record | undefined; }[]; signature: { type: string; signature: string; publicKey: string; signedPropertyNames: string[]; }; encryption: { [x: string]: unknown; type: string; publicKey: string; }; createdAt: number; updatedAt: number; protocolVersion: string; posts?: { pages: Record | 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; thumbnailUrl?: string | undefined; thumbnailUrlWidth?: number | undefined; thumbnailUrlHeight?: number | undefined; previousCid?: string | undefined; pseudonymityMode?: "per-post" | "per-reply" | "per-author" | undefined; }; commentUpdate: { [x: string]: unknown; cid: string; upvoteCount: number; downvoteCount: number; replyCount: number; updatedAt: number; signature: { type: string; signature: string; publicKey: string; signedPropertyNames: string[]; }; protocolVersion: string; childCount?: number | undefined; number?: number | undefined; postNumber?: number | undefined; edit?: { [x: string]: unknown; 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; communityPublicKey?: string | undefined; communityName?: string | undefined; spoiler?: boolean | undefined; nsfw?: boolean | undefined; reason?: string | undefined; content?: string | undefined; deleted?: boolean | undefined; author?: { [x: string]: unknown; name?: string | undefined; previousCommentCid?: string | undefined; displayName?: string | undefined; wallets?: Record | 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; } | undefined; flairs?: { [x: string]: unknown; text: string; backgroundColor?: string | undefined; textColor?: string | undefined; expiresAt?: number | undefined; }[] | undefined; spoiler?: boolean | undefined; nsfw?: boolean | undefined; pinned?: boolean | undefined; locked?: boolean | undefined; archived?: boolean | undefined; removed?: boolean | undefined; reason?: string | undefined; approved?: boolean | undefined; author?: { [x: string]: unknown; community?: { [x: string]: unknown; postScore: number; replyScore: number; firstCommentTimestamp: number; lastCommentCid: string; banExpiresAt?: number | undefined; flairs?: { [x: string]: unknown; text: string; backgroundColor?: string | undefined; textColor?: string | undefined; expiresAt?: number | undefined; }[] | undefined; } | undefined; } | undefined; lastChildCid?: string | undefined; lastReplyTimestamp?: number | undefined; replies?: { pages: Record; pageCids?: Record | undefined; } | undefined; }; }[]; nextCid?: string | undefined; }>; pageCids?: Record | undefined; } | undefined; modQueue?: { pageCids: Record; } | undefined; name?: string | undefined; anchor?: { publicKey: string; } | undefined; pubsubTopic?: string | undefined; statsCid?: string | undefined; postUpdates?: Record | undefined; title?: string | undefined; description?: string | undefined; roles?: Record | undefined; rules?: string[] | undefined; lastPostCid?: string | undefined; lastCommentCid?: string | undefined; features?: { [x: string]: unknown; noVideos?: boolean | undefined; noSpoilers?: boolean | undefined; noImages?: boolean | undefined; noVideoReplies?: boolean | undefined; noSpoilerReplies?: boolean | undefined; noImageReplies?: boolean | undefined; noReplyLinks?: boolean | undefined; noPolls?: boolean | undefined; noCrossposts?: boolean | undefined; maxCrosspostDepth?: number | undefined; noNestedReplies?: boolean | undefined; safeForWork?: boolean | undefined; authorFlairs?: boolean | undefined; requireAuthorFlairs?: boolean | undefined; postFlairs?: boolean | undefined; requirePostFlairs?: boolean | undefined; noMarkdownImages?: boolean | undefined; noMarkdownVideos?: boolean | undefined; noMarkdownAudio?: boolean | undefined; noAudio?: boolean | undefined; noAudioReplies?: boolean | undefined; markdownImageReplies?: boolean | undefined; markdownVideoReplies?: boolean | undefined; noPostUpvotes?: boolean | undefined; noReplyUpvotes?: boolean | undefined; noPostDownvotes?: boolean | undefined; noReplyDownvotes?: boolean | undefined; noUpvotes?: boolean | undefined; noDownvotes?: boolean | undefined; requirePostLink?: boolean | undefined; requirePostLinkIsMedia?: boolean | undefined; requireReplyLink?: boolean | undefined; requireReplyLinkIsMedia?: boolean | undefined; pseudonymityMode?: "per-post" | "per-reply" | "per-author" | undefined; } | undefined; suggested?: { [x: string]: unknown; primaryColor?: string | undefined; secondaryColor?: string | undefined; avatarUrl?: string | undefined; bannerUrl?: string | undefined; backgroundUrl?: string | undefined; language?: string | undefined; } | undefined; flairs?: Record | undefined; }; cid: string; }>; export declare function publishCommunityRecordWithExtraProp(opts?: { includeExtraPropInSignedPropertyNames?: boolean; extraProps?: Object; ttl?: string; }): Promise<{ communityRecord: any; ipnsObj: { signer: import("../signer/index.js").SignerWithPublicKeyAddress; publishToIpns: (content: string, opts?: { verifyResolves?: boolean; ttl?: string; }) => Promise; publishToIpnsValue: (value: string, opts?: { verifyResolves?: boolean; ttl?: string; }) => Promise; pkc: PKC; }; }>; export declare function encryptionForSigner(signer: { publicKey: string; }): CommunityIpfsType["encryption"]; export declare function createMockedCommunityIpns(communityOpts: CreateNewLocalCommunityUserOptions): Promise<{ communityRecord: { challenges: { [x: string]: unknown; type: string; exclude?: { [x: string]: unknown; community?: { addresses: string[]; maxCommentCids: number; postScore?: number | undefined; replyScore?: number | undefined; firstCommentTimestamp?: number | undefined; } | undefined; postScore?: number | undefined; replyScore?: number | undefined; postCount?: number | undefined; replyCount?: number | undefined; firstCommentTimestamp?: number | undefined; challenges?: number[] | undefined; roles?: string[] | undefined; publicKeys?: string[] | undefined; names?: string[] | undefined; rateLimit?: number | undefined; rateLimitChallengeSuccess?: boolean | undefined; publicationType?: { [x: string]: unknown; post?: boolean | undefined; reply?: boolean | undefined; vote?: boolean | undefined; commentEdit?: boolean | undefined; commentModeration?: boolean | undefined; communityEdit?: boolean | undefined; } | undefined; }[] | undefined; description?: string | undefined; challenge?: string | undefined; caseInsensitive?: boolean | undefined; pendingApproval?: boolean | undefined; publicOptions?: Record | undefined; }[]; signature: { type: string; signature: string; publicKey: string; signedPropertyNames: string[]; }; encryption: { [x: string]: unknown; type: string; publicKey: string; }; createdAt: number; updatedAt: number; protocolVersion: string; posts?: { pages: Record | 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; thumbnailUrl?: string | undefined; thumbnailUrlWidth?: number | undefined; thumbnailUrlHeight?: number | undefined; previousCid?: string | undefined; pseudonymityMode?: "per-post" | "per-reply" | "per-author" | undefined; }; commentUpdate: { [x: string]: unknown; cid: string; upvoteCount: number; downvoteCount: number; replyCount: number; updatedAt: number; signature: { type: string; signature: string; publicKey: string; signedPropertyNames: string[]; }; protocolVersion: string; childCount?: number | undefined; number?: number | undefined; postNumber?: number | undefined; edit?: { [x: string]: unknown; 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; communityPublicKey?: string | undefined; communityName?: string | undefined; spoiler?: boolean | undefined; nsfw?: boolean | undefined; reason?: string | undefined; content?: string | undefined; deleted?: boolean | undefined; author?: { [x: string]: unknown; name?: string | undefined; previousCommentCid?: string | undefined; displayName?: string | undefined; wallets?: Record | 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; } | undefined; flairs?: { [x: string]: unknown; text: string; backgroundColor?: string | undefined; textColor?: string | undefined; expiresAt?: number | undefined; }[] | undefined; spoiler?: boolean | undefined; nsfw?: boolean | undefined; pinned?: boolean | undefined; locked?: boolean | undefined; archived?: boolean | undefined; removed?: boolean | undefined; reason?: string | undefined; approved?: boolean | undefined; author?: { [x: string]: unknown; community?: { [x: string]: unknown; postScore: number; replyScore: number; firstCommentTimestamp: number; lastCommentCid: string; banExpiresAt?: number | undefined; flairs?: { [x: string]: unknown; text: string; backgroundColor?: string | undefined; textColor?: string | undefined; expiresAt?: number | undefined; }[] | undefined; } | undefined; } | undefined; lastChildCid?: string | undefined; lastReplyTimestamp?: number | undefined; replies?: { pages: Record; pageCids?: Record | undefined; } | undefined; }; }[]; nextCid?: string | undefined; }>; pageCids?: Record | undefined; } | undefined; modQueue?: { pageCids: Record; } | undefined; name?: string | undefined; anchor?: { publicKey: string; } | undefined; pubsubTopic?: string | undefined; statsCid?: string | undefined; postUpdates?: Record | undefined; title?: string | undefined; description?: string | undefined; roles?: Record | undefined; rules?: string[] | undefined; lastPostCid?: string | undefined; lastCommentCid?: string | undefined; features?: { [x: string]: unknown; noVideos?: boolean | undefined; noSpoilers?: boolean | undefined; noImages?: boolean | undefined; noVideoReplies?: boolean | undefined; noSpoilerReplies?: boolean | undefined; noImageReplies?: boolean | undefined; noReplyLinks?: boolean | undefined; noPolls?: boolean | undefined; noCrossposts?: boolean | undefined; maxCrosspostDepth?: number | undefined; noNestedReplies?: boolean | undefined; safeForWork?: boolean | undefined; authorFlairs?: boolean | undefined; requireAuthorFlairs?: boolean | undefined; postFlairs?: boolean | undefined; requirePostFlairs?: boolean | undefined; noMarkdownImages?: boolean | undefined; noMarkdownVideos?: boolean | undefined; noMarkdownAudio?: boolean | undefined; noAudio?: boolean | undefined; noAudioReplies?: boolean | undefined; markdownImageReplies?: boolean | undefined; markdownVideoReplies?: boolean | undefined; noPostUpvotes?: boolean | undefined; noReplyUpvotes?: boolean | undefined; noPostDownvotes?: boolean | undefined; noReplyDownvotes?: boolean | undefined; noUpvotes?: boolean | undefined; noDownvotes?: boolean | undefined; requirePostLink?: boolean | undefined; requirePostLinkIsMedia?: boolean | undefined; requireReplyLink?: boolean | undefined; requireReplyLinkIsMedia?: boolean | undefined; pseudonymityMode?: "per-post" | "per-reply" | "per-author" | undefined; } | undefined; suggested?: { [x: string]: unknown; primaryColor?: string | undefined; secondaryColor?: string | undefined; avatarUrl?: string | undefined; bannerUrl?: string | undefined; backgroundUrl?: string | undefined; language?: string | undefined; } | undefined; flairs?: Record | undefined; }; communityAddress: string; ipnsObj: { signer: import("../signer/index.js").SignerWithPublicKeyAddress; publishToIpns: (content: string, opts?: { verifyResolves?: boolean; ttl?: string; }) => Promise; publishToIpnsValue: (value: string, opts?: { verifyResolves?: boolean; ttl?: string; }) => Promise; pkc: PKC; }; }>; export declare function createStaticCommunityRecordForComment(opts?: { pkc?: PKC; commentOptions?: Partial; invalidateCommunitySignature?: boolean; }): Promise<{ commentCid: string; communityAddress: string; }>; export declare const updateIntervalForExactStateTests = 60000; export declare function publishStaticCommunityWithPostInPages(opts?: { withReplyInPostPages?: boolean; withSelfResolvingName?: boolean; }): Promise<{ communityAddress: string; communityName: string | undefined; commentCid: string; replyCid: string | undefined; communityRecord: { challenges: { [x: string]: unknown; type: string; exclude?: { [x: string]: unknown; community?: { addresses: string[]; maxCommentCids: number; postScore?: number | undefined; replyScore?: number | undefined; firstCommentTimestamp?: number | undefined; } | undefined; postScore?: number | undefined; replyScore?: number | undefined; postCount?: number | undefined; replyCount?: number | undefined; firstCommentTimestamp?: number | undefined; challenges?: number[] | undefined; roles?: string[] | undefined; publicKeys?: string[] | undefined; names?: string[] | undefined; rateLimit?: number | undefined; rateLimitChallengeSuccess?: boolean | undefined; publicationType?: { [x: string]: unknown; post?: boolean | undefined; reply?: boolean | undefined; vote?: boolean | undefined; commentEdit?: boolean | undefined; commentModeration?: boolean | undefined; communityEdit?: boolean | undefined; } | undefined; }[] | undefined; description?: string | undefined; challenge?: string | undefined; caseInsensitive?: boolean | undefined; pendingApproval?: boolean | undefined; publicOptions?: Record | undefined; }[]; signature: { type: string; signature: string; publicKey: string; signedPropertyNames: string[]; }; encryption: { [x: string]: unknown; type: string; publicKey: string; }; createdAt: number; updatedAt: number; protocolVersion: string; posts?: { pages: Record | 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; thumbnailUrl?: string | undefined; thumbnailUrlWidth?: number | undefined; thumbnailUrlHeight?: number | undefined; previousCid?: string | undefined; pseudonymityMode?: "per-post" | "per-reply" | "per-author" | undefined; }; commentUpdate: { [x: string]: unknown; cid: string; upvoteCount: number; downvoteCount: number; replyCount: number; updatedAt: number; signature: { type: string; signature: string; publicKey: string; signedPropertyNames: string[]; }; protocolVersion: string; childCount?: number | undefined; number?: number | undefined; postNumber?: number | undefined; edit?: { [x: string]: unknown; 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; communityPublicKey?: string | undefined; communityName?: string | undefined; spoiler?: boolean | undefined; nsfw?: boolean | undefined; reason?: string | undefined; content?: string | undefined; deleted?: boolean | undefined; author?: { [x: string]: unknown; name?: string | undefined; previousCommentCid?: string | undefined; displayName?: string | undefined; wallets?: Record | 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; } | undefined; flairs?: { [x: string]: unknown; text: string; backgroundColor?: string | undefined; textColor?: string | undefined; expiresAt?: number | undefined; }[] | undefined; spoiler?: boolean | undefined; nsfw?: boolean | undefined; pinned?: boolean | undefined; locked?: boolean | undefined; archived?: boolean | undefined; removed?: boolean | undefined; reason?: string | undefined; approved?: boolean | undefined; author?: { [x: string]: unknown; community?: { [x: string]: unknown; postScore: number; replyScore: number; firstCommentTimestamp: number; lastCommentCid: string; banExpiresAt?: number | undefined; flairs?: { [x: string]: unknown; text: string; backgroundColor?: string | undefined; textColor?: string | undefined; expiresAt?: number | undefined; }[] | undefined; } | undefined; } | undefined; lastChildCid?: string | undefined; lastReplyTimestamp?: number | undefined; replies?: { pages: Record; pageCids?: Record | undefined; } | undefined; }; }[]; nextCid?: string | undefined; }>; pageCids?: Record | undefined; } | undefined; modQueue?: { pageCids: Record; } | undefined; name?: string | undefined; anchor?: { publicKey: string; } | undefined; pubsubTopic?: string | undefined; statsCid?: string | undefined; postUpdates?: Record | undefined; title?: string | undefined; description?: string | undefined; roles?: Record | undefined; rules?: string[] | undefined; lastPostCid?: string | undefined; lastCommentCid?: string | undefined; features?: { [x: string]: unknown; noVideos?: boolean | undefined; noSpoilers?: boolean | undefined; noImages?: boolean | undefined; noVideoReplies?: boolean | undefined; noSpoilerReplies?: boolean | undefined; noImageReplies?: boolean | undefined; noReplyLinks?: boolean | undefined; noPolls?: boolean | undefined; noCrossposts?: boolean | undefined; maxCrosspostDepth?: number | undefined; noNestedReplies?: boolean | undefined; safeForWork?: boolean | undefined; authorFlairs?: boolean | undefined; requireAuthorFlairs?: boolean | undefined; postFlairs?: boolean | undefined; requirePostFlairs?: boolean | undefined; noMarkdownImages?: boolean | undefined; noMarkdownVideos?: boolean | undefined; noMarkdownAudio?: boolean | undefined; noAudio?: boolean | undefined; noAudioReplies?: boolean | undefined; markdownImageReplies?: boolean | undefined; markdownVideoReplies?: boolean | undefined; noPostUpvotes?: boolean | undefined; noReplyUpvotes?: boolean | undefined; noPostDownvotes?: boolean | undefined; noReplyDownvotes?: boolean | undefined; noUpvotes?: boolean | undefined; noDownvotes?: boolean | undefined; requirePostLink?: boolean | undefined; requirePostLinkIsMedia?: boolean | undefined; requireReplyLink?: boolean | undefined; requireReplyLinkIsMedia?: boolean | undefined; pseudonymityMode?: "per-post" | "per-reply" | "per-author" | undefined; } | undefined; suggested?: { [x: string]: unknown; primaryColor?: string | undefined; secondaryColor?: string | undefined; avatarUrl?: string | undefined; bannerUrl?: string | undefined; backgroundUrl?: string | undefined; language?: string | undefined; } | undefined; flairs?: Record | undefined; }; ipnsObj: { signer: import("../signer/index.js").SignerWithPublicKeyAddress; publishToIpns: (content: string, opts?: { verifyResolves?: boolean; ttl?: string; }) => Promise; publishToIpnsValue: (value: string, opts?: { verifyResolves?: boolean; ttl?: string; }) => Promise; pkc: PKC; }; }>; export declare function jsonifyCommunityAndRemoveInternalProps(community: RemoteCommunity): { [x: string]: any; }; export declare function jsonifyLocalCommunityWithNoInternalProps(community: LocalCommunity): { address: string; publicKey?: string | undefined; shortAddress: string; signature?: CommunityIpfsType["signature"] | undefined; name?: string | undefined; flairs?: Record | undefined; signer: import("../signer/index.js").SignerWithPublicKeyAddress; protocolVersion: CommunityIpfsType["protocolVersion"]; lastCommentCid?: string | undefined; nameResolved?: boolean | undefined; anchor?: { publicKey: string; } | undefined; encryption: CommunityIpfsType["encryption"]; createdAt: CommunityIpfsType["createdAt"]; updatedAt?: CommunityIpfsType["updatedAt"] | undefined; title?: string | undefined; posts: PostsPages; modQueue: import("../pages/pages.js").ModQueuePages; challenges: CommunityIpfsType["challenges"]; roles?: Record | undefined; description?: string | undefined; pubsubTopic?: string | undefined; statsCid?: string | undefined; postUpdates?: Record | undefined; rules?: string[] | undefined; lastPostCid?: string | undefined; features?: { [x: string]: unknown; noVideos?: boolean | undefined; noSpoilers?: boolean | undefined; noImages?: boolean | undefined; noVideoReplies?: boolean | undefined; noSpoilerReplies?: boolean | undefined; noImageReplies?: boolean | undefined; noReplyLinks?: boolean | undefined; noPolls?: boolean | undefined; noCrossposts?: boolean | undefined; maxCrosspostDepth?: number | undefined; noNestedReplies?: boolean | undefined; safeForWork?: boolean | undefined; authorFlairs?: boolean | undefined; requireAuthorFlairs?: boolean | undefined; postFlairs?: boolean | undefined; requirePostFlairs?: boolean | undefined; noMarkdownImages?: boolean | undefined; noMarkdownVideos?: boolean | undefined; noMarkdownAudio?: boolean | undefined; noAudio?: boolean | undefined; noAudioReplies?: boolean | undefined; markdownImageReplies?: boolean | undefined; markdownVideoReplies?: boolean | undefined; noPostUpvotes?: boolean | undefined; noReplyUpvotes?: boolean | undefined; noPostDownvotes?: boolean | undefined; noReplyDownvotes?: boolean | undefined; noUpvotes?: boolean | undefined; noDownvotes?: boolean | undefined; requirePostLink?: boolean | undefined; requirePostLinkIsMedia?: boolean | undefined; requireReplyLink?: boolean | undefined; requireReplyLinkIsMedia?: boolean | undefined; pseudonymityMode?: "per-post" | "per-reply" | "per-author" | undefined; } | undefined; suggested?: { [x: string]: unknown; primaryColor?: string | undefined; secondaryColor?: string | undefined; avatarUrl?: string | undefined; bannerUrl?: string | undefined; backgroundUrl?: string | undefined; language?: string | undefined; } | undefined; settings: import("../community/types.js").RpcLocalCommunityLocalProps["settings"]; raw: RpcLocalCommunity["raw"]; updateCid?: string | undefined; ipnsHops?: string[] | undefined; editable: Pick; exports: import("../community/types.js").CommunityExportRecord[]; ipnsPubsubTopic?: string | undefined; ipnsName?: string | undefined; ipnsPubsubTopicRoutingCid?: string | undefined; pubsubTopicRoutingCid?: string | undefined; anchorRecordSequence?: string | undefined; }; export declare function jsonifyCommentAndRemoveInstanceProps(comment: Comment): { [x: string]: any; }; export declare function waitUntilPKCCommunitiesIncludeCommunityAddress(pkc: PKC, communityAddress: string): Promise; export declare function isPKCFetchingUsingGateways(pkc: PKC): boolean; export declare function mockRpcServerForTests(pkcWs: any): void; export declare function disablePreloadPagesOnSub({ community }: { community: LocalCommunity; }): { cleanup: () => void; }; export declare function mockPostToReturnSpecificCommentUpdate(commentToBeMocked: Comment, commentUpdateRecordString: string): void; export declare function mockPostToFailToLoadFromPostUpdates(postToBeMocked: Comment): void; export declare function mockPostToHaveCommunityWithNoPostUpdates(postToBeMocked: Comment): void; export declare function createCommentUpdateWithInvalidSignature(commentCid: string): Promise<{ cid: string; upvoteCount: number; downvoteCount: number; replyCount: number; updatedAt: number; signature: { type: string; signature: string; publicKey: string; signedPropertyNames: string[]; }; protocolVersion: string; childCount?: number | undefined; number?: number | undefined; postNumber?: number | undefined; edit?: { [x: string]: unknown; 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; communityPublicKey?: string | undefined; communityName?: string | undefined; spoiler?: boolean | undefined; nsfw?: boolean | undefined; reason?: string | undefined; content?: string | undefined; deleted?: boolean | undefined; author?: { [x: string]: unknown; name?: string | undefined; previousCommentCid?: string | undefined; displayName?: string | undefined; wallets?: Record | 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; } | undefined; flairs?: { [x: string]: unknown; text: string; backgroundColor?: string | undefined; textColor?: string | undefined; expiresAt?: number | undefined; }[] | undefined; spoiler?: boolean | undefined; nsfw?: boolean | undefined; pinned?: boolean | undefined; locked?: boolean | undefined; archived?: boolean | undefined; removed?: boolean | undefined; reason?: string | undefined; approved?: boolean | undefined; author?: { [x: string]: unknown; community?: { [x: string]: unknown; postScore: number; replyScore: number; firstCommentTimestamp: number; lastCommentCid: string; banExpiresAt?: number | undefined; flairs?: { [x: string]: unknown; text: string; backgroundColor?: string | undefined; textColor?: string | undefined; expiresAt?: number | undefined; }[] | undefined; } | undefined; } | undefined; lastChildCid?: string | undefined; lastReplyTimestamp?: number | undefined; replies?: { pages: Record | 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; thumbnailUrl?: string | undefined; thumbnailUrlWidth?: number | undefined; thumbnailUrlHeight?: number | undefined; previousCid?: string | undefined; pseudonymityMode?: "per-post" | "per-reply" | "per-author" | undefined; }; commentUpdate: { [x: string]: unknown; cid: string; upvoteCount: number; downvoteCount: number; replyCount: number; updatedAt: number; signature: { type: string; signature: string; publicKey: string; signedPropertyNames: string[]; }; protocolVersion: string; childCount?: number | undefined; number?: number | undefined; postNumber?: number | undefined; edit?: { [x: string]: unknown; 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; communityPublicKey?: string | undefined; communityName?: string | undefined; spoiler?: boolean | undefined; nsfw?: boolean | undefined; reason?: string | undefined; content?: string | undefined; deleted?: boolean | undefined; author?: { [x: string]: unknown; name?: string | undefined; previousCommentCid?: string | undefined; displayName?: string | undefined; wallets?: Record | 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; } | undefined; flairs?: { [x: string]: unknown; text: string; backgroundColor?: string | undefined; textColor?: string | undefined; expiresAt?: number | undefined; }[] | undefined; spoiler?: boolean | undefined; nsfw?: boolean | undefined; pinned?: boolean | undefined; locked?: boolean | undefined; archived?: boolean | undefined; removed?: boolean | undefined; reason?: string | undefined; approved?: boolean | undefined; author?: { [x: string]: unknown; community?: { [x: string]: unknown; postScore: number; replyScore: number; firstCommentTimestamp: number; lastCommentCid: string; banExpiresAt?: number | undefined; flairs?: { [x: string]: unknown; text: string; backgroundColor?: string | undefined; textColor?: string | undefined; expiresAt?: number | undefined; }[] | undefined; } | undefined; } | undefined; lastChildCid?: string | undefined; lastReplyTimestamp?: number | undefined; replies?: /*elided*/ any | undefined; }; }[]; nextCid?: string | undefined; }>; pageCids?: Record | undefined; } | undefined; }>; export declare function mockPKCToTimeoutFetchingCid(pkc: PKC): { cleanUp: () => void; }; export declare function mockCommentToNotUsePagesForUpdates(comment: Comment): void; export declare function forceLocalSubPagesToAlwaysGenerateMultipleChunks({ community, parentComment, forcedPreloadedPageSizeBytes, parentCommentReplyProps, communityPostsCommentProps }: { community: LocalCommunity | RemoteCommunity; parentComment?: Comment; forcedPreloadedPageSizeBytes?: number; parentCommentReplyProps?: Partial; communityPostsCommentProps?: CreateCommentOptions; }): Promise<{ cleanup: () => void; }>; export declare function findOrPublishCommentWithDepth({ depth, community, pkc }: { depth: number; community: RemoteCommunity; pkc?: PKC; }): Promise; export declare function findOrPublishCommentWithDepthWithHttpServerShortcut({ depth, community, pkc }: { depth: number; community: RemoteCommunity; pkc?: PKC; }): Promise; export declare function publishCommentWithDepth({ depth, community }: { depth: number; community: RemoteCommunity; }): Promise; export declare function getCommentWithCommentUpdateProps({ cid, pkc }: { cid: string; pkc: PKC; }): Promise; export declare function publishCommentToModQueue({ community, pkc, parentComment, commentProps }: { community: RemoteCommunity; pkc?: PKC; parentComment?: Comment; commentProps?: Partial; }): Promise<{ comment: Comment; challengeVerification: DecryptedChallengeVerificationMessageType; }>; export declare function publishToModQueueWithDepth({ community, depth, pkc, modCommentProps, commentProps }: { community: RemoteCommunity; pkc: PKC; depth: number; modCommentProps?: Partial; commentProps?: Partial; }): Promise<{ comment: Comment; challengeVerification: unknown; }>; export declare function forceCommunityToGenerateAllPostsPages(community: RemoteCommunity, commentProps?: CreateCommentOptions): Promise; export declare function mockReplyToUseParentPagesForUpdates(reply: Comment): void; export declare function mockUpdatingCommentResolvingAuthor(comment: Comment, mockFunction: Comment["_clientsManager"]["resolveAuthorNameIfNeeded"]): void; export declare function getRandomPostCidFromSub(communityAddress: string, pkc: PKC): Promise; export declare function mockNameResolvers({ pkc, resolveFunction }: { pkc: PKC; resolveFunction: (opts: T) => Promise<{ publicKey: string; [key: string]: string; } | undefined>; }): void; export declare function processAllCommentsRecursively(comments: (Comment | CommentWithinRepliesPostsPageJson)[] | undefined, processor: (comment: Comment | CommentWithinRepliesPostsPageJson) => void): void; export {};