Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.faremeter.xyz/llms.txt

Use this file to discover all available pages before exploring further.

hono

Functions

createMiddleware()

createMiddleware(args): Promise<MiddlewareHandler>
Defined in: packages/middleware/src/hono.ts:29 Creates Hono middleware that gates routes behind x402 and MPP payment. The middleware intercepts requests, checks for payment headers, validates and settles payments via x402 or MPP protocol, and only allows the request to proceed if payment is successful.

Parameters

args
CreateMiddlewareArgs Configuration including handlers + pricing or facilitator URL

Returns

Promise<MiddlewareHandler> A Hono middleware handler