UNPKG

@renegade-fi/core

Version:
17 lines 563 B
import { PING_ROUTE } from '../constants.js'; import { BaseError } from '../errors/base.js'; import { getRelayerRaw } from '../utils/http.js'; export async function getPing(config) { const { getBaseUrl } = config; try { const res = await getRelayerRaw(getBaseUrl(PING_ROUTE)); if (res?.timestamp) { return true; } throw new BaseError('Health check failed: Invalid response format'); } catch (error) { throw new BaseError(`Health check failed: ${error}`); } } //# sourceMappingURL=ping.js.map