Skip to content

Latest commit

 

History

History
45 lines (37 loc) · 907 Bytes

File metadata and controls

45 lines (37 loc) · 907 Bytes

listReports

Usage

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)
});

Parameters

import type { ListReportsParams } from "@cartesi/client";
// {
//   application: Address | string;
//   epochIndex?: bigint;
//   inputIndex?: bigint;
//   from?: bigint;
//   to?: bigint;
//   limit?: number;
//   offset?: number;
//   descending?: boolean;
// }

Return Type

import type { ListReportsReturnType, Report, Pagination } from "@cartesi/client";
// ListReportsReturnType = {
//   data: Report[];
//   pagination: Pagination;
// }