Skip to main content
Storage adapters are a new feature in v0.3. They provide persistent storage for wallet data across different platforms.

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

v0.3 introduces repositories for low-level data management:

Next Steps