Skip to main content
Before you install Agora402, make sure your development environment meets the requirements below. Most of the setup takes only a few minutes: Node.js and Git are standard tools you likely already have, a free Hedera testnet account takes under two minutes to create, and the buyer account is provisioned for you automatically during setup. LLM credentials are optional — a built-in mock mode lets you explore the full payment flow without any inference key.

Software Requirements

You need the following tools installed on your machine before proceeding.
Use a version manager such as nvm or fnm to keep Node pinned to 20+ without affecting other projects.

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 by npm 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:
Set LLM_PROVIDER=mock to test the full discover → quote → pay → receipt flow without consuming any inference credits or needing an API key.

Blocky402 Facilitator

Every x402 payment goes through the Blocky402 facilitator, which co-signs the TransferTransaction as the network fee payer and submits it to Hedera.
  • Testnet: The hosted facilitator at https://api.testnet.blocky402.com requires no API key and is configured as the default in .env.example. No account or sign-up is needed.
  • Mainnet: Use https://api.blocky402.com with a Blocky402 API key, and set HEDERA_NETWORK=mainnet together with mainnet account credentials.
For all development and testing, the testnet facilitator is all you need.
Never commit your .env file or private keys to version control. Add .env to your .gitignore before your first commit and keep your ECDSA private keys out of any shared repository, log file, or public paste.