SmartAccountException

Base sealed class for Smart Account exceptions.

SmartAccountException provides detailed error information including error codes, descriptive messages, and optional underlying causes.

Example error handling:

try {
val wallet = smartAccountKit.createWallet(name = "My Wallet")
println("Wallet created: ${wallet.address}")
} catch (e: SmartAccountException) {
when (e) {
is WebAuthnException.Cancelled ->
println("User cancelled authentication")
is CredentialException.DeploymentFailed ->
println("Failed to deploy contract: ${e.message}")
else ->
println("Error ${e.code.code}: ${e.message}")
}
}

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val cause: Throwable?
Link copied to clipboard
Link copied to clipboard
open override val message: String

Functions

Link copied to clipboard
open override fun toString(): String