/** * PROOF OF OPTIMIZATION (PoOpt) — the portable, offline-verifiable certificate that a result was reached * EFFICIENTLY, not just reached. * * Cloud optimizers (Vizier, SigOpt, Optuna) hand you a number. None hand you a cryptographic proof that * "this was found in N experiments instead of a full grid sweep of M, by an engine certified to be within * X% of the global best — here is the signature, verify it yourself without trusting us, even air-gapped." * PoOpt fuses what Melete already produces — the signed discovery trace, the fewer-experiments savings, and * the optimality certificate — into ONE Ed25519-signed record that a reviewer, regulator, auditor, ESG * registry, or counterparty re-checks OFFLINE with the embedded public key alone. * * Honest by construction (DIAKRISIS): the EFFICIENCY claim (experiments saved vs a grid sweep) is exact and * recomputable; the optimality figure is the conditional Lipschitz certificate; and a RESOURCE figure * (energy / CO₂ saved) appears ONLY if you supply your own per-experiment energy and grid carbon factors — * never fabricated. PoOpt is the verifiable SUBSTRATE a carbon-credit / green-certificate scheme could * accept; whether a market accepts it is a business outcome, not a claim this code makes. */ import { type KeyObject } from "node:crypto"; export interface PoOptInput { subject: string; goal: "maximize" | "minimize"; dims: number; experimentsUsed: number; bestValue: number; certifiedWithinPct?: number | null; traceHash?: string | null; issuedAtMs?: number; energyPerExperimentKwh?: number | null; carbonKgPerKwh?: number | null; } export interface PoOptCertificate { v: "poopt/1"; subject: string; goal: "maximize" | "minimize"; dims: number; experimentsUsed: number; gridBaseline: number; experimentsSaved: number; efficiencyPct: number; bestValue: number; certifiedWithinPct: number | null; traceHash: string | null; energyPerExperimentKwh: number | null; energySavedKwh: number | null; carbonKgPerKwh: number | null; co2SavedKg: number | null; issuedAtMs: number; publicKeyPem: string; payloadHash: string; sig: string; algo: "ed25519+sha256"; } /** A full grid sweep at ~8 points per dimension, capped — the honest brute-force reference. */ export declare function gridBaselineFor(dims: number): number; /** Issue a signed Proof of Optimization. Generates an Ed25519 keypair if none is supplied. */ export declare function issueProofOfOptimization(input: PoOptInput, keys?: { privateKey: KeyObject; publicKey: KeyObject; }): PoOptCertificate; export interface PoOptVerify { ok: boolean; reason: string; recomputed: { gridBaseline: number; experimentsSaved: number; efficiencyPct: number; } | null; } /** Verify a PoOpt OFFLINE: recompute the efficiency claim + check the hash + check the Ed25519 signature. */ export declare function verifyProofOfOptimization(cert: PoOptCertificate): PoOptVerify; export declare function pooptGauntlet(): { score: 0 | 100; checks: Array<{ name: string; pass: boolean; detail: string; }>; }; //# sourceMappingURL=poopt.d.ts.map