import { type FlatSqlSyncChunk, type FlatSqlSyncDatastoreList, type FlatSqlSyncManifest, type FlatSqlPublishedShard, type FlatSqlPublishedShardBatch, type FlatSqlSyncQuery, type FlatSqlWireSpeedProbeQuery, type FlatSqlWireSpeedProbeResult } from '../../flatsql-sync'; import { type DataScanResult, type RawDataRecord, type SdnBackend } from './sdn-backend'; export interface Libp2pFlatSqlSyncClient { readFlatSqlSyncChunk(query: FlatSqlSyncQuery): Promise; listFlatSqlSyncDatastores?(query: Pick): Promise; openFlatSqlSyncManifest?(query: FlatSqlSyncQuery): Promise; readFlatSqlPublishedShard?(query: FlatSqlSyncQuery & { cid: string; }): Promise; readFlatSqlPublishedShardBatch?(query: FlatSqlSyncQuery & { cids: string[]; }): Promise; measureWireSpeed?(query: FlatSqlWireSpeedProbeQuery): Promise; stop?(): Promise | void; } export interface Libp2pFlatSqlSyncBackendOptions { targetPeerId: string; candidateAddrs: string[]; datastoreKey?: string | null; providerId?: string | null; sourceName?: string | null; displayName?: string | null; publicKey?: string | null; schemas?: string[]; syncClient?: Libp2pFlatSqlSyncClient; nodeFactory?: () => Promise; } export interface Libp2pFlatSqlSyncClientOptions { requestTimeoutMs?: number; } export declare const DEFAULT_LIBP2P_FLATSQL_SYNC_REQUEST_TIMEOUT_MS = 60000; export declare const LIBP2P_FLATSQL_SYNC_YAMUX_OPTIONS: { initialStreamWindowSize: number; maxStreamWindowSize: number; maxMessageSize: number; }; export declare const LIBP2P_FLATSQL_SYNC_MAX_OUTBOUND_STREAMS = 512; export declare function createLibp2pFlatSqlSyncBackend(options: Libp2pFlatSqlSyncBackendOptions): SdnBackend; export declare function createDefaultLibp2pFlatSqlSyncClient(candidateAddrs: string[], options?: Libp2pFlatSqlSyncClientOptions): Promise; export interface Libp2pFlatSqlSyncTransportSelection { tcp: boolean; webSockets: boolean; webTransport: boolean; webRtcRelay: boolean; webRtcDirect: boolean; } export declare function selectLibp2pFlatSqlSyncTransports(candidateAddrs: string[]): Libp2pFlatSqlSyncTransportSelection; export declare function isLibp2pFlatSqlSyncAddrDialable(addr: string, selection: Libp2pFlatSqlSyncTransportSelection): boolean; export declare function orderLibp2pFlatSqlSyncDialAddrs(addrs: string[]): string[]; export interface ExchangeFlatSqlSyncStreamOptions { timeoutMs?: number; label?: string; } export declare function exchangeFlatSqlSyncStream(stream: unknown, payloadBytes: Uint8Array, options?: ExchangeFlatSqlSyncStreamOptions): Promise; export declare function dataScanResultFromChunk(chunk: FlatSqlSyncChunk): DataScanResult; export declare function rawRecordsWithDataFromFlatSqlChunk(chunk: FlatSqlSyncChunk, fallbackRefs?: RawDataRecord[]): RawDataRecord[]; export declare function flatSqlRecordKeys(records: RawDataRecord[]): string[]; //# sourceMappingURL=sdn-backend-libp2p-sync.d.ts.map