import { http } from "viem";
import { createCartesiPublicClient } from "@cartesi/client";
const publicClientL2 = createCartesiPublicClient({
transport: http("http://127.0.0.1:6751/rpc"),
});
const { data, pagination } = await publicClientL2.listReports({
application: "0x...",
limit: 10,
offset: 0,
// epochIndex, inputIndex, from, to (optional)
});
import type { ListReportsParams } from "@cartesi/client";
// {
// application: Address | string;
// epochIndex?: bigint;
// inputIndex?: bigint;
// from?: bigint;
// to?: bigint;
// limit?: number;
// offset?: number;
// descending?: boolean;
// }
import type { ListReportsReturnType, Report, Pagination } from "@cartesi/client";
// ListReportsReturnType = {
// data: Report[];
// pagination: Pagination;
// }