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.

middleware/src

Namespaces

Functions

createHTTPFacilitatorHandler()

createHTTPFacilitatorHandler(facilitatorURL, opts): FacilitatorHandler
Defined in: packages/middleware/src/http-handler.ts:68 Creates a FacilitatorHandler that delegates to a remote facilitator via HTTP. The glue layer constructs valid x402PaymentRequirements from ResourcePricing using capabilities.schemes, then passes them to getRequirements. This handler POSTs those to the facilitator’s /accepts endpoint for enrichment. Cache key stability: caching assumes that identical accepts arrays produce identical facilitator responses. If the facilitator returns time-dependent values (e.g. recentBlockhash), use a short maxAge or disable caching.

Parameters

facilitatorURL
string
opts
CreateHTTPFacilitatorHandlerOpts

Returns

FacilitatorHandler

References

createRemoteX402Handlers

Re-exports createRemoteX402Handlers