import type { FetchLike } from "../handlers/HandlerRegistration.js"; import { type OutcomeEvidenceSubmission } from "./OutcomeEvidence.js"; export declare const CORE_OUTCOME_EVIDENCE_PATH = "/v1/outcomes/evidence"; /** Submissions carry up to a thousand subjects; Core's answer is two counts. */ export declare const OUTCOME_SUBMIT_TIMEOUT_MS = 15000; /** Core's evidence resource, as the publisher sees it. */ export interface OutcomeEvidenceSink { submit(submission: OutcomeEvidenceSubmission): Promise<{ readonly accepted: number; readonly duplicates: number; }>; } /** * A refused submission. A `permanent` refusal is one the same submission cannot get past by * being sent again (evidence Core refuses, a producer it does not know or does not allow); any * other is retried later. `conflict` names a subject Core already holds at that revision with * other content, which the next attempt states under a higher revision. */ export declare class OutcomeEvidenceRefusal extends Error { readonly code: string; readonly permanent: boolean; readonly conflict: string | null; constructor(code: string, permanent: boolean, conflict?: string | null); } export interface CoreOutcomeEvidenceClientOptions { /** The authority's base URL, already normalized: Core serves the meter beside it. */ readonly baseUrl: string; /** The producer token, read at the moment of each request and never held. */ readonly token: () => string; /** The guarded fetch: the authority's origin and trust anchors, and nothing else. */ readonly fetch: FetchLike; readonly timeoutMs?: number; } /** * `POST {DECIONIS_API_URL}/v1/outcomes/evidence` with AgentSafe's producer token, the credential * Core's producer registry names with `outcomes: "agentsafe"`; a customer's own key is never a * producer, so the bank's API key cannot feed the meter that measures it. A 503 * (`outcomes_disabled`, `outcomes_unavailable`), a timeout or an outage is retried later; a 409 * names the subject Core already holds at that revision. Core's body, the URL and the token * never leave this class. */ export declare class CoreOutcomeEvidenceClient implements OutcomeEvidenceSink { private readonly options; private readonly url; private readonly timeoutMs; constructor(options: CoreOutcomeEvidenceClientOptions); submit(submission: OutcomeEvidenceSubmission): Promise<{ readonly accepted: number; readonly duplicates: number; }>; /** Core's answer as an object, or an empty one when it is not one. */ private static object; } //# sourceMappingURL=CoreOutcomeEvidenceClient.d.ts.map