import type { ChargeResult, BalanceInfo, PendingCharge } from './types.js';
export declare class LicenseClient {
    private serverUrl;
    private licenseKey;
    constructor(serverUrl: string, licenseKey: string);
    charge(documentHash: string, machineId: string, metadata?: {
        file_type?: string;
        file_size_bytes?: number;
        processing_ms?: number;
    }): Promise<ChargeResult | null>;
    confirm(chargeId: string): Promise<number | null>;
    refund(chargeId: string): Promise<number | null>;
    balance(): Promise<BalanceInfo | null>;
    setSpendingLimit(limitCents: number | null): Promise<{
        spending_limit_cents: number | null;
        limit_display: string;
    } | null>;
    sync(charges: PendingCharge[]): Promise<{
        balance_cents: number;
        rejected: number;
    } | null>;
    /** Fetch with an automatic abort timeout. */
    private fetchWithTimeout;
    private request;
}
export declare class InsufficientBalanceError extends Error {
    balanceCents: number;
    costCents: number;
    constructor(balanceCents: number, costCents: number);
}
export declare class SpendingLimitError extends Error {
    spentCents: number;
    limitCents: number;
    resetsAt: string;
    constructor(spentCents: number, limitCents: number, resetsAt: string);
}
//# sourceMappingURL=client.d.ts.map