import type { CardOutcomeFact } from "./CardOutcomeFact.js"; /** A refusal by a ledger: the code, never a path or a value. */ export declare class CardOutcomeLedgerError extends Error { readonly code: string; constructor(code: string); } /** * Where the card purchases' outcome facts are kept until the producer reads them. Append-only: * a fact is never changed, and what a purchase came to is read from all of its facts together. */ export interface CardOutcomeLedger { /** Keeps the facts, in order; throws when they could not be kept. */ append(facts: readonly CardOutcomeFact[]): Promise; /** Every fact recorded at or after `from`, oldest first; facts with the same time keep their order. */ since(from: Date): Promise; } /** The ledger in memory: for tests, and for a process that records without a directory. */ export declare class InMemoryCardOutcomeLedger implements CardOutcomeLedger { private readonly facts; get all(): readonly CardOutcomeFact[]; append(facts: readonly CardOutcomeFact[]): Promise; since(from: Date): Promise; } /** The facts at or after `from`, by time; a stable sort keeps the recorded order within one instant. */ export declare function oldestFirst(facts: readonly CardOutcomeFact[], from: Date): CardOutcomeFact[]; //# sourceMappingURL=CardOutcomeLedger.d.ts.map