import { Hono } from 'hono';
import type { AppEnv } from '../hono-env.js';
/**
 * Sync local balance from D1 (source of truth).
 * Called before returning balance to ensure the dashboard shows the current state
 * (including refunds issued by admin via Stripe Dashboard).
 *
 * If D1 is unreachable (network error), logs the error and returns false.
 * The local balance is a cache — D1 charge authorization is what actually controls processing.
 */
export declare function syncBalanceFromD1(licenseKeyId: string, keyHash: string): Promise<{
    synced: boolean;
    d1Balance?: number;
}>;
declare const balance: Hono<AppEnv, import("hono/types").BlankSchema, "/">;
/**
 * Consolidate balances from all old keys associated with an email into the current key.
 * Calls the Cloudflare Worker's /v1/balance/consolidate-by-email endpoint.
 */
export declare function consolidateByEmail(email: string, licenseKeyId: string, keyHash: string, keyPrefix: string): Promise<{
    consolidated: boolean;
    amount: number;
}>;
export default balance;
