@maxtrader/backtest-persistence-idb
v0.1.1
Published
IndexedDB persistence adapters for journal entries and screenshots.
Readme
@maxtrader/backtest-persistence-idb
IndexedDB persistence adapters for journal entries and screenshots.
Purpose
- Provide browser persistence implementation of protocol adapter interfaces.
- Keep journal and screenshot storage deterministic and replay-friendly.
Exports
IndexedDbJournalStoreIndexedDbScreenshotStore
Journal Store Usage
import { IndexedDbJournalStore } from "@maxtrader/backtest-persistence-idb";
const journalStore = new IndexedDbJournalStore({
dbName: "myapp.backtest",
storeName: "entries"
});Screenshot Store Usage
import { IndexedDbScreenshotStore } from "@maxtrader/backtest-persistence-idb";
const screenshotStore = new IndexedDbScreenshotStore({
dbName: "myapp.backtest",
storeName: "screenshots"
});Notes
- Journal store keys by
seq. - Screenshot store keys by screenshot reference
id. readRefs()returns references sorted bycursor,ts, thenid.
