listOutputs
Usage
import { } from "viem";
import { } from "@cartesi/client";
const = ({
: ("http://127.0.0.1:6751/rpc"),
});
const { , } = await .({
: "0x...",
: 10,
: 0,
// epochIndex, inputIndex, outputType, voucherAddress, from, to, executed (optional)
});Parameters
import type { } from "@cartesi/client";
// {
// application: Address | string;
// epochIndex?: bigint;
// inputIndex?: bigint;
// outputType?: OutputType | NonEmptyArray<OutputType>;
// voucherAddress?: Address;
// from?: bigint;
// to?: bigint;
// executed?: boolean;
// limit?: number;
// offset?: number;
// descending?: boolean;
// }outputType accepts a list, and executed filters by execution status, so the
outputs still waiting to be executed can be fetched in one call. The node
rejects an empty list with invalid params, so the list is typed as a non-empty
array — outputType: [] is a compile error rather than a failed request:
const { : } = await .({
: "0x...",
: ["Voucher", "DelegateCallVoucher"],
: false,
});Return Type
import type { , , } from "@cartesi/client";
// ListOutputsReturnType = {
// data: Output[];
// pagination: Pagination;
// }