queryEvents

suspend fun queryEvents(eventFilter: EventFilter, cursor: EventID? = null, limit: Int? = null, descendingOrder: Boolean? = null): EventPage

Queries events on the Sui blockchain matching the given eventFilter. d It optionally starts from the event with the specified cursor, returning at most limit events, otherwise QUERY_MAX_RESULT_LIMIT, and in either ascending or descending order based on descendingOrder. Returns an EventPage containing the matching events and pagination information.

Return

an EventPage containing the matching events and pagination information

Parameters

eventFilter

the query criteria used to match events on the blockchain

cursor

the event ID from which to start querying events, defaults to null which will start from the beginning

limit

the maximum number of events to return, default to QUERY_MAX_RESULT_LIMIT if not specified.

descendingOrder

the order in which to return the events, default to false (ascending order), oldest record first.

Throws

if there is an error querying the events