import { invokeTauri } from "@/shared/api/tauri"; import type { RelayEvent } from "@/shared/api/types"; export async function getEventById(eventId: string): Promise { const eventJson = await invokeTauri("get_event", { eventId }); return JSON.parse(eventJson) as RelayEvent; } export async function getEventsByIds( eventIds: string[], ): Promise { if (eventIds.length === 0) return []; return invokeTauri("get_events", { eventIds }); }