import { RetryOperation } from "retry"; import { PreResolveNameResolverOptions, PostResolveNameResolverSuccessOptions } from "../clients/base-client-manager.js"; import { PKCClientsManager } from "../pkc/pkc-client-manager.js"; import { PKCError } from "../pkc-error.js"; import { ResultOfFetchingCommunity } from "../types.js"; import { NameResolverClient } from "../clients/name-resolver-client.js"; import { LimitedSet } from "../general-util/limited-set.js"; import { CommunityIpfsGatewayClient, CommunityKuboPubsubClient, CommunityKuboRpcClient, CommunityLibp2pJsClient, CommunityPKCRpcStateClient } from "./community-clients.js"; export declare const MAX_FILE_SIZE_BYTES_FOR_COMMUNITY_IPFS: number; export declare class CommunityClientsManager extends PKCClientsManager { clients: { ipfsGateways: { [ipfsGatewayUrl: string]: CommunityIpfsGatewayClient; }; kuboRpcClients: { [kuboRpcClientUrl: string]: CommunityKuboRpcClient; }; pubsubKuboRpcClients: { [pubsubClientUrl: string]: CommunityKuboPubsubClient; }; pkcRpcClients: Record; libp2pJsClients: { [libp2pJsClientUrl: string]: CommunityLibp2pJsClient; }; nameResolvers: { [resolverKey: string]: NameResolverClient; }; }; private _community; private _suppressUpdatingStateForNameResolution; _ipnsLoadingOperation?: RetryOperation; _updateCidsAlreadyLoaded: LimitedSet; private _gatewayEtagsOfLoadedRecords; private _gatewayMaxAgeSecondsFromLastPoll?; private _subscribedIpnsArrivalTopics; private _ipnsArrivalListener?; private _ipnsArrivalClient?; private _pendingIpnsArrivalCids; private _pendingIpnsArrivalHopTargets; private _nextResolveRevalidatesNetwork; private _lastForcedIpnsNetworkRevalidationAtMs; private _wakeUpdateLoopForIpnsArrival?; constructor(community: CommunityClientsManager["_community"]); protected _initKuboRpcClients(): void; protected _initPubsubKuboRpcClients(): void; protected _initLibp2pJsClients(): void; protected _initPKCRpcClients(): void; updateKuboRpcState(newState: CommunityKuboRpcClient["state"], kuboRpcClientUrl: string): void; updateKuboRpcPubsubState(newState: CommunityKuboPubsubClient["state"], pubsubProvider: string): void; updateKuboRpcPubsubStateIfProviderExists(newState: CommunityKuboPubsubClient["state"]): void; updateGatewayState(newState: CommunityIpfsGatewayClient["state"], gateway: string): void; updateLibp2pJsClientState(newState: CommunityLibp2pJsClient["state"], libp2pJsClientUrl: string): void; emitError(e: PKCError): void; protected _getStatePriorToResolvingCommunityIpns(): "fetching-community-ipns" | "fetching-ipns"; preResolveNameResolver(opts: PreResolveNameResolverOptions): void; postResolveNameResolverSuccess(opts: PostResolveNameResolverSuccessOptions): void; protected _getCommunityAddressFromInstance(): string; private _areEquivalentCommunityAddresses; private _deriveAddressFromWireRecord; private _retryLoadingCommunityAddress; updateOnce(): Promise; startUpdatingLoop(): Promise; stopUpdatingLoop(): Promise; private _computeGatewayPollMs; private _parseMaxAgeSeconds; private _normalizedEtagOfResponse; private _onIpnsRecordArrival; private _consumePendingIpnsArrivals; private _syncIpnsArrivalSubscriptions; private _resyncIpnsArrivalSubscriptionsIfArmed; private _clearIpnsArrivalSubscriptions; private _sleepUntilIpnsArrivalOrTimeoutOrAbort; private _resolveCommunityNameWithoutUpdatingState; private _nonAnchorHopsOfLoadedChain; private _applyKeyMigration; private _resolveNameInBackground; _resolvePageAuthorNamesInBackground(): void; private _pinnedIpnsName; fetchNewUpdateForCommunity(communityAddress: string): Promise; private _isIpnsPushChannelHealthyForName; private _fetchCommunityIpnsP2PAndVerify; private _fetchCommunityFromGateways; private _resolveIpnsChainViaGateway; private _proveAnchorClaimIfUnwalked; private _findErrorInCommunityRecord; }