import type { ConnectConfig, GetDataConfig, SessionInitResult } from "../core/types.js"; /** * Creates a session on the Session Relay and returns the session ID, connect URL, and deep link URL. * * @deprecated For current Account browser approval, use the Direct controller * from `@opendatalabs/vana-sdk/server`. This legacy session-only Account URL * does not satisfy current Account's OAuth client requirements. * * @param config - Connection configuration including private key and scopes. * @returns Session ID, connect URL, and expiration timestamp. * @throws {@link ConnectError} with code `SESSION_INIT_FAILED` if the relay rejects the request. * * @example * ```typescript * const session = await connect({ * privateKey: process.env.VANA_PRIVATE_KEY as `0x${string}`, * scopes: ["chatgpt.conversations"], * }); * // session.sessionId, session.connectUrl, session.expiresAt * ``` */ export declare function connect(config: ConnectConfig): Promise; /** * Fetches user data from their Personal Server using a signed grant. * * Resolves the server URL via the Data Portability Gateway, then fetches * data for each scope in the grant concurrently. * * @param config - Data fetch configuration including private key and grant. * @returns A `Record` keyed by scope name with the fetched data as values. * @throws {@link ConnectError} with code `SERVER_NOT_FOUND` if no server is registered. * @throws {@link ConnectError} with code `DATA_FETCH_FAILED` if a scope fetch fails. * * @example * ```typescript * const data = await getData({ * privateKey: process.env.VANA_PRIVATE_KEY as `0x${string}`, * grant, * }); * const conversations = data["chatgpt.conversations"]; * ``` */ export declare function getData(config: GetDataConfig): Promise>; //# sourceMappingURL=connect.d.ts.map