.env.local
file with your configuration:
middleware.ts
file configures x402 to protect API routes:
/api/protected/route.ts
endpoint is automatically protected:
middleware.ts
to add new protected endpoints:
theme.css
to customize:
NEXT_PUBLIC_URL
in .env.local
with your ngrok URL
NETWORK=base
for mainnetRESOURCE_WALLET_ADDRESS
to your production walletNEXT_PUBLIC_URL
for your domain