getCurrentEpoch

abstract suspend fun getCurrentEpoch(): Result<GetCurrentEpochQuery.Data?, SuiError>

Fetches details about the current epoch.

This includes the epoch number, start timestamp, and other epoch-specific data.

Return

A Result which is either:

  • Ok: Containing a nullable GetCurrentEpochQuery.Data object with the current epoch details.

  • Err: Containing a SuiError object with a list of GraphQLErrors.