import { type Space, type Experiment } from "./space.js"; import { type Goal } from "./engine.js"; export interface FedRecord { party: string; experiment: Experiment; value: number; ts: number; hash: string; } /** A party signs (content-hashes) one observation before contributing it to the shared pool. */ export declare function contribute(party: string, experiment: Experiment, value: number, ts?: number): FedRecord; /** Is this record intact (its content still hashes to its claimed hash)? */ export declare function recordIntact(r: FedRecord): boolean; /** * CRDT-merge any number of pools: union by content hash, drop tampered/forged records, deterministic order. * Commutative + idempotent — every party that merges the same set converges to the same pool. */ export declare function mergePool(...pools: ReadonlyArray>): FedRecord[]; export interface PoolVerify { ok: boolean; total: number; valid: number; tampered: number; parties: string[]; } /** Verify the whole pool offline: every record must hash to its content. */ export declare function verifyPool(pool: ReadonlyArray): PoolVerify; /** Propose the next experiment for the whole swarm from the VERIFIED union of all parties' results. */ export declare function proposeFromPool(space: Space, pool: ReadonlyArray, goal?: Goal, seed?: number): Experiment; export declare function federatedGauntlet(): { score: 0 | 100; checks: Array<{ name: string; pass: boolean; detail: string; }>; }; //# sourceMappingURL=federated.d.ts.map