Skip to main content
Storage adapters provide persistent storage for wallet data across different platforms. For production use, always configure a persistent adapter rather than the default in-memory store.

Overview

By default, the Arkade SDK uses InMemoryStorageAdapter which stores data in memory and loses it when the application restarts. For production applications, you should use a persistent storage adapter appropriate for your environment.

Available Storage Adapters

LocalStorage

Browser/PWA persistent storage using localStorage API

IndexedDB

Browser/PWA/Service Worker advanced storage with IndexedDB

AsyncStorage

React Native persistent storage

FileSystem

Node.js file-based storage

Storage Adapter Interface

All storage adapters implement the same interface:

Browser LocalStorage

For browser applications, use LocalStorageAdapter for simple persistent storage:

Browser IndexedDB

For more advanced browser applications or service workers, use IndexedDBStorageAdapter:
IndexedDB is recommended for service workers and applications that need to store large amounts of data.

React Native AsyncStorage

For React Native applications, use AsyncStorageAdapter:

Node.js FileSystem

For Node.js applications, use FileSystemStorageAdapter:

Example: Identity Management

Here’s a complete example showing how to manage identity across sessions:

Repository Pattern

The SDK also exposes repositories for low-level data management:

Next Steps