import type { CoValueHeader, Transaction } from "../../coValueCore/verifiedState.js"; import type { Signature } from "../../crypto/crypto.js"; import type { RawCoID, SessionID } from "../../exports.js"; import type { CoValueKnownState } from "../../knownState.js"; import type { PeerID } from "../../sync.js"; import type { DBClientInterfaceSync, DBTransactionInterfaceSync, SessionRow, SignatureAfterRow, StorageReconciliationLockRow, StoredCoValueRow, StoredSessionRow, TransactionRow, StorageReconciliationAcquireResult } from "../types.js"; import type { SQLiteDatabaseDriver } from "./types.js"; export type RawCoValueRow = { id: RawCoID; header: string; }; export type RawTransactionRow = { ses: number; idx: number; tx: string; }; export declare function getErrorMessage(error: unknown): string; export declare class SQLiteClient implements DBClientInterfaceSync, DBTransactionInterfaceSync { private readonly db; constructor(db: SQLiteDatabaseDriver); getCoValue(coValueId: RawCoID): StoredCoValueRow | undefined; getCoValueSessions(coValueRowId: number): StoredSessionRow[]; getSingleCoValueSession(coValueRowId: number, sessionID: SessionID): StoredSessionRow | undefined; getNewTransactionInSession(sessionRowId: number, fromIdx: number, toIdx: number): TransactionRow[]; getSignatures(sessionRowId: number, firstNewTxIdx: number): SignatureAfterRow[]; getCoValueRowID(id: RawCoID): number | undefined; upsertCoValue(id: RawCoID, header?: CoValueHeader): number | undefined; markCoValueAsDeleted(id: RawCoID): void; eraseCoValueButKeepTombstone(coValueId: RawCoID): void; getAllCoValuesWaitingForDelete(): RawCoID[]; addSessionUpdate({ sessionUpdate }: { sessionUpdate: SessionRow; }): number; addTransaction(sessionRowID: number, nextIdx: number, newTransaction: Transaction): void; addSignatureAfter({ sessionRowID, idx, signature, }: { sessionRowID: number; idx: number; signature: Signature; }): void; getStorageReconciliationLock(key: string): StorageReconciliationLockRow | undefined; putStorageReconciliationLock(entry: StorageReconciliationLockRow): void; transaction(operationsCallback: (tx: DBTransactionInterfaceSync) => unknown): undefined; getCoValueIDs(limit: number, offset: number): { id: RawCoID; }[]; getCoValueCount(): number; getUnsyncedCoValueIDs(): RawCoID[]; trackCoValuesSyncState(updates: { id: RawCoID; peerId: PeerID; synced: boolean; }[]): void; stopTrackingSyncState(id: RawCoID): void; tryAcquireStorageReconciliationLock(sessionId: SessionID, peerId: PeerID): StorageReconciliationAcquireResult; renewStorageReconciliationLock(sessionId: SessionID, peerId: PeerID, offset: number): void; releaseStorageReconciliationLock(sessionId: SessionID, peerId: PeerID): void; getCoValueKnownState(coValueId: string): CoValueKnownState | undefined; } //# sourceMappingURL=client.d.ts.map