import { type EventSigner, type NostrLink, type SystemInterface } from ".."; import EventEmitter from "eventemitter3"; interface JsonEventSyncEvents { change(): void; } export declare class JsonEventSync extends EventEmitter { #private; readonly link: NostrLink; readonly encrypt: boolean; constructor(initValue: T, link: NostrLink, encrypt: boolean); get json(): T; /** * Check if there are pending changes (local value differs from synced value) */ get hasPendingChanges(): boolean; /** * Update the local JSON value without saving to Nostr * Call persist() separately to save changes */ setJson(val: T): void; sync(signer: EventSigner | undefined, system: SystemInterface): Promise; /** * Persist the current local JSON state to Nostr */ persist(signer: EventSigner, system: SystemInterface): Promise; /** * Update the json content and immediately save to Nostr * @deprecated Use setJson() + persist() for better control */ updateJson(val: T, signer: EventSigner, system: SystemInterface): Promise; } export {}; //# sourceMappingURL=json-in-event-sync.d.ts.map