@fireflydb/web
v0.0.11
Published
Shared browser drivers for FireflyDB: WebSocket sync (bearer via Sec-WebSocket-Protocol) and IndexedDB device-key storage, consumed by the platform SQLite wrapper packages
Maintainers
Readme
@fireflydb/web
Shared browser drivers for FireflyDB:
WebWebSocketDriver— sync over a DOM WebSocket. Browsers can't set headers on WebSocket connects, so the bearer JWT rides an offered subprotocol (bearer.<jwt>, with an inertfireflydbentry for the relay to echo).IndexedDbSecureStorage— persistence for the 32-byte Ed25519 device seed. Origin-isolated but not encrypted at rest; pass your ownSecureStorageDriverif you need stronger custody.
This package does not open a database and has no SQLite driver. On web,
FireflyDB runs through the platform SQLite wrapper — @fireflydb/op-sqlite-driver
today (expo-sqlite planned) — whose web entry wires these drivers into a
FireflyClient for you. The firefly extension itself reaches the browser by
aliasing op-sqlite's optional @sqlite.org/sqlite-wasm peer to
@fireflydb/sqlite-wasm (built in sqlite-wasm/ here; see its README).
Install
You normally don't install this directly — it's an optional peer of
@fireflydb/op-sqlite-driver, pulled in for web builds:
pnpm add @fireflydb/webSee the "Web" section of ../op-sqlite/README.md for the full setup
(wasm alias, COOP/COEP headers, Vite config).
