/** * Sync client for x402-cfo hosted dashboard. * * Pushes ledger entries and budget status to the hosted service * for centralized monitoring, alerts, and compliance reporting. * * Free users never configure this — everything works locally. * Paid users add one line: sync: { apiKey: 'xxx' } */ import type { LedgerEntry } from './ledger.js'; import type { BudgetStatus } from './budget.js'; import type { SpendSummary } from './analytics.js'; export interface SyncConfig { /** API key from dashboard.x402cfo.com */ apiKey: string; /** Agent identifier (for multi-agent setups) */ agentId?: string; /** Dashboard API URL override. Default: https://api.x402cfo.com */ apiUrl?: string; /** Sync interval in ms. Default: 30000 (30s) */ intervalMs?: number; /** Disable sync (useful for testing). Default: false */ disabled?: boolean; } export declare class DashboardSync { private config; private buffer; private timer; private getBudget; private getSummary; constructor(config: SyncConfig, getBudget: () => BudgetStatus, getSummary: () => SpendSummary); /** Buffer a ledger entry for the next sync. */ push(entry: LedgerEntry): void; /** Start periodic sync. */ private start; /** Stop periodic sync. */ stop(): void; /** Flush buffered entries to the dashboard. */ flush(): Promise; } //# sourceMappingURL=sync.d.ts.map