import { FeedId } from 'ssb-typescript'; import { CONN } from '../conn'; export declare type Peer = { address?: string; key?: string; host?: string; port?: number; source: 'pub' | 'manual' | 'friends' | 'local' | 'dht' | 'bt' | 'stored'; error?: string; state?: undefined | 'connecting' | 'connected' | 'disconnecting'; stateChange?: number; failure?: number; client?: boolean; duration?: { mean: number; }; ping?: { rtt: { mean: number; }; skew: number; fail?: any; }; disconnect?: Function; }; export interface Config { conn?: { autostart: boolean; populatePubs: boolean; }; } export interface SSB { readonly id: FeedId; readonly friends?: Readonly<{ graphStream: (opts: { old: boolean; live: boolean; }) => CallableFunction; hopStream: (opts: { old: boolean; live: boolean; }) => CallableFunction; }>; readonly roomClient?: Readonly<{ discoveredAttendants: () => CallableFunction; }>; readonly bluetooth?: Readonly<{ nearbyScuttlebuttDevices: (x: number) => CallableFunction; }>; readonly lan?: Readonly<{ start: () => void; stop: () => void; discoveredPeers: () => CallableFunction; }>; readonly db?: Readonly<{ onMsgAdded?: (cb: CallableFunction) => CallableFunction; query: (...args: Array) => any; operators: Record; }>; readonly conn: CONN; } export declare type Callback = (err?: any, val?: T) => void;