getProtocolConfig

abstract suspend fun getProtocolConfig(protocolVersion: Int? = null): Result<GetProtocolConfigQuery.Data?, SuiError>

Fetches the protocol configuration for a specific version.

If no version is provided, the latest protocol configuration is returned.

Return

A Result which is either:

  • Ok: Containing a nullable GetProtocolConfigQuery.Data object with the configuration details.

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

Parameters

protocolVersion

An optional integer for the protocol version to query.