113 lines
3.7 KiB
Plaintext
113 lines
3.7 KiB
Plaintext
# Server
|
|
NODE_ENV=development
|
|
PORT=4000
|
|
API_PREFIX=/api/v1
|
|
|
|
# Database
|
|
DATABASE_URL=postgresql://user:password@localhost:5432/crypto_wallet
|
|
|
|
# JWT
|
|
JWT_SECRET=your-super-secret-jwt-key-min-32-chars
|
|
# One-time first-admin setup (production). Min. 16 chars; use 32+ random characters.
|
|
# INITIAL_SETUP_TOKEN=your-random-setup-token-min-32-chars
|
|
# Emergency Super Admin 2FA reset (CLI only). Min 32 chars; leave empty to disable.
|
|
# BREAK_GLASS_TOKEN=
|
|
JWT_ACCESS_EXPIRY=15m
|
|
JWT_REFRESH_EXPIRY=7d
|
|
|
|
# Encryption (AES-256) - 32 bytes hex
|
|
ENCRYPTION_KEY=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
|
|
|
# HD Wallet - platform mnemonic (24 words). Keep secret; used to derive user deposit addresses and hot wallet.
|
|
PLATFORM_MNEMONIC=word1 word2 ... word24
|
|
|
|
# Blockchain
|
|
TRON_NODE_URL=https://api.trongrid.io
|
|
TRON_API_KEY=
|
|
POLYGON_RPC_URL=https://polygon-rpc.com
|
|
USDC_POLYGON_CONTRACT=0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359
|
|
# Leave empty in production (uses mainnet USDT from DB). Shasta contract is rejected at boot when NODE_ENV=production.
|
|
USDT_TRC20_CONTRACT=
|
|
# BSC mainnet for USDT BEP20 (parallel to TRC20)
|
|
BSC_RPC_URL=https://bsc-dataseed.binance.org
|
|
# Leave empty to use official USDT BEP20 from DB
|
|
USDT_BEP20_CONTRACT=
|
|
BSC_GETLOGS_BLOCK_RANGE=2000
|
|
|
|
# Safety (recommended for testing)
|
|
# NETWORK_MODE=testnet # default behavior in non-production is testnet safety
|
|
# ALLOW_WITHDRAWALS=false # withdrawals are disabled unless set to true
|
|
|
|
# Deposit confirmations
|
|
TRON_CONFIRMATIONS=20
|
|
BSC_CONFIRMATIONS=15
|
|
POLYGON_CONFIRMATIONS=64
|
|
|
|
# Rate limiting
|
|
RATE_LIMIT_WINDOW_MS=900000
|
|
RATE_LIMIT_MAX=100
|
|
LOGIN_RATE_LIMIT_MAX=5
|
|
|
|
# Withdrawal
|
|
DAILY_WITHDRAWAL_LIMIT_USD=10000
|
|
LARGE_WITHDRAWAL_THRESHOLD_USD=1000
|
|
|
|
# Countries catalog (optional — without a key, sync uses ISO 3166 from GitHub)
|
|
# REST_COUNTRIES_API_KEY=
|
|
|
|
# App URLs (verification links in emails)
|
|
# SMTP settings can live here or in the repo root .env (root wins for mail vars).
|
|
APP_PUBLIC_URL=http://localhost:5173
|
|
# EMAIL_TRANSPORT=console # omit or set smtp when SMTP_* vars are configured
|
|
# SMTP_HOST=smtp.gmail.com
|
|
# SMTP_PORT=587
|
|
# SMTP_SECURE=false
|
|
# SMTP_USER=your@gmail.com
|
|
# SMTP_PASS=your-app-password
|
|
# EMAIL_FROM=your@gmail.com
|
|
VERIFY_EMAIL_PATH=/verify-email
|
|
RESET_PASSWORD_PATH=/reset-password
|
|
PASSWORD_RESET_EXPIRY_HOURS=1
|
|
|
|
# SMTP (required when EMAIL_TRANSPORT=smtp)
|
|
# SMTP_HOST=smtp.example.com
|
|
# SMTP_PORT=587
|
|
# SMTP_SECURE=false
|
|
# SMTP_USER=your-smtp-user
|
|
# SMTP_PASS=your-smtp-password
|
|
# EMAIL_FROM=Prediqo <noreply@yourdomain.com>
|
|
|
|
# Candle Predict engine (performance tuning for production scale)
|
|
# CANDLE_PREDICT_ENGINE_TICK_MS=3000 # main loop interval (ms)
|
|
# CANDLE_PREDICT_BACKFILL_MAX_PER_TICK=2 # candles per interval per backfill run
|
|
# CANDLE_PREDICT_BACKFILL_INTERVAL_MS=60000 # min delay between backfill runs (ms)
|
|
# CANDLE_PREDICT_BACKFILL_SEED_MAX=15 # initial chart history per interval
|
|
|
|
# Phase B — Redis + realtime (optional in local dev)
|
|
REDIS_URL=redis://localhost:6379
|
|
REDIS_ENABLED=true
|
|
REDIS_ROUND_CACHE=true
|
|
BET_ASYNC=true
|
|
ENGINE_ENABLED=false
|
|
WS_ENABLED=false
|
|
WS_PORT=4001
|
|
WS_PATH=/ws/v1/games/candle-predict
|
|
WS_SUPPORT_PATH=/ws/v1/support
|
|
WS_SECURITY_PATH=/ws/v1/security
|
|
WORKER_ID=worker-1
|
|
|
|
# Observability (optional)
|
|
# SENTRY_DSN=https://...@sentry.io/...
|
|
# SENTRY_TRACES_SAMPLE_RATE=0.1
|
|
|
|
# ClamAV virus scan on uploads (optional — requires clamd)
|
|
# CLAMAV_ENABLED=false
|
|
# CLAMAV_HOST=127.0.0.1
|
|
# CLAMAV_PORT=3310
|
|
# CLAMAV_TIMEOUT_MS=30000
|
|
|
|
# Slack alerts (optional — create one Incoming Webhook per channel in Slack)
|
|
# SLACK_SECURITY_WEBHOOK_URL=https://hooks.slack.com/services/... # #security
|
|
# SLACK_REFERRAL_WEBHOOK_URL=https://hooks.slack.com/services/... # #referral-fraud
|
|
# SLACK_WEBHOOK_URL=https://hooks.slack.com/services/... # legacy fallback for both
|