-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example
More file actions
186 lines (148 loc) · 6.42 KB
/
env.example
File metadata and controls
186 lines (148 loc) · 6.42 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# Dexalot SDK Configuration
# Copy this file to .env and adjust values as needed.
# --- Connection Settings ---
# Environment configuration (e.g., fuji-multi, production-multi)
# Default: fuji-multi
PARENTENV=fuji-multi
# Wallet Private Key (optional — only needed for signing transactions)
PRIVATE_KEY=your_private_key_here_starting_with_0x
# Optional: Override API URLs (Auto-detected based on PARENTENV usually)
# API_BASE_URL_MAINNET=https://api.dexalot.com
# API_BASE_URL_TESTNET=https://api.dexalot-test.com
# Connection Pool Settings
# Total connection pool size across all hosts
# Default: 100
DEXALOT_CONNECTION_POOL_LIMIT=100
# Maximum connections per individual host
# Default: 30
DEXALOT_CONNECTION_POOL_LIMIT_PER_HOST=30
# --- Logging Settings ---
# Logging Level: debug, info, warn, error
# Default: info
DEXALOT_LOG_LEVEL=info
# Logging Format: console, json
# Default: console
DEXALOT_LOG_FORMAT=console
# --- Cache Settings ---
# Enable/Disable all caching
# Default: true
DEXALOT_ENABLE_CACHE=true
# Cache Time-To-Live (TTL) in seconds
DEXALOT_CACHE_TTL_STATIC=3600 # Environments, Deployments (Default: 1h)
DEXALOT_CACHE_TTL_SEMI_STATIC=900 # Tokens, Pairs (Default: 15m)
DEXALOT_CACHE_TTL_BALANCE=10 # Portfolio/Wallet Balances (Default: 10s)
DEXALOT_CACHE_TTL_ORDERBOOK=1 # Orderbook Snapshots (Default: 1s)
# --- Retry Settings ---
# Enable/Disable automatic retry with exponential backoff
# Default: true
DEXALOT_RETRY_ENABLED=true
# Maximum number of retry attempts (including initial attempt)
# Default: 3
DEXALOT_RETRY_MAX_ATTEMPTS=3
# Initial delay in seconds before first retry
# Default: 1.0
DEXALOT_RETRY_INITIAL_DELAY=1.0
# Maximum delay in seconds between retries (caps exponential backoff)
# Default: 10.0
DEXALOT_RETRY_MAX_DELAY=10.0
# Exponential backoff multiplier for HTTP retries
# Default: 2.0
DEXALOT_RETRY_EXPONENTIAL_BASE=2.0
# --- HTTP client timeouts (REST API) ---
# Connect and read timeouts in seconds (axios uses read timeout as the request cap).
# Default: 5 / 30
# DEXALOT_TIMEOUT_CONNECT=5
# DEXALOT_TIMEOUT_READ=30
# --- Rate Limiting Settings ---
# Enable/Disable rate limiting for API and RPC calls
# Default: true
DEXALOT_RATE_LIMIT_ENABLED=true
# Maximum API requests per second
# Default: 5.0
DEXALOT_RATE_LIMIT_REQUESTS_PER_SECOND=5.0
# Maximum RPC calls per second
# Default: 10.0
DEXALOT_RATE_LIMIT_RPC_PER_SECOND=10.0
# --- WebSocket Settings ---
# Enable/Disable WebSocket Manager (persistent connections)
# Required for subscribe_to_events(); when false, subscription calls raise RuntimeError
# Default: false (disabled by default)
DEXALOT_WS_MANAGER_ENABLED=false
# Ping interval in seconds (heartbeat)
# Default: 30
DEXALOT_WS_PING_INTERVAL=30
# Ping timeout in seconds (wait for pong before reconnecting)
# Default: 10
DEXALOT_WS_PING_TIMEOUT=10
# Initial reconnect delay in seconds
# Default: 1.0
DEXALOT_WS_RECONNECT_INITIAL_DELAY=1.0
# Maximum reconnect delay in seconds (caps exponential backoff)
# Default: 60.0
DEXALOT_WS_RECONNECT_MAX_DELAY=60.0
# Exponential backoff multiplier for reconnection delays
# Default: 2.0
DEXALOT_WS_RECONNECT_EXPONENTIAL_BASE=2.0
# Maximum reconnection attempts (0 = infinite)
# Default: 10
DEXALOT_WS_RECONNECT_MAX_ATTEMPTS=10
# Clock skew compensation for private-topic signatures (milliseconds).
# Added to local timestamp when server clock differs. Use a negative value if local clock is ahead.
# Backend accepts timestamps within ±30 000 ms of server time. Default: 0
# DEXALOT_WS_TIME_OFFSET_MS=0
# --- Provider Failover Settings ---
# Enable/Disable RPC provider failover (automatic failover to backup providers)
# Default: true
DEXALOT_PROVIDER_FAILOVER_ENABLED=true
# Cooldown period in seconds before retrying a failed provider
# Default: 60
DEXALOT_PROVIDER_FAILOVER_COOLDOWN=60
# Maximum number of failures before marking a provider as unhealthy
# Default: 3
DEXALOT_PROVIDER_FAILOVER_MAX_FAILURES=3
# --- Nonce Manager Settings ---
# Enable/Disable per-(chain_id, address) nonce serialization for write operations
# Default: true
# DEXALOT_NONCE_MANAGER_ENABLED=true
# --- ERC20 Balance Concurrency ---
# Maximum number of concurrent balanceOf RPC calls when fetching wallet ERC20 balances.
# Increase to speed up balance fetches for chains with many tokens; decrease to reduce RPC load.
# Default: 10
# DEXALOT_ERC20_BALANCE_CONCURRENCY=10
# --- RPC Security Settings ---
# Allow plain http:// RPC endpoints. By default http:// URLs are rejected at provider setup time
# with an error. Set to true only for local development or trusted private networks.
# Default: false
# DEXALOT_ALLOW_INSECURE_RPC=false
# --- Auth Settings ---
# Enable timestamped auth signatures to prevent replay attacks.
# When true, signs "dexalot{ts}" and sends x-timestamp header.
# Requires backend support — keep false until backend confirms timestamp validation.
# Default: false
# DEXALOT_TIMESTAMPED_AUTH=false
# --- RPC Provider Override ---
# Override RPC endpoints for specific chains (comma-separated for multiple providers)
# Two formats are supported:
# 1. Chain ID format (preferred): DEXALOT_RPC_<CHAIN_ID>=url1,url2,url3
# 2. Native token symbol format: DEXALOT_RPC_<NATIVE_TOKEN_SYMBOL>=url1,url2,url3
# Chain ID takes precedence over native token symbol if both are set
# Examples:
# DEXALOT_RPC_43114=https://api.avax.network/ext/bc/C/rpc,https://avalanche.public-rpc.com
# DEXALOT_RPC_1=https://eth.llamarpc.com,https://ethereum.public-rpc.com
# DEXALOT_RPC_42161=https://arb1.arbitrum.io/rpc
# DEXALOT_RPC_432204=https://subnets.avax.network/dexalot/mainnet/rpc
# DEXALOT_RPC_AVAX=https://api.avax.network/ext/bc/C/rpc,https://avalanche.public-rpc.com
# DEXALOT_RPC_ETH=https://eth.llamarpc.com,https://ethereum.public-rpc.com
# DEXALOT_RPC_ALOT=https://subnets.avax.network/dexalot/mainnet/rpc
# --- Secrets Vault Settings ---
# These settings are only needed for an optional secrets-vault / MCP workflow.
# Plain SDK usage does not require them.
# Fernet encryption key for the secrets vault (Python tooling).
# If not set, an MCP server may prompt for it at startup (or start in read-only mode).
# DEXALOT_SECRETS_VAULT_KEY=your-fernet-key-here
# Skip the interactive terminal prompt in containerised / non-interactive deployments.
# Set to true when running in Docker or CI where stdin is not a terminal.
# DEXALOT_SECRETS_VAULT_NO_PROMPT=false
# Path to the encrypted secrets vault file.
# Default: ~/.dexalot/secrets_vault.json
# DEXALOT_SECRETS_VAULT_PATH=~/.dexalot/secrets_vault.json