import type { CommunityIpfsType, CommunityJson } from "./types.js"; import type { PKCError } from "../pkc-error.js"; export type GatewayFetchResult = { res: Response; resText: string | undefined; } | { error: PKCError; }; export type CommunityGatewayFetch = { [gatewayUrl: string]: { abortController: AbortController; promise: Promise; cid?: CommunityJson["updateCid"]; communityRecord?: CommunityIpfsType; error?: PKCError; timeoutId: ReturnType; ttl?: number; ipnsHops?: string[]; }; }; export declare function selectWinningGatewayCommunity(opts: { gatewayFetches: CommunityGatewayFetch; currentUpdatedAt: number; totalGateways: number; fallbackIpnsName: string; }): { community: CommunityIpfsType; cid: string; ipnsHops: string[]; bestGatewayUrl: string; recordAgeSeconds: number; } | undefined;