WalletConnectionStorage

Simple key-value storage interface for persisting external wallet connections.

Implementations must be thread-safe. Platform-specific implementations can use SharedPreferences (Android), UserDefaults (iOS), localStorage (Web), or any other persistent key-value store.

Example implementation:

class LocalStorageWalletConnectionStorage : WalletConnectionStorage {
override suspend fun getItem(key: String): String? = localStorage.getItem(key)
override suspend fun setItem(key: String, value: String) = localStorage.setItem(key, value)
override suspend fun removeItem(key: String) = localStorage.removeItem(key)
}

Functions

Link copied to clipboard
abstract suspend fun getItem(key: String): String?

Retrieves a value by key.

Link copied to clipboard
abstract suspend fun removeItem(key: String)

Removes a value by key. No-op if the key does not exist.

Link copied to clipboard
abstract suspend fun setItem(key: String, value: String)

Stores a value for a key. Overwrites any existing value.