export type GetApiGetLendingVaultsAllBlockchainIdArgs = {lendingBlockchainId: 'ethereum' | 'arbitrum' | 'optimism' | 'fraxtal' | 'sonic'}; export type GetApiGetLendingVaultsAllBlockchainIdOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Returns all lending vaults, in all registries, on a specific chain. * * GET /getLendingVaults/all/{blockchainId} */ export const getApiGetLendingVaultsAllBlockchainId = async (args: GetApiGetLendingVaultsAllBlockchainIdArgs, options?: GetApiGetLendingVaultsAllBlockchainIdOptions) => { const {baseUrl = "https://api.curve.finance/v1", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/getLendingVaults/all/${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 };