/** * MCP Device Flow 登录 - 可复用模块 * 从 auth.cmd.ts 的 loginWithDeviceFlow 场景抽取,供 CLI 及其他调用方使用。 */ import type { GateMcpClient } from "./wallet-mcp-clients.js"; export declare function openBrowser(url: string): Promise; export interface DeviceFlowLoginOptions { /** 是否保存 token 到默认 auth 文件,默认 true */ saveToken?: boolean; /** 登录成功后是否上报钱包地址,默认 true */ reportAddresses?: boolean; } /** 登录结果:成功返回 true,失败/取消/超时返回 false */ export type DeviceFlowLoginResult = boolean; /** * 使用 MCP Device Flow 完成 Gate/Google 登录。 * 会启动 device flow、打开浏览器、轮询直至授权完成,并可选保存 token、上报地址。 * * @param mcp 已连接的 GateMcpClient * @param serverUrl MCP 服务 URL(保存 token 时写入) * @param isGoogle 是否使用 Google OAuth,否则为 Gate * @param provider 展示用名称,如 "Google" / "Gate" * @param options 可选:saveToken、reportAddresses * @returns 成功返回 true,失败/取消/超时返回 false */ export declare function loginWithDeviceFlow(mcp: GateMcpClient, serverUrl: string, isGoogle: boolean, provider: string, options?: DeviceFlowLoginOptions): Promise; //# sourceMappingURL=device-flow-login.d.ts.map