Clean, modern web UI for requesting testnet KAT on Catalyst testnet (Ethereum-style addresses).
- Single page flow: address input + validation → Turnstile → request → status panel
- Backend-driven: displays faucet amount + cooldown from
GET /v1/info - Clear results: success shows tx hash link + next eligible time (when provided)
- Testnet-only guard: chainId is checked against an allowlist when
/v1/infoincludeschainId
Explorer: https://explorer.catalystnet.org (tx links use a configurable template).
- Node.js 20+
Copy the example env file and fill it in:
cp .env.example .env.localPublic env vars (available to the browser):
NEXT_PUBLIC_FAUCET_API_BASE_URL: Faucet backend base URL (no trailing slash). Example:https://faucet-api.catalystnet.orgNEXT_PUBLIC_TURNSTILE_SITE_KEY: Cloudflare Turnstile site keyNEXT_PUBLIC_NETWORK_NAME: UI label (default:Catalyst Testnet)NEXT_PUBLIC_EXPLORER_TX_URL_TEMPLATE: Tx link template. Default:https://explorer.catalystnet.org/tx/<txHash>NEXT_PUBLIC_ALLOWED_CHAIN_IDS: Comma-separated allowlist (hex or decimal). Default:0xbf8457c
npm install
npm run devThen open http://localhost:3000.
Build:
docker build -t catalyst-faucet-web .Run:
docker run --rm -p 3000:3000 \
-e NEXT_PUBLIC_FAUCET_API_BASE_URL="http://host.docker.internal:8080" \
-e NEXT_PUBLIC_TURNSTILE_SITE_KEY="your_site_key" \
-e NEXT_PUBLIC_NETWORK_NAME="Catalyst Testnet" \
-e NEXT_PUBLIC_EXPLORER_TX_URL_TEMPLATE="https://explorer.catalystnet.org/tx/<txHash>" \
-e NEXT_PUBLIC_ALLOWED_CHAIN_IDS="0xbf8457c" \
catalyst-faucet-webGET /v1/inforeturns JSON including:amount(string) and optionalsymbol(defaults toKAT)cooldownSeconds(number)- optional
chainId(hex string or number) for testnet guard
POST /v1/requestaccepts{ address, turnstileToken }and returns:txHash(string)- optional
nextEligibleAt(ISO datetime string)