import type { SyncQueueInput, SyncQueueItem, SyncQueueItemStatus, SyncQueueStats, SyncQueueStorage, SyncState } from "./types"; /** * Generic interface for SQLite database (works with better-sqlite3 and bun:sqlite) */ interface SqliteDatabase { exec(sql: string): void; prepare(sql: string): SqliteStatement; close(): void; } interface SqliteStatement { run(...params: unknown[]): { changes: number; }; get(...params: unknown[]): unknown; all(...params: unknown[]): unknown[]; } /** * SQLite implementation of SyncQueueStorage for Node/Bun environments. * * Works with both `better-sqlite3` (Node) and `bun:sqlite` (Bun). */ export declare class SqliteSyncQueue implements SyncQueueStorage { private db; /** * Create a new SQLite sync queue. * @param db - SQLite database instance (from better-sqlite3 or bun:sqlite) */ constructor(db: SqliteDatabase); /** * Create and open a SQLite database for an account. * Helper for common use case. * * @param accountId - Unique identifier for the account (e.g., address, pubkey hash) * @param dataDir - Directory for database files * @param Database - SQLite Database constructor (e.g., from better-sqlite3 or bun:sqlite) */ static create(accountId: string, dataDir: string, Database: new (path: string) => any): SqliteSyncQueue; private initialize; enqueue(items: SyncQueueInput[]): Promise; claim(count?: number): Promise>; complete(id: string): Promise; completeMany(ids: string[]): Promise; fail(id: string, error: string): Promise; getByTxid(txid: string): Promise; getByStatus(status: SyncQueueItemStatus, limit?: number): Promise; getStats(): Promise; getState(): Promise; setState(state: Partial): Promise; resetProcessing(): Promise; clear(): Promise; close(): Promise; private rowToItem; } export {};