import { CID } from "multiformats/cid"; export declare const ADDRESS_REPROVIDE_POLL_INTERVAL_MS: number; export declare function normalizeSelfAddrsForProvider(addrs: string[], peerId: string): string[]; export type ReprovideKuboRpcClient = { id: () => Promise<{ id: { toString: () => string; }; addresses: Array<{ toString: () => string; }>; }>; swarm: { addrs: () => Promise string; }; addrs: Array<{ toString: () => string; }>; }>>; }; routing: { provide: (cid: CID, options?: { recursive?: boolean; }) => AsyncIterable; }; }; export type AddressChangeReprovidable = { address: string; pubsubTopicRoutingCid?: string; ipnsPubsubTopicRoutingCid?: string; _lastProvidedBrowserDialableSelfAddrs?: string[]; _lastAddressReprovideCheckAt?: number; _clientsManager: { getDefaultKuboRpcClient: () => { _client: ReprovideKuboRpcClient; }; }; }; export declare function isBrowserDialableAddr(addr: string): boolean; export declare function getBrowserDialableSelfAddrs(client: ReprovideKuboRpcClient): Promise; /** * Re-provide the connection-critical CIDs when the node's browser-dialable (WSS/WebRTC) self-addresses * have changed since the last provide. This pushes the current addresses to the HTTP routers so browsers * don't get NoValidAddressesError against stale/dead addresses. * * The first observation only establishes a baseline (start() already force-provides these CIDs with fresh * addresses via providePubsubTopicRoutingCidsIfNeeded); subsequent changes trigger a re-provide. */ export declare function reprovideConnectionCidsIfBrowserAddrsChanged(community: AddressChangeReprovidable): Promise<{ reprovided: boolean; providedCids: string[]; browserAddrs: string[]; }>; /** * Publish-loop entry point. The publish loop runs once per sync cycle (and faster during bursts), so this * throttles the kubo id()/swarm.addrs() poll to ADDRESS_REPROVIDE_POLL_INTERVAL_MS before delegating to the * core change-detection. Lives inside the publish loop so it's torn down together with the loop on stop(). */ export declare function reprovideOnAddressChangeIfDue(community: AddressChangeReprovidable): Promise;