An SQLite-based contract state cache for the Warp SDK (arweave smart contracts). Version 1.0.2 uses `better-sqlite3` for synchronous, fast I/O — differentiator vs the default LMDB cache or LevelDB alternatives. Released sporadically, peer dep on `warp-contracts` ^1.4.7. Ships TypeScript definitions. Common footgun: forgetting to call `close()` or assuming async initialization.
npm install warp-contracts-sqliteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes a SQLite-backed contract cache, connects it to Warp, reads contract state, and safely closes the cache.
Use `cache.clear()` or initiate a new cache instance for each fresh evaluation.
Consider wrapping in a worker thread or using the LMDB cache for concurrent access.
Upgrade to v1.0.2 or pass `{ dbPath: '...' }` as the first argument.Remove explicit `init()` call; still safe to keep.
npm install better-sqlite3 (ensure build tools for native modules)
Use ESM import: `import { SqliteContractCache } from 'warp-contracts-sqlite'`Ensure `await cache.init()` completes before calling close().
Do not reuse a closed cache; create a new instance.