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