General

interface General

Defines the general-purpose API for querying chain-wide information.

This interface provides methods to fetch data about checkpoints, epochs, gas prices, and the overall system state of the Sui network.

Inheritors

Properties

Link copied to clipboard
abstract val config: SuiConfig

The SuiConfig object specifying the RPC endpoint and connection settings.

Functions

Link copied to clipboard
abstract suspend fun getChainIdentifier(): Result<GetChainIdentifierQuery.Data?, SuiError>

Fetches the first 4 bytes of the chain's genesis checkpoint digest.

Link copied to clipboard
abstract suspend fun getCheckpoint(checkpointId: CheckpointId? = CheckpointId()): Result<GetCheckpointQuery.Data?, SuiError>

Fetches the details of a specific checkpoint.

Link copied to clipboard
abstract suspend fun getCheckpoints(first: Int?, before: String?, last: Int?, after: String?): Result<GetCheckpointsQuery.Data?, SuiError>

Fetches a paginated list of checkpoints.

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

Fetches details about the current epoch.

Link copied to clipboard
abstract suspend fun getLatestCheckpointSequenceNumber(): Result<GetLatestCheckpointSequenceNumberQuery.Data?, SuiError>

Fetches the sequence number of the most recently processed checkpoint.

Link copied to clipboard
abstract suspend fun getLatestSuiSystemState(): Result<GetLatestSuiSystemStateQuery.Data?, SuiError>

Fetches the most recent SuiSystemState object.

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

Fetches the protocol configuration for a specific version.

Link copied to clipboard
abstract suspend fun getReferenceGasPrice(): Result<GetReferenceGasPriceQuery.Data?, SuiError>

Fetches the current reference gas price for the network.

Link copied to clipboard
abstract suspend fun paginateCheckpointTransactionBlocks(id: CheckpointId? = null, after: String? = null): Result<PaginateCheckpointTransactionBlocksQuery.Data?, SuiError>

Fetches a paginated list of transaction blocks for a given checkpoint.

Link copied to clipboard
abstract suspend fun paginateEpochValidators(id: Long, after: String? = null): Result<PaginateEpochValidatorsQuery.Data?, SuiError>

Fetches a paginated list of validators for a specific epoch.

Link copied to clipboard
inline suspend fun <T> General.query(query: GraphqlQuery): Nothing