export type GetApiVestingByIdsArgs = {ids: string}; export type GetApiVestingByIdsOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Get vesting by IDs * * GET /vesting/by/ids */ export const getApiVestingByIds = async (args: GetApiVestingByIdsArgs, options?: GetApiVestingByIdsOptions) => { const {baseUrl = "https://api.raydium.io", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (args.ids != null) query.append("ids", String(args.ids)) const url = `${baseUrl.replace(/\/+$/, '')}/vesting/by/ids${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 };