SQLite storage adapter for MTKruto (MTProto/Kruto Telegram client). Current stable version 0.0.2, actively maintained. Key differentiator: driver-agnostic (works with both better-sqlite3 and bun:sqlite), synchronous API for zero async overhead, supports branching, range queries, atomic incr, and stores BigInt/Uint8Array. Requires Node >=18 and @mtkruto/node >=0.141.0.
npm install mtkruto-storage-sqliteNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a SQLite storage adapter using better-sqlite3 and pass it to MTKruto client.
Use 'import { StorageSqlite } from 'mtkruto-storage-sqlite' and ensure your project is ESM (e.g., type: module in package.json).Import only as type: import type { SqliteDatabase } from 'mtkruto-storage-sqlite'.Use import Database from 'better-sqlite3' (no destructuring).
Update @mtkruto/node to 0.141.0 or later.
Use better-sqlite3 when running on Node.js.
Run 'npm install mtkruto-storage-sqlite'.
Use 'new StorageSqlite(db)'.
Ensure you pass a Database instance from better-sqlite3 or bun:sqlite, not a path string.
Use better-sqlite3 or bun:sqlite as the driver.
Ensure client.connect() is awaited; if manual, call storage.initialize() first.