import { type CeremonyApp } from "./ceremony/mount.js"; import type { Branding, Credential, GateOrder, ReaderIdentity, Step, VerificationManifestEntry, VerificationStore } from "./types.js"; import type { CompletedOrder, CreatedOrder, OrderStore } from "./orders.js"; /** What `orders.serve(app)` needs from the client to wire the checkout. */ export interface ServeOrdersDeps { walletOrigin: string; /** The created-order store `orders.create()` writes (the price authority). */ created: OrderStore; /** The completed-order store `orders.retrieve()` reads. */ completed: OrderStore; /** `orders._complete` — records the completion AND fires `order.settled`. */ complete: (record: CompletedOrder) => void | Promise; /** `credentagent.requirements` — the policy → manifest resolver (re-homed approve links). */ requirements: (order: GateOrder, policy: Step[]) => VerificationManifestEntry[]; /** The per-order verification store (invariant 4). */ verificationStore: VerificationStore; /** The in-process credential registry, so `completeOrder` enforces every custom gate (007). */ credentialRegistry: ReadonlyMap; /** Stable reader identity the rails present (omit ⇒ per-request self-signed). */ readerIdentity?: ReaderIdentity; /** Host brand for the checkout page + rails (omit ⇒ the built-in look). Never brands the footer. */ branding?: Branding; /** Return the presented DeviceResponse to the rail page for inspection (omit ⇒ off). */ inspectPresentations?: boolean; /** Stable HMAC key for the challenge (survives an instance split). Omit ⇒ ephemeral dev key. */ signingKey?: string; } /** * Register the checkout onto `app`: the ceremony rails (via `mountCeremony`), the checkout * page at `/credentagent/orders/:id`, the instant-demo place path (ungated only), and the * status poll. Idempotent per app is the caller's concern (the client guards double-serve). */ export declare function serveOrders(app: CeremonyApp, deps: ServeOrdersDeps): void;