/** * paygate/express — Express middleware for x402 paywalls (v3). * * Usage (v3): * import express from 'express'; * import { paygate } from 'paygate/express'; * * const app = express(); * * // v3: one knob — merchantId. SDK fetches the rest from api.arispay.app. * const pw = paygate({ merchantId: process.env.PAYGATE_MERCHANT_ID }); * * app.get('/api/data', pw({ priceCents: 10 }), (req, res) => { * res.json({ data: 'premium content' }); * }); * * // Dynamic pricing * app.post('/api/analyse', pw({ * priceCents: (req) => req.body.deep ? 50 : 10, * description: 'AI analysis', * }), handler); * * v2 config (`wallet` + `network`) still works via the compat shim. */ import type { RequestHandler } from "express"; import { type PaygateConfig, type RoutePrice } from "./core.js"; export type { PaygateConfig, RoutePrice }; /** * Serve the capability manifest on the merchant's own origin (spec §9): * app.get('/.well-known/arispay.json', arispayManifest(config)); * Re-serves the hosted manifest (merchantId mode) or synthesizes the * account-free one (v2-shim mode). */ export declare function arispayManifest(config: PaygateConfig): RequestHandler; /** * Create a paywall middleware factory. */ export declare function paygate(config: PaygateConfig): (routePrice: RoutePrice) => RequestHandler; //# sourceMappingURL=express.d.ts.map