/** * Durable payment state for the builder read loop. * * Two responsibilities, one 0600 file (`~/.vana/app/receipts.json`): * * - Payment nonces per payer. The gateway rejects a reused (payer, nonce) * pair, and the SDK's default nonce source is process-local seeded at 1, * which breaks on the second CLI invocation. Nonces here only move * forward. * - Receipts: the exact `X-PAYMENT` header (plus amount/asset metadata) of a * settled read, keyed by network, grant, and scope. A later read replays * the header first, so a retry after a failure never settles a second fee * for data the app already paid for. */ export interface StoredReceipt { /** The signed X-PAYMENT header exactly as sent. */ header: string; /** Base-unit decimal amount the header settles. */ amount: string; /** Asset address (zero address = native VANA). */ asset: string; /** ISO timestamp the CLI captured the header. */ capturedAt: string; /** Payment metadata echoed by the Personal Server, when any. */ payment?: Record; } export declare function receiptKey(network: string, grantId: string, scope: string): string; export interface ReceiptsStore { /** Next monotonically-increasing payment nonce for a payer; persisted. */ nextNonce(payerAddress: string): bigint; getReceipt(key: string): StoredReceipt | null; saveReceipt(key: string, receipt: StoredReceipt): void; /** Drop a receipt the server refused (stale version, expired nonce). */ dropReceipt(key: string): void; } export declare function createReceiptsStore(filePath?: string): ReceiptsStore; //# sourceMappingURL=receipts.d.ts.map