Developer Documentation
Implementation-accurate technical reference.
Every route, variable, and guarantee documented here reflects code running in this repository today—not unbuilt promises.
Local Setup & Environment
# 1. Copy environment template cp .env.example .env.local # 2. Install pinned dependencies & run tests npm install npm run typecheck npm test # 3. Start local development server npm run dev # 4. Build for production & Cloudflare Workers npm run build npm run cf:build
Server-only secrets (JUPITER_API_KEY, SOLANA_RPC_URL, SUPABASE_SERVICE_ROLE_KEY, ENABLE_MAINNET_SWAP_EXECUTION) must stay in Cloudflare Workers secrets or local .env.local—never in NEXT_PUBLIC_* variables.
Server API Routes
/api/swap/orderValidates curated or on-chain verified SPL/Token-2022 mints and positive atomic BigInt amounts, then proxies Jupiter Swap API v2 GET /order (or returns an isolated Devnet Fixture quote when cluster=devnet).
/api/swap/executeVerifies serialized Solana transaction structure and wallet signature presence, checks operator emergency gate, and submits to Jupiter Swap API v2 POST /execute.
/api/solana/rpcRate-limited multi-endpoint Solana JSON-RPC 2.0 proxy (single & batch) restricted to safe allowlisted read/send methods for Cloak ZK proofs and #claim payment links.
/api/solana/token-infoInspects any base58 Solana address on-chain (jsonParsed) to verify it is an initialized SPL Token or Token-2022 mint and returns authoritative decimals & symbol.
/api/solana/balancesServer-side Solana RPC lookup returning exact atomic balances for native SOL, curated mints, and imported custom SPL / Token-2022 mints.
/api/solana/tx-statusPolls Solana RPC getSignatureStatuses with searchTransactionHistory to verify processed, confirmed, finalized, or failed transaction outcomes.
/api/healthReturns non-sensitive runtime status: whether Jupiter API key / custom RPC / Supabase are configured and current mainnet & confidential feature gate states.
Vetted Mainnet Token Allowlist
| Symbol | Decimals | Mint Address |
|---|---|---|
| SOL | 9 | So11111111111111111111111111111111111111112 |
| USDC | 6 | EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v |
| USDT | 6 | Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB |
| JUP | 6 | JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN |
| JitoSOL | 9 | J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn |
| mSOL | 9 | mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So |
| BONK | 5 | DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263 |
Transaction Verification Model
When a user initiates a mainnet swap, ANGERA calls /api/swap/order with their connected wallet as taker. The returned base64 transaction is decoded with @solana/kit before signing. After Wallet Standard solana:signTransaction completes, ANGERA verifies that the signed message bytes match the reviewed order byte-for-byte before calling /api/swap/execute.
Repository & Support
Official updates and engineering announcements are published via @Angera_sol. Also review Security Disclosures before enabling mainnet execution.
