Files
SatsFaucet/backend/.env.example
SatsFaucet 623eb720dc Redesign faucet claim flow: login → loading → eligibility → claim
- Backend: payout is now random between FAUCET_MIN_SATS and FAUCET_MAX_SATS
- Remove weighted buckets; simplify config and .env.example
- Frontend: show loading and eligibility in main body, modal only for confirm/success
- Rename Confirm payout to Claim; add styles for body loading and eligible state

Made-with: Cursor
2026-03-02 14:59:37 +01:00

56 lines
1.4 KiB
Plaintext

# Server
PORT=3001
TRUST_PROXY=false
# Comma-separated origins for CORS (default allows 5173 and 5174)
# ALLOWED_ORIGINS=http://localhost:5173,http://localhost:5174
# Database: omit for SQLite (default); set for Postgres
# DATABASE_URL=postgresql://user:pass@localhost:5432/faucet
# SQLITE_PATH=./data/faucet.db
# Security (required)
HMAC_IP_SECRET=your-secret-key-min-32-chars
JWT_SECRET=your-jwt-secret-min-32-chars
JWT_EXPIRES_IN_SECONDS=604800
NIP98_MAX_SKEW_SECONDS=300
NONCE_TTL_SECONDS=600
# Faucet economics
FAUCET_ENABLED=true
EMERGENCY_STOP=false
# Payout: random amount between FAUCET_MIN_SATS and FAUCET_MAX_SATS (inclusive)
FAUCET_MIN_SATS=10
FAUCET_MAX_SATS=100
DAILY_BUDGET_SATS=10000
MAX_CLAIMS_PER_DAY=100
MIN_WALLET_BALANCE_SATS=1000
# Eligibility
MIN_ACCOUNT_AGE_DAYS=14
MIN_ACTIVITY_SCORE=30
MIN_NOTES_COUNT=5
MIN_FOLLOWING_COUNT=10
MIN_FOLLOWERS_COUNT=0
ACTIVITY_LOOKBACK_DAYS=90
# Cooldowns
COOLDOWN_DAYS=7
IP_COOLDOWN_DAYS=7
MAX_CLAIMS_PER_IP_PER_PERIOD=1
# Nostr
NOSTR_RELAYS=wss://relay.damus.io,wss://relay.nostr.band
RELAY_TIMEOUT_MS=5000
MAX_EVENTS_FETCH=500
METADATA_CACHE_HOURS=24
# LNbits
LNBITS_BASE_URL=https://azzamo.online
LNBITS_ADMIN_KEY=your-admin-key
LNBITS_WALLET_ID=your-wallet-id
DEPOSIT_LIGHTNING_ADDRESS=faucet@yourdomain.com
DEPOSIT_LNURLP=https://yourdomain.com/.well-known/lnurlp/faucet
# Cashu redeem (optional; default: https://cashu-redeem.azzamo.net)
# CASHU_REDEEM_API_URL=https://cashu-redeem.azzamo.net