General

interface General

An interface for reading general information from the Aptos blockchain.

Inheritors

Properties

Link copied to clipboard
abstract val config: AptosConfig

Functions

Link copied to clipboard
abstract suspend fun getBlockByHeight(ledgerHeight: Long, withTransactions: Boolean? = null): Result<Block, AptosSdkError>

Retrieves block information by a specific block height.

Link copied to clipboard
abstract suspend fun getBlockByVersion(ledgerVersion: Long, withTransactions: Boolean? = null): Result<Block, AptosSdkError>

Retrieves block information by a specific ledger version.

Link copied to clipboard
abstract suspend fun getChainId(): Result<Long, AptosSdkError>

Retrieves the chain ID of the connected network.

Link copied to clipboard

Queries the indexer for the top user transactions by gas unit.

Link copied to clipboard

Queries the indexer for the last ledger version it has successfully processed.

Link copied to clipboard
abstract suspend fun getLedgerInfo(): Result<LedgerInfo, AptosSdkError>

Retrieves the latest ledger information from a fullnode.

Link copied to clipboard

Queries the status of a specific indexer processor.

Link copied to clipboard
inline suspend fun <T : List<MoveValue>> General.view(payload: InputViewFunctionData, bcs: Boolean = true, ledgerVersion: LedgerVersionArg? = null): Result<T, AptosSdkError>

Queries a Move view function on the Aptos blockchain.