import { type HeartbeatResponse } from "../../schemas/index"; import type { DelegateBase } from "../../schemas/delegate"; /** * Checks if a delegated provider is online by sending a heartbeat round-trip. * Can also be used to check if the local SDK worker is responsive. * * @param params - Delegation target to check * @param params.delegate - The provider to check (providerPublicKey + optional timeout) * @returns A promise that resolves to a heartbeat response if the provider is reachable. * @throws {QvacErrorBase} When the provider is unreachable or the response is invalid. * * @example * // Check if a delegated provider is online * try { * await heartbeat({ * delegate: { providerPublicKey: "peerHex", timeout: 3000 }, * }); * console.log("Provider is online"); * } catch { * console.log("Provider is offline"); * } * * @example * // Check if the local SDK worker is responsive * await heartbeat(); */ export declare function heartbeat(params?: { delegate?: DelegateBase; }): Promise; //# sourceMappingURL=heartbeat.d.ts.map