Set Up the Seller Account
The seller account is the heart of your Agora402 deployment. It receives all incoming payments, signs the registry listing that other agents discover, and writes receipts to the HCS receipts topic.1
Create a testnet ECDSA account
Navigate to portal.hedera.com and sign in. Create a new account and choose ECDSA as the key type when prompted. The faucet automatically credits your new account with free testnet HBAR — no purchase required.
2
Copy your account credentials
From the portal dashboard, copy:
- Account ID — displayed as
0.0.xxxxx(shard.realm.num format) - ECDSA private key — a hex string beginning with
0x
3
Add credentials to .env
Open your Do not add quotes around the values and do not commit this file to version control.
.env file (copied from .env.example) and fill in the two seller variables:.env
Set Up the Buyer Account
Rather than asking you to create a second portal account, Agora402 provisions the buyer account programmatically. The setup script creates a fresh keypair, submits an account creation transaction to Hedera using the seller’s credentials, transfers 100 HBAR from the seller to the new account, and writes the resulting account ID and private key directly to your.env.
1
Run the buyer setup script
From the repository root, run:The script transfers 100 HBAR from the seller account to fund the new buyer account. Make sure your seller account has enough HBAR — the testnet faucet provides plenty for development.
2
Wait for .env to be updated
The script writes
BUYER_ACCOUNT_ID and BUYER_PRIVATE_KEY to your .env automatically. You should see output similar to:3
Verify the buyer variables are present
Confirm that both buyer variables were written correctly:Expected output:If either line is missing, re-run
npm run setup:buyer after confirming your seller credentials are correct in .env.Account Roles Reference
The table below summarises what each account does in the system so you know which credential to use when troubleshooting.Testnet vs Mainnet
By default, Agora402 targets Hedera testnet and the hosted Blocky402 testnet facilitator. When you are ready to go to production, make the following changes across your.env:
To switch to mainnet, set
HEDERA_NETWORK=mainnet, replace both account IDs and private keys with your mainnet ECDSA accounts, and change FACILITATOR_URL to https://api.blocky402.com (the Blocky402 mainnet endpoint, which requires an API key). All HCS topic IDs must also be re-created on mainnet using npm run setup:topics against the mainnet network.