/** * Bridge State Sync Module * * After successful bridge, user's agent state is synced across chains * This uses CRDT (Conflict-free Replicated Data Type) to merge state * * Ensures: User has same agent, same balance, same identity on both Base and 0G */ export interface AgentState { address: string; chainId: number; lastUpdated: number; nonce: number; balances: Record; metadata: Record; } export interface StateSyncRequest { agentState: AgentState; bridgeIntentId: string; fromChain: 'base' | '0g'; toChain: 'base' | '0g'; timestamp: number; } /** * CRDT State Merger * Resolves conflicts by taking newer state or merging incrementally */ export declare class CRDTStateMerger { /** * Merge two agent states (Last-Write-Wins strategy) */ static merge(state1: AgentState, state2: AgentState): AgentState; /** * Update balance in state (CRDT-compatible) */ static updateBalance(state: AgentState, token: string, newBalance: string): AgentState; } /** * Bridge State Syncer * Coordinates state updates across chains after successful bridge */ export declare class BridgeStateSyncer { private h3dacClient; constructor(h3dacClient: any); /** * Sync agent state after bridge completes * Publishes state update to H3-DAC so both chains see it */ syncStateAfterBridge(userAddress: string, bridgedAmount: string, bridgeIntentId: string, feeDeducted: string): Promise; /** * Subscribe to state sync updates from other chains * Ensures user sees consistent state across Base/0G */ subscribeToStateSync(userAddress: string, onStateUpdate: (state: AgentState) => void): Promise; /** * Get current agent state from ledger/cache */ getAgentState(userAddress: string, chain: 'base' | '0g'): Promise; } /** * Integration: Call after bridge settles to sync user's state */ export declare function syncAgentStateAfterBridge(userAddress: string, bridgedAmount: string, feeAmount: string, bridgeIntentId: string, h3dacClient: any): Promise; //# sourceMappingURL=bridge-sync.d.ts.map