/** * `paygate wrap` — template generation. Pure functions, no filesystem. * * Wrap gates an EXISTING upstream API: the generated project is an Express * reverse proxy that (1) answers x402 402 challenges on the gated routes, * (2) forwards paid (and ungated) traffic to UPSTREAM_URL, (3) serves the * capability manifest at /.well-known/arispay.json and an agent-readable * /llms.txt. Same account-free family as `paygate init` (upstream @x402/* * packages, wallet receives funds directly, no ArisPay account). * * Determinism rule: every generated file is byte-deterministic for the same * inputs, so idempotent re-runs diff cleanly (checkWritePlan). The manifest * `updated` timestamp is therefore injected by the generated server at boot * (last-deploy semantics), never baked into the file. */ import { type GeneratedFile, type InitCurrency, type InitNetwork } from "./init-templates.js"; export interface WrapRoute { method: "GET" | "POST" | "PUT" | "DELETE"; /** Express-style path (OpenAPI `{param}` already converted to `:param`). */ path: string; priceCents: number; description?: string; } export interface WrapOptions { upstream: string; wallet: string; network: InitNetwork; currency: InitCurrency; routes: WrapRoute[]; projectName: string; slug: string; /** Documented OpenAPI JSON (with 402 responses injected), when --from-openapi was used. */ openapiDocumented?: string; } export declare function assetFor(network: InitNetwork, currency: InitCurrency): { address: string; name: string; }; /** Manifest file content — NO `updated` field (the server injects it at boot). */ export declare function wrapManifestBase(opts: WrapOptions): string; export declare function generateWrapFiles(opts: WrapOptions): GeneratedFile[]; //# sourceMappingURL=wrap-templates.d.ts.map