Skip to content
Logo

getEpochByVirtualIndex

Fetches a single epoch by its virtual index, which is the epoch's dense insertion rank — 0, 1, 2, … with no gaps by construction. Use it to walk the epochs of an application contiguously, where the epoch index itself can skip values.

Usage

import {  } from "viem";
import {  } from "@cartesi/client";
 
const  = ({
  : ("http://127.0.0.1:6751/rpc"),
});
 
const  = await .({
  : "0x...",
  : 42n,
});

Parameters

import type {  } from "@cartesi/client";
// {
//   application: Address | string;
//   virtualIndex: bigint;
// }

Return Type

import type { ,  } from "@cartesi/client";
// GetEpochByVirtualIndexReturnType = Epoch;