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

GET/api/swap/order
Rate limit: 30 req / min

Validates 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).

POST/api/swap/execute
Rate limit: 10 req / min

Verifies serialized Solana transaction structure and wallet signature presence, checks operator emergency gate, and submits to Jupiter Swap API v2 POST /execute.

POST/api/solana/rpc
Rate limit: 180 req / min

Rate-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.

GET/api/solana/token-info
Rate limit: 30 req / min

Inspects any base58 Solana address on-chain (jsonParsed) to verify it is an initialized SPL Token or Token-2022 mint and returns authoritative decimals & symbol.

GET/api/solana/balances
Rate limit: 40 req / min

Server-side Solana RPC lookup returning exact atomic balances for native SOL, curated mints, and imported custom SPL / Token-2022 mints.

GET/api/solana/tx-status
Rate limit: 40 req / min

Polls Solana RPC getSignatureStatuses with searchTransactionHistory to verify processed, confirmed, finalized, or failed transaction outcomes.

GET/api/health
Rate limit: Public

Returns non-sensitive runtime status: whether Jupiter API key / custom RPC / Supabase are configured and current mainnet & confidential feature gate states.

Vetted Mainnet Token Allowlist

SymbolDecimalsMint Address
SOL9So11111111111111111111111111111111111111112
USDC6EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
USDT6Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB
JUP6JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN
JitoSOL9J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn
mSOL9mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So
BONK5DezXAZ8z7PnrnRJjz3wXBoRgixCa6xjnB7YaB1pPB263

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.