LedgerService

interface LedgerService

Read-only ledger operations exposed as client.ledger.

Functions

Link copied to clipboard
abstract suspend fun blockAtHeight(height: ULong): AptosResult<LedgerBlock>

Fetches a block by its chain height.

Link copied to clipboard
abstract suspend fun blockAtVersion(version: ULong): AptosResult<LedgerBlock>

Fetches the block containing version.

Link copied to clipboard
abstract suspend fun info(): AptosResult<LedgerState>

Fetches the latest ledger state and advertised encrypted-transaction key.