X402Server which extends x402HTTPResourceServer and can
be passed directly to paymentMiddlewareFromHTTPServer or any other
framework adapter.
All credential fields fall back to environment variables; an empty {}
with a routes map is sufficient in most environments.
Pass payToConfig: { type: "address", evm: "0x...", solana: "..." } to
provide your own receiver addresses without provisioning a CDP wallet.
Parameters
config
CdpX402ServerConfig
Credential, wallet, and route configuration. All credential fields
fall back to environment variables; routes is the only required field (or
configPath pointing to a JSON file that supplies routes).
Returns
Promise<X402Server>
A fully initialized X402Server ready to be passed to any framework middleware.