@tat-protocol/storage
v1.1.1
Published
Storage module for TAT Protocol
Maintainers
Readme
@tat-protocol/storage
Storage abstractions and backends for Node.js and browser environments.
Install
npm install @tat-protocol/storageExports
Storage(backend wrapper)NodeStore(filesystem-backed storage)BrowserStore(localStorage-backed storage)StorageInterface
Quick Start
Node.js
import { Storage, NodeStore } from "@tat-protocol/storage";
const storage = new Storage(new NodeStore(".tat-state"));
await storage.setItem("example", JSON.stringify({ ok: true }));Browser
import { Storage, BrowserStore } from "@tat-protocol/storage";
const storage = new Storage(new BrowserStore());
await storage.setItem("example", JSON.stringify({ ok: true }));Security Notes
NodeStoresupports optional AES-GCM encryption whenTAT_STORAGE_ENCRYPTION_KEYis set.- Use separate directories per service (
.forge,.pocket,.gate,.booth) for safer operations.
