-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
138 lines (124 loc) · 5.46 KB
/
Copy path.env.example
File metadata and controls
138 lines (124 loc) · 5.46 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
# ============================================================================
# STELLAR NETWORK CONFIGURATION
# ============================================================================
# Read more: https://developers.stellar.org/docs/learn/networks
#
# STELLAR_NETWORK - Which Stellar network to connect to. This determines:
# • Which Horizon server is used to fetch blockchain data
# • Whether testnet-only endpoints (like Friendbot) are available
# • Account balances, transaction history, and asset metadata
#
# IMPORTANT: Do NOT confuse STELLAR_NETWORK with the network passphrase.
# This variable controls which PUBLIC network you connect to.
#
# Available values: "testnet" or "mainnet"
#
# TESTNET: "Test SDF Network ; September 2015"
# • Free, experimental network for development and testing
# • Account balances and transactions reset periodically
# • Friendbot endpoint available to fund test accounts
# • Connect via: https://horizon-testnet.stellar.org
# • Use this for development, QA, and feature testing
# • NEVER use real money or production private keys on testnet
#
# MAINNET: "Public Global Stellar Network ; September 2015"
# • Production network where real transactions and value occur
# • Data is persistent; accounts and balances never reset
# • Friendbot is NOT available (use real funds to create accounts)
# • Connect via: https://horizon.stellar.org
# • Use only when deployed to production
# • ALWAYS use with secure key management and proper monitoring
#
# ⚠️ CRITICAL: Set this to "mainnet" explicitly before production deployment.
# Leaving this as "testnet" in production will use test data and may block
# real transactions from being signed or submitted.
#
STELLAR_NETWORK=testnet
# ============================================================================
# HORIZON SERVER URL (Optional Override)
# ============================================================================
# Read more: https://developers.stellar.org/docs/data/apis/horizon
#
# HORIZON_URL - Override the Horizon API endpoint. When left empty, the server
# automatically selects the correct public Horizon server based on STELLAR_NETWORK.
#
# Leave this blank in most cases unless you need to:
# • Use a private/custom Horizon instance
# • Point to a load balancer or proxy
# • Connect to a staging or development Horizon server
#
# Default behavior (when HORIZON_URL is empty):
# • If STELLAR_NETWORK=testnet → uses https://horizon-testnet.stellar.org
# • If STELLAR_NETWORK=mainnet → uses https://horizon.stellar.org
#
# Horizon is the REST API layer that allows this application to:
# • Query account balances and transaction history
# • Stream live ledger updates and account changes
# • Estimate transaction fees from current network conditions
# • Look up assets, liquidity pools, and order book data
#
# Official Horizon endpoints:
# Testnet: https://horizon-testnet.stellar.org
# Mainnet: https://horizon.stellar.org
#
# Check Horizon uptime and status:
# https://stellar.statuspage.io
#
HORIZON_URL=
# StellarKit API environment variables
# Copy this file to `.env` and adjust values as needed.
# Soroban RPC server URL — required for the /soroban/* endpoints
# Testnet default: https://soroban-testnet.stellar.org
# Mainnet has no free SDF-hosted RPC — set your own provider URL
SOROBAN_RPC_URL=
# Server config
# API connectivity
STELLAR_NETWORK=testnet
# Server
PORT=3000
# Logging
# Controls log level: fatal, error, warn, info, debug, trace
# Default: info
LOG_LEVEL=info
# Cache
# Global fallback TTL for in-memory caches (milliseconds).
# Used as the default when a per-endpoint variable is not set.
CACHE_TTL_MS=5000
# Per-endpoint cache TTL overrides (all in milliseconds).
# When set, these take precedence over CACHE_TTL_MS for their respective endpoint.
CACHE_TTL_NETWORK_STATUS_MS=5000
CACHE_TTL_FEE_ESTIMATE_MS=5000
CACHE_TTL_BASE_FEE_MS=5000
CACHE_TTL_VALIDATORS_MS=300000
CACHE_TTL_ASSET_MS=30000
CACHE_TTL_ASSET_PRICE_MS=5000
CACHE_TTL_TRUSTLINES_MS=15000
# Cache TTL for GET /dex/arbitrage/:code/:issuer (milliseconds)
# Arbitrage opportunity data changes rapidly with market conditions. A short
# window avoids stale paths while still absorbing repeated polling.
# Default: 5000 (5 seconds)
CACHE_TTL_ARBITRAGE_MS=5000
# API Key authentication
# If set to "true", the API key middleware will require a valid API key
# for protected routes.
REQUIRE_API_KEY=false
# Comma-separated list of valid API keys.
# Example: "validkey1,validkey2".
# Whitespace around keys is trimmed by the middleware.
API_KEYS=validkey1,validkey2
# Cache TTL for GET /account/:id/transaction-count (milliseconds)
# Transaction counts change only when new transactions are submitted, so a
# short window is sufficient to absorb repeated polling without stale risk.
# Default: 20000 (20 seconds)
CACHE_TTL_TX_COUNT_MS=20000
# Cache TTL for GET /soroban/contract/:id/storage (milliseconds)
# Instance storage entries change only when the contract is invoked and writes
# to its persistent storage. A 15-second window absorbs repeated polling while
# staying reasonably fresh for debugging workflows.
# Default: 15000 (15 seconds)
CACHE_TTL_CONTRACT_STORAGE_MS=15000
# Cache TTL for GET /stellar-toml/:domain (milliseconds)
# TOML files change very infrequently — only when an asset issuer updates their
# metadata. A 5-minute window is a safe default. Set to 0 to disable caching.
# Default: 300000 (5 minutes)
CACHE_TTL_TOML_MS=300000