Software Requirements
You need the following tools installed on your machine before proceeding.Hedera Testnet Account
Agora402 runs on the Hedera network. You need one ECDSA-keyed testnet account before you start — this becomes the seller account that receives payments and signs registry messages. The buyer account is created for you automatically later bynpm run setup:buyer.
1
Create a free testnet account
Go to portal.hedera.com and sign up or log in. The portal’s built-in faucet provides free testnet HBAR — no credit card or mainnet funds required.
2
Choose ECDSA key type
When the portal prompts you for a key type, select ECDSA. Agora402’s payment flow uses
@x402/hedera, which requires ECDSA keys for signing Hedera TransferTransaction objects.3
Download your credentials
Copy the Account ID (in the format
0.0.xxxxx) and the ECDSA private key (a hex string beginning with 0x). Store them securely — you will paste them into your .env file in the next section.You only need to create this one account manually. The buyer account is generated from it by
npm run setup:buyer, which transfers 100 HBAR from the seller to fund the new account.LLM Provider (Optional)
Agora402’s inference endpoint (POST /v1/infer) acts as a paid LLM proxy. You can connect it to a real model or run in mock mode with no external credentials.
Set the LLM_PROVIDER environment variable to choose your provider, then supply the matching key and model identifier:
Blocky402 Facilitator
Every x402 payment goes through the Blocky402 facilitator, which co-signs theTransferTransaction as the network fee payer and submits it to Hedera.
- Testnet: The hosted facilitator at
https://api.testnet.blocky402.comrequires no API key and is configured as the default in.env.example. No account or sign-up is needed. - Mainnet: Use
https://api.blocky402.comwith a Blocky402 API key, and setHEDERA_NETWORK=mainnettogether with mainnet account credentials.