import type { GateOrder, Step, TrustLevel, VerificationManifestEntry } from "./types.js"; export interface ResolveContext { /** Origin the per-order approve link binds to. */ walletOrigin: string; /** mdoc trust honestly stated in every entry; v0.1 is presence-only. */ trustLevel?: TrustLevel; /** * Where the gates are enforced. v0.1 is consolidated Mode A: every gate runs * on the checkout page (Context 2), so entries are `"checkout"`. (`"tool"` is * the Mode-B / blocking shape — roadmap.) */ enforcedAt?: "tool" | "checkout"; /** * Set once `credentagent.mount()` has wired the ceremony rails onto the host app, so * the approve links resolve to THIS server's mounted `/credentagent/*` routes instead * of the legacy `/credential-gate/*` shape. age/membership share the credential * page (`?cred=…`); payment authorizes on the dc-payment page. */ mountedRoutes?: boolean; /** * Set when a `verifier` seam was wired at mount() (008). The blocking gate/authorize * credentials are then proven in ONE external-verifier ceremony, so their approve links * all resolve to the single `/credentagent/delegated?order=…` page rather than the * per-credential dc-payment / credential rails. A discount stays on the credential rail. */ delegated?: boolean; } /** * Resolve a policy against an order into the serializable manifest. * * Ordering: declared order is preserved EXCEPT that `authorize`-effect entries * (payment) are moved to the end — payment always settles last, even when a * developer declares it earlier in the policy (Principle IV / contract CT3). */ export declare function resolveRequirements(order: GateOrder, policy: Step[], ctx: ResolveContext): VerificationManifestEntry[];