export type GetApiGetMainPoolsAPYsBlockchainIdArgs = {blockchainId: }; export type GetApiGetMainPoolsAPYsBlockchainIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Returns *inaccurate* volume and base APY data for `main` registry pools on chains that aren’t indexed by either the [Curve Prices API](https://prices.curve.finance/feeds-docs) or the [Curve subgraphs](https://github.com/curvefi/volume-subgraphs). * * GET /getMainPoolsAPYs/{blockchainId} */ export const getApiGetMainPoolsAPYsBlockchainId = async (args: GetApiGetMainPoolsAPYsBlockchainIdArgs, options?: GetApiGetMainPoolsAPYsBlockchainIdOptions) => { const {baseUrl = "https://api.curve.finance/v1", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/getMainPoolsAPYs/${encodeURIComponent(String(args.blockchainId))}${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 };