queryTransactionBlocks

suspend fun queryTransactionBlocks(query: TransactionBlockResponseQuery, cursor: String? = null, limit: Int? = null, descendingOrder: Boolean = false): TransactionBlocksPage

Queries the transaction blocks based on the given parameters.

Return

a TransactionBlocksPage object containing the transaction blocks that match the query parameters.

Parameters

query

the TransactionBlockResponseQuery object containing the query parameters.

cursor

an optional string representing the cursor to use for pagination. Defaults to null.

limit

an integer representing the maximum number of results to return. Defaults to QUERY_MAX_RESULT_LIMIT if null.

descendingOrder

a boolean indicating whether the results should be sorted in descending order. Defaults to false (ascending order), oldest record first.

Throws

if the response from the server is an error.