import { RenderLogger } from '../logger'; export type DispersedConfig = { authBaseUrl: string; apiBaseUrl: string; clientId: string; clientSecret: string; executorId: string; }; export type FetchFn = (url: string, init?: { method?: string; headers?: Record; body?: string; }) => Promise<{ status: number; json(): Promise; text(): Promise; }>; export type EurAmount = { amount: string; currency: 'EUR'; }; export type RenderAmount = { amount: string; currency: 'RENDER'; }; export type DispersedObligation = { uuid: string; amount: string; currency: 'EUR'; status: string; opened_at?: string; created_at?: string; compute_ledger_authorization_uuid?: string; }; export type DispersedClaim = { uuid: string; executor_id: string; status: string; claimed_at: string; claim_expires_at: string; }; export type ClaimResult = { claim: DispersedClaim; claimed_count: number; effective_window: { from: string; requested_to: string; to: string; }; obligations: DispersedObligation[]; }; export type SettleRequest = { burn_ledger_claim_uuid: string; obligation_uuids: string[]; settled_amount: EurAmount; burned_amount: RenderAmount; executed_at: string; tx_signature: string; pricing_snapshot?: Record; executor_metadata?: Record; }; export type SettleResult = { settlement: { uuid: string; burn_ledger_claim_uuid: string; tx_signature: string; executed_at: string; settled_amount: string; currency: 'EUR'; burned_amount: RenderAmount; }; applications: unknown[]; idempotent_replay: boolean; }; /** * Thrown on a 409 from settle: the claim is missing/expired/released/already * settled, an obligation mismatch, an amount mismatch, or a tx_signature reused * with a different payload. Nothing was written. Do NOT re-burn — reconcile. */ export declare class DispersedConflictError extends Error { readonly body: string; readonly status = 409; constructor(body: string); } export interface DispersedClient { claim(args: { from: Date; to: Date; limit?: number; }, log?: RenderLogger): Promise; settle(req: SettleRequest, log?: RenderLogger): Promise; } export declare const dispersedClient: (cfg: DispersedConfig, fetchImpl?: FetchFn) => DispersedClient; //# sourceMappingURL=dispersed.d.ts.map