Faremeter API / middleware/src / hono
hono
Functions
createMiddleware()
createMiddleware(Defined in: packages/middleware/src/hono.ts:27 Creates Hono middleware that gates routes behind x402 payment. The middleware intercepts requests, checks for payment headers, communicates with the facilitator to validate and settle payments, and only allows the request to proceed if payment is successful.args):Promise<MiddlewareHandler>
Parameters
args
CreateMiddlewareArgs
Configuration including facilitator URL and accepted payment types
Returns
Promise<MiddlewareHandler>
A Hono middleware handler