Subject: Issue with Persistent Storage Plugins (data-store w/ sql.js, data-store-json) in Chrome Extension MV3 Service Worker (Veramo v6) #1450
-
|
Hi Veramo Team & Community, I'm working on building a browser wallet using Veramo (v6.x, latest stable packages) as a Chrome Extension with Manifest V3. The core agent logic runs inside the background Service Worker. My goal is to create a basic Veramo agent instance that can manage DIDs (did:key) and keys (kms-local) with persistent storage that survives service worker restarts and browser sessions. I've encountered significant roadblocks with both primary persistent storage plugin approaches in this environment. Environment: Attempt 1: Using @veramo/data-store (TypeORM + sql.js) Attempt 2: Using @veramo/data-store-json (+ chrome.storage.local helper) Summary of Problem: Neither of the standard persistent storage plugin approaches seems to function correctly out-of-the-box within the MV3 Service Worker environment. The TypeORM/sql.js path fails during initialization or has unreliable persistence, while the data-store-json path fails to correctly assemble the agent methods. Question: Is there a documented, recommended, or known working configuration for achieving persistent agent storage using official Veramo v6 plugins within a Manifest V3 Service Worker? Are these known limitations or bugs? Is there an alternative storage plugin specifically designed for this environment (e.g., directly using IndexedDB via Dexie/idb, or chrome.storage) that integrates correctly with createAgent? Any guidance or examples would be greatly appreciated! Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
The persistence proble; was solved using @veramo/data-store-json by creating a JSON file in which the state of the wallet data is regularly updated. The JSON is stored locally on the browser in Local. |
Beta Was this translation helpful? Give feedback.
The persistence proble; was solved using @veramo/data-store-json by creating a JSON file in which the state of the wallet data is regularly updated. The JSON is stored locally on the browser in Local.
The limit size is 10Mb but it can be further extended by modifying the storage limit on the browser.