import type { ActionReceipt } from '../types/passport.js';
import type { ReceiptFilter } from './types.js';
export interface ReceiptBundle {
    /** Bundle format version */
    version: string;
    /** ID of the gateway that produced these receipts */
    gatewayId: string;
    /** When this bundle was created */
    exportedAt: string;
    /** Filter used to select receipts */
    filter: ReceiptFilter;
    /** Total receipts in this bundle */
    count: number;
    /** Hash of the first receipt in the bundle (chain start) */
    chainStartHash: string;
    /** Hash of the last receipt in the bundle (chain end) */
    chainEndHash: string;
    /** Whether the internal chain is valid (no gaps) */
    chainValid: boolean;
    /** The receipts themselves */
    receipts: ActionReceipt[];
    /** Gateway signature over the bundle metadata (proves authenticity) */
    signature: string;
}
export interface BundleVerificationResult {
    valid: boolean;
    bundleSignatureValid: boolean;
    chainIntegrityValid: boolean;
    receiptCount: number;
    tombstonedCount: number;
    errors: string[];
}
declare function hashReceipt(receipt: ActionReceipt): string;
export declare function createReceiptBundle(opts: {
    gatewayId: string;
    gatewayPrivateKey: string;
    receipts: ActionReceipt[];
    filter: ReceiptFilter;
}): ReceiptBundle;
export declare function verifyReceiptBundle(bundle: ReceiptBundle, gatewayPublicKey: string): BundleVerificationResult;
export declare function importReceiptBundle(bundle: ReceiptBundle, gatewayPublicKey: string, storage: {
    appendReceipt(r: ActionReceipt): Promise<void>;
    transaction<T>(fn: (tx: {
        appendReceipt(r: ActionReceipt): Promise<void>;
    }) => Promise<T>): Promise<T>;
}): Promise<{
    imported: number;
    skipped: number;
    errors: string[];
}>;
export { hashReceipt };
//# sourceMappingURL=receipt-bundle.d.ts.map