Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
134 lines (112 loc) · 4.44 KB
/
Copy path.env.example
File metadata and controls
134 lines (112 loc) · 4.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
PORT=3000
MODE=development
DATABASE_URL=postgresql://postgres:postgres@localhost:5432/accesslayer
BACKEND_URL=http://localhost:3000
FRONTEND_URL=http://localhost:5173
# Required third-party credentials
GMAIL_USER=
GMAIL_APP_PASSWORD=
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
CLOUDINARY_CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
PAYSTACK_SECRET_KEY=
# Optional third-party credentials
PAYSTACK_PUBLIC_KEY=
# Runtime defaults
DB_QUERY_TIMEOUT_MS=5000
APP_SECRET=your_32_character_long_secret_string_here
API_VERSION=1.0.0
ENABLE_RESPONSE_TIMING=true
ENABLE_API_VERSION_HEADER=true
ENABLE_SCHEMA_VERSION_HEADER=true
ENABLE_REQUEST_LOGGING=true
# JWT auth
JWT_SECRET=your_32_character_long_jwt_secret_string_here
JWT_ISSUER=accesslayer-server
JWT_ACCESS_TOKEN_TTL_SECONDS=900
# Redis cache
REDIS_URL=redis://localhost:6379
ENABLE_REDIS_CACHE=true
# Query cost governor (#755): rolling per-wallet/per-IP database query budget
QUERY_COST_BUDGET=200
QUERY_COST_WINDOW_MS=60000
# QUERY_COST_MAP_JSON={"GET /search": 8}
# QUERY_COST_ADMIN_WALLETS=
# Key trade lockup (seconds between a buy and when the keys unlock for sale)
LOCKUP_DURATION_SECONDS=0
# Staking lock period options (#881): comma-separated name=seconds pairs.
STAKING_LOCK_PERIOD_OPTIONS=flexible=0,30d=2592000,90d=7776000,180d=15552000,365d=31536000
# Protocol revenue distribution (#883): cycle length in days. Trading fees are
# aggregated into a pool per cycle and claimed proportionally to stake weight.
REVENUE_DISTRIBUTION_CYCLE_DAYS=7
# Referral programme (#910): share of a referred wallet's first trade paid to
# the referrer, in basis points (500 = 5%). Paid once per referee.
REFERRAL_REWARD_BPS=500
# 2-of-3 admin multisig quorum for key deprecation (#882).
# Comma-separated Stellar addresses of the three admin wallets.
ADMIN_MULTISIG_WALLETS=
# Key sunset watch (#931): days of inactivity before a key is "near threshold"
# in GET /keys/sunset-watch. Keys flagged on-chain are always included.
KEY_SUNSET_INACTIVITY_THRESHOLD_DAYS=30
# Creator and indexer tuning
INDEXER_JITTER_FACTOR=0.1
BACKGROUND_JOB_LOCK_TTL_MS=300000
SLOW_QUERY_THRESHOLD_MS=500
CREATOR_LIST_SLOW_QUERY_THRESHOLD_MS=500
INDEXER_CURSOR_STALE_AGE_WARNING_MS=300000
INDEXER_HEARTBEAT_STALE_THRESHOLD_MS=300000
ENABLE_INDEXER_DEDUPE=true
ENABLE_INDEXER_DLQ=true
ENABLE_INDEXER_CURSOR_STALENESS_WARNING=true
# Stellar network
STELLAR_NETWORK=testnet
STELLAR_HORIZON_URL=https://horizon-testnet.stellar.org
STELLAR_SOROBAN_RPC_URL=https://soroban-testnet.stellar.org
# Soroban contract interaction service (#899): submission retry and
# confirmation polling for on-chain transactions routed through the service.
SOROBAN_SUBMIT_MAX_ATTEMPTS=3
SOROBAN_SUBMIT_BASE_DELAY_MS=1000
SOROBAN_SUBMIT_MAX_DELAY_MS=15000
SOROBAN_POLL_INTERVAL_MS=5000
SOROBAN_POLL_TIMEOUT_MS=120000
# Webhook settings
WEBHOOK_MAX_PER_CREATOR=5
WEBHOOK_RETRY_MAX_ATTEMPTS=3
WEBHOOK_RETRY_BASE_DELAY_MS=1000
# Ownership snapshot cleanup job
OWNERSHIP_SNAPSHOT_TABLE_NAME=creator_ownership_snapshots
OWNERSHIP_SNAPSHOT_CLEANUP_DRY_RUN=true
OWNERSHIP_SNAPSHOT_RETENTION_DAYS=30
OWNERSHIP_SNAPSHOT_CLEANUP_ENABLED=false
OWNERSHIP_SNAPSHOT_CLEANUP_INTERVAL_MINUTES=60
# Price movement detection job (feeds price_moved notifications)
DETECT_PRICE_MOVEMENTS_ENABLED=true
DETECT_PRICE_MOVEMENTS_INTERVAL_MINUTES=5
# TWAP computation job (#963) — recomputes 1h/4h/24h TWAP per active key
TWAP_COMPUTATION_ENABLED=true
TWAP_COMPUTATION_INTERVAL_MINUTES=5
# Request body size limits (see docs/body-size-limits.md)
BODY_SIZE_LIMIT_DEFAULT=10mb
# BODY_SIZE_LIMIT_AUTH=100kb
# BODY_SIZE_LIMIT_ADMIN=10mb
# BODY_SIZE_LIMIT_CREATORS=10mb
# Distributed tracing
# Shared secret trusted internal callers present in the
# x-internal-service-token header to have their incoming X-Trace-Id header
# honored instead of a freshly generated one. Leave unset to trust no caller.
TRACE_ID_TRUSTED_TOKEN=
# Oracle price feed
# How old an oracle price can be before the response includes isStale: true (ms)
ORACLE_STALENESS_THRESHOLD_MS=300000
# Flash loan guard (#938): FlashLoanGuardTriggered violation tracking.
# Violations reaching the threshold raise an alert and (when auto-suspend is
# enabled) suspend the wallet; history ages out after the cooldown window.
FLASH_LOAN_VIOLATION_THRESHOLD=3
FLASH_LOAN_AUTO_SUSPEND_ENABLED=true
FLASH_LOAN_VIOLATION_COOLDOWN_HOURS=24
# 0 suspends until the violation history clears.
FLASH_LOAN_SUSPENSION_DURATION_HOURS=0
FLASH_LOAN_CLEANUP_ENABLED=true
FLASH_LOAN_CLEANUP_INTERVAL_MINUTES=60