/** * Synchronisation with Solana Blockchain * * Implements Section 9 of the TOSS Technical Paper: * Upon regaining connectivity, devices initiate reconciliation with onchain state. * All offline artifacts are verified onchain and settled with deterministic outcomes. * * GAP #2 FIX: Track synchronization state persistently */ import { Connection, PublicKey } from '@solana/web3.js'; import { type SettlementResult, type ReconciliationState } from './reconciliation'; export interface SyncResult { successfulSettlements: SettlementResult[]; failedSettlements: SettlementResult[]; detectedConflicts: { intentId: string; conflict: string; }[]; reconciliationState: ReconciliationState; syncTimestamp: number; isComplete: boolean; } /** * Full sync and reconciliation with the Solana blockchain * * This is the primary function for TOSS settlement. When a device regains * connectivity, it calls this to: * 1. Detect any conflicts with onchain state * 2. Settle all pending intents * 3. Update local state with results * * GAP #2 FIX: Persist reconciliation state for future queries * * @param connection Connection to Solana RPC * @param userId User ID for state tracking (required for persistence) * @param feePayer Optional fee payer keypair public key * @returns Detailed sync results including conflicts and settlements */ export declare function syncToChain(connection: Connection, userId?: string, feePayer?: PublicKey): Promise; /** * Lightweight sync to check status without settling * Useful for monitoring or UI updates without committing to settlements */ export declare function checkSyncStatus(connection: Connection): Promise; //# sourceMappingURL=sync.d.ts.map