Getting Started with Hono
Start accepting x402 payments in your Hono server in 2 minutes.
Example Code
You can find the full code for this example on GitHub.
Step 1: Install Dependencies
Install the required packages for your Hono server:
npm install x402 hono dotenv @hono/node-server
Step 2: Set Your Environment Variables
Create a .env file in your project root:
echo "ADDRESS=0x...\nFACILITATOR_URL=https://x402.blockeden.xyz\nNETWORK=sui\nBLOCKEDEN_API_KEY=your_api_key_here" > .env
Your .env file should look like this:
ADDRESS=0x... # wallet public address you want to receive payments to
FACILITATOR_URL=https://x402.blockeden.xyz
NETWORK=sui # recommended for fastest settlement
BLOCKEDEN_API_KEY=your_api_key_here # get from https://blockeden.xyz/dash/
Network Options
BlockEden.xyz supports multiple networks:
sui(recommended for fastest settlement)ethereumbasepolygonavalanche