listEpochs
Usage
import { } from "viem";
import { } from "@cartesi/client";
const = ({
: ("http://127.0.0.1:6751/rpc"),
});
const { , } = await .({
: "0x...",
: 10,
: 0,
// status, from, to (optional)
});Parameters
import type { } from "@cartesi/client";
// {
// application: Address | string;
// status?: EpochStatus | NonEmptyArray<EpochStatus>;
// from?: bigint;
// to?: bigint;
// limit?: number;
// offset?: number;
// descending?: boolean;
// }Return Type
import type { , , } from "@cartesi/client";
// ListEpochsReturnType = {
// data: Epoch[];
// pagination: Pagination;
// }The node rejects an empty status list with invalid params, so status is typed
as a non-empty array — status: [] is a compile error rather than a failed
request.