export type GetApiGetPlatformsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Returns platforms (also known as `blockchainId` in other API endpoints) that Curve is deployed on, and which pool registries are available on each platform. * * GET /getPlatforms */ export const getApiGetPlatforms = async (options?: GetApiGetPlatformsOptions) => { const {baseUrl = "https://api.curve.finance/v1", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/getPlatforms${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "GET", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };