SmartAccountEvent

sealed class SmartAccountEvent

Events emitted by the Smart Account Kit during wallet lifecycle operations.

These events provide hooks for monitoring and responding to key operations:

  • Wallet connection and disconnection

  • Credential lifecycle (creation, deletion)

  • Transaction lifecycle (signing, submission)

  • Session management (expiration)

Example:

kit.events.addListener { event ->
when (event) {
is SmartAccountEvent.WalletConnected ->
println("Connected to ${event.contractId}")
is SmartAccountEvent.TransactionSubmitted ->
println("Transaction ${event.hash} submitted")
else -> {}
}
}

Inheritors

Types

Link copied to clipboard

Emitted when a new credential is created (passkey registered).

Link copied to clipboard
data class CredentialDeleted(val credentialId: String) : SmartAccountEvent

Emitted when a credential is deleted from storage.

Link copied to clipboard
data class SessionExpired(val contractId: String, val credentialId: String) : SmartAccountEvent

Emitted when a session expires during connection attempt.

Link copied to clipboard
data class TransactionSigned(val contractId: String, val credentialId: String?) : SmartAccountEvent

Emitted when a transaction is signed.

Link copied to clipboard
data class TransactionSubmitted(val hash: String, val success: Boolean) : SmartAccountEvent

Emitted when a transaction is submitted to the network.

Link copied to clipboard
data class WalletConnected(val contractId: String, val credentialId: String) : SmartAccountEvent

Emitted when a wallet is connected.

Link copied to clipboard
data class WalletDisconnected(val contractId: String) : SmartAccountEvent

Emitted when a wallet is disconnected.