getCommitteeInfo

abstract suspend fun getCommitteeInfo(epochId: Long? = null, after: String? = null): Result<GetCommitteeInfoQuery.Data?, SuiError>

Fetches the committee of validators for a specific epoch.

If the epoch ID is not provided, it defaults to the current epoch.

Return

A Result which is either:

  • Ok: Containing a nullable GetCommitteeInfoQuery.Data object with a list of validators and a pagination cursor.

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

Parameters

epochId

The epoch number for which to fetch the committee information.

after

An optional cursor for forward pagination.