/** * `paygate init` — template generation. * * Pure functions only: every generator returns `{ path, content }[]` and * never touches the filesystem, so the whole surface is unit-testable. * * Two families of template: * * 1. Account-free x402 seller (default). Uses the upstream `@x402/*` * packages (`@x402/express`, `@x402/fastify`, `@x402/hono`, * `@x402/next`, or the `x402` pip package) pointed at a facilitator. * No ArisPay account, no API key — just a wallet address that * receives the funds. Modeled on `examples/x402-demo/server.js`, * which is proven live against facilitator.arispay.app. * * 2. Hosted PayGate mode (`--merchant-id`, express/fastify only). * Uses this package's own SDK (`paygate({ merchantId })`); payout * wallet / network / facilitator come from the merchant's capability * manifest. Requires a merchant account at paygate.arispay.app. * * Network truthfulness: the public ArisPay facilitator settles Base * MAINNET only. Testnet (`base-sepolia`, the default) templates point * FACILITATOR_URL at Coinbase's public testnet facilitator * (https://x402.org/facilitator) and say so; production templates * (`--network base`) default to https://facilitator.arispay.app. */ export type InitFramework = "express" | "fastify" | "next" | "hono" | "workers" | "fastapi"; export type InitNetwork = "base" | "base-sepolia"; export type InitCurrency = "USD" | "EUR"; export type InitMethod = "GET" | "POST" | "PUT" | "DELETE"; export declare const INIT_FRAMEWORKS: readonly InitFramework[]; export declare const MAINNET_FACILITATOR = "https://facilitator.arispay.app"; /** Coinbase's public testnet facilitator — used by the upstream x402 examples. */ export declare const TESTNET_FACILITATOR = "https://x402.org/facilitator"; export declare const CAIP2: Record; /** * Circle EURC on Base mainnet — address + EIP-712 domain verified on-chain * (see packages/paygate/src/core.ts EURC_ADDRESSES). EUR templates are * restricted to `base` because the testnet default facilitator does not * settle EURC. */ export declare const EURC_BASE_MAINNET = "0x60a3E35Cc302bFA44Cb288Bc5a4F316Fdb1adb42"; export interface TemplateOptions { framework: InitFramework; /** 0x-prefixed 40-hex EVM address. Public — safe to write to .env.example. May be absent in --dry-run. */ wallet?: string; /** Paid route path, starts with "/". */ route: string; method: InitMethod; /** Integer cents (USD or EUR). */ priceCents: number; currency: InitCurrency; network: InitNetwork; /** Hosted PayGate mode (express/fastify only). */ merchantId?: string; /** Directory-name-ish project name, used in package.json / wrangler.toml. */ projectName: string; } export interface GeneratedFile { path: string; content: string; } export declare function defaultFacilitatorFor(network: InitNetwork): string; /** "$0.01"-style money string from integer cents. */ export declare function centsToMoneyString(cents: number): string; /** cents → 6-decimal atomic units (USDC/EURC): cents * 10^4. */ export declare function centsToAtomic(cents: number): string; export declare function generateFiles(opts: TemplateOptions): GeneratedFile[]; //# sourceMappingURL=init-templates.d.ts.map