Events

@Serializable
data class Events(val diagnosticEventsXdr: List<String>? = null, val transactionEventsXdr: List<String>? = null, val contractEventsXdr: List<List<String>>? = null)

Container for Soroban events emitted during transaction execution.

Events provide insight into smart contract execution, including transaction-level events and contract-specific events. Events are returned as base64-encoded XDR strings and can be parsed into typed XDR objects for detailed analysis.

This class is used by GetTransactionResponse and GetTransactionsResponse.TransactionInfo to encapsulate event data.

See also

Constructors

Link copied to clipboard
constructor(diagnosticEventsXdr: List<String>? = null, transactionEventsXdr: List<String>? = null, contractEventsXdr: List<List<String>>? = null)

Properties

Link copied to clipboard

Nested list of contract events in base64-encoded XDR format. The outer list corresponds to operations in the transaction, and the inner lists contain events emitted by each operation. Contract events are explicitly emitted by smart contracts using the events SDK functions. Can be parsed using parseContractEventsXdr.

Link copied to clipboard

Not sent by stellar-rpc. Diagnostic events are in GetTransactionResponse.diagnosticEventsXdr and GetTransactionsResponse.TransactionInfo.diagnosticEventsXdr.

Link copied to clipboard

List of transaction-level events in base64-encoded XDR format. These events are associated with the transaction as a whole. Can be parsed using parseTransactionEventsXdr.

Functions

Link copied to clipboard

Parses the contractEventsXdr field from a nested list of base64-encoded XDR strings to a nested list of typed ContractEvent objects.

Link copied to clipboard

Parses the diagnosticEventsXdr field from a list of base64-encoded XDR strings to a list of typed DiagnosticEvent objects.

Link copied to clipboard

Parses the transactionEventsXdr field from a list of base64-encoded XDR strings to a list of typed TransactionEvent objects.