-
Notifications
You must be signed in to change notification settings - Fork 36
Expand file tree
/
Copy path.env.example
More file actions
169 lines (150 loc) · 7.69 KB
/
Copy path.env.example
File metadata and controls
169 lines (150 loc) · 7.69 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
# --- General ---
# Environment: development, test, production
NODE_ENV=development
# --- Server ---
# Port to listen on (default: 3002)
PORT=3002
# Host to bind to (default: 0.0.0.0)
HOST=0.0.0.0
# --- Database ---
# PostgreSQL connection string with credentials
DATABASE_URL=postgresql://lens:lens@localhost:5432/lens
# --- Cache & Performance ---
# Redis connection URL for caching and queues
REDIS_URL=redis://localhost:6379
# How long to cache price responses in seconds (default: 10)
PRICE_CACHE_TTL=10
# --- Active Network ---
# Which network the node operates on: "testnet" or "mainnet" (default: testnet)
# This drives all config.horizon / config.rpc / config.soroswap shortcut paths.
STELLAR_NETWORK=testnet
# Comma-separated list of networks the ingesters run for, e.g. "testnet,mainnet".
# Each venue ingester (SDEX, AMM, Soroswap, Snapshot, Aquarius) is started once
# per network listed here, each instance independently fault-isolated.
# When unset (or nothing valid remains after parsing) it falls back to just
# STELLAR_NETWORK, so a single-network node starts one instance of each ingester.
ENABLED_NETWORKS=testnet
# ─────────────────────────────────────────────────────────────────────────────
# Per-network Stellar configuration
#
# For each field below, Lens resolves the value in this priority order:
# 1. Paired var — e.g. HORIZON_URL_TESTNET / HORIZON_URL_MAINNET
# 2. Generic var — e.g. HORIZON_URL (back-compat; applied to testnet only)
# 3. Built-in default for that network
#
# Only the vars for your active network need to be set; the other network's
# values are only used when STELLAR_NETWORK switches to it.
# ─────────────────────────────────────────────────────────────────────────────
# --- Stellar Network — Testnet ---
HORIZON_URL_TESTNET=https://horizon-testnet.stellar.org
RPC_URL_TESTNET=https://soroban-testnet.stellar.org
NETWORK_PASSPHRASE_TESTNET=Test SDF Network ; September 2015
SOROSWAP_FACTORY_ADDRESS_TESTNET=CDKP5WSEZMDL53VZFPBGCL47WBPKFCN5OPYQVXB3CJWUXHPZRPHSSZ3
# Soroswap has a testnet deployment; leave enabled. Set to "false" to disable.
SOROSWAP_ENABLED_TESTNET=true
# Aquarius has no public testnet deployment today — disabled by default.
AQUARIUS_ENABLED_TESTNET=false
REFLECTOR_CONTRACT_ID_TESTNET=
# Comma-separated pairs to watch on testnet.
# Format: "CODE:ISSUER/CODE:ISSUER". Use "native" for XLM.
WATCHED_PAIRS_TESTNET=XLM:native/USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5
# --- Stellar Network — Mainnet ---
HORIZON_URL_MAINNET=https://horizon.stellar.org
# Mainnet has no free Soroban RPC — set an external provider endpoint here.
# Placeholder only; never commit a real provider URL or API key.
RPC_URL_MAINNET=https://your-provider.example.com/soroban-rpc
NETWORK_PASSPHRASE_MAINNET=Public Global Stellar Network ; September 2015
# Mainnet Soroswap factory contract address — see https://github.com/soroswap/core
SOROSWAP_FACTORY_ADDRESS_MAINNET=CA4HEQTL2WPEUYKYKCDOHCDNIV4QHNJ7EL4J4NQ6VADP7SYHVRYZ7AW2
SOROSWAP_ENABLED_MAINNET=true
AQUARIUS_ENABLED_MAINNET=true
# Reflector oracle contract on mainnet — see https://reflector.network
REFLECTOR_CONTRACT_ID_MAINNET=CCYXZMNHFXHKF3YEX4VJJ5TH3YHCVZIBPNBGM7C4PJIMCIMNNWDOQYA
# Comma-separated pairs to watch on mainnet.
WATCHED_PAIRS_MAINNET=XLM:native/USDC:GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
# --- Venue endpoint overrides (optional, shared across networks unless a
# paired _TESTNET / _MAINNET variant is set) ---
# Soroswap token-list JSON URL.
SOROSWAP_TOKEN_LIST_URL=https://raw.githubusercontent.com/soroswap/token-list/main/tokenList.json
# Aquarius AMM pools API base URL.
AQUARIUS_API_URL=https://amm.aquarius.network/api/v1/pools/
# --- Back-compat single-network vars (testnet) ---
# These are still respected when the paired _TESTNET vars above are unset.
# New deployments should prefer the paired vars above.
HORIZON_URL=https://horizon-testnet.stellar.org
RPC_URL=https://soroban-testnet.stellar.org
NETWORK_PASSPHRASE=Test SDF Network ; September 2015
SOROSWAP_FACTORY_ADDRESS=CDKP5WSEZMDL53VZFPBGCL47WBPKFCN5OPYQVXB3CJWUXHPZRPHSSZ3
WATCHED_PAIRS=XLM:native/USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5
# --- Indexer Configuration ---
# Frequency of polling for new trades/snapshots in milliseconds (default: 5000)
POLL_INTERVAL_MS=5000
# Number of SDEX trades to fetch per page (default: 200)
SDEX_PAGE_SIZE=200
# Number of AMM trades to fetch per page (default: 200)
AMM_PAGE_SIZE=200
# How often to poll Soroswap pool reserves in milliseconds (default: 60000 = 60s)
SOROSWAP_POLL_INTERVAL_MS=60000
# --- Auth & Security ---
# Secret key required for admin endpoints (e.g., adding/removing pairs)
ADMIN_API_KEY=super-secret-admin-key
# Shared secret guarding the API-key admin endpoints (POST/DELETE /admin/keys)
# and the `npm run key:issue` CLI. Send as the X-Admin-Token header.
ADMIN_TOKEN=super-secret-admin-token
# Set to "false" to disable API-key auth entirely (e.g. local dev). Any other
# value (or unset) leaves auth enabled, so every non-public route needs a key.
REQUIRE_API_KEY=true
# --- x402 Payment Gate ---
# Stellar public key where API payments should be sent.
# If unset, x402 gating is disabled.
# Optionally set ORACLE_PAYMENT_ADDRESS_TESTNET / ORACLE_PAYMENT_ADDRESS_MAINNET
# to use a different payout address per network (falls back to the shared
# ORACLE_PAYMENT_ADDRESS above for whichever one is unset).
ORACLE_PAYMENT_ADDRESS=GD...
# URL of the x402 facilitator (default: https://x402.org/facilitator)
X402_FACILITATOR_URL=https://x402.org/facilitator
# --- Bazaar catalog integrity ---
# Catalog listings arrive from clients in the payment payload, so writes are
# rate limited per payTo. A rejected listing never fails the payment.
BAZAAR_CATALOG_WRITES_PER_MIN=10
BAZAAR_CATALOG_WRITES_PER_DAY=200
# --- Oracle Relay Example ---
# Lens API base URL consumed by the relay example.
ORACLE_RELAY_API_URL=http://localhost:3002
# Soroban contract ID for the relay example.
ORACLE_RELAY_CONTRACT_ID=CC...
# Secret key for the relay's source account.
ORACLE_RELAY_SOURCE_SECRET=S...
# Asset pair pushed to the oracle contract.
ORACLE_RELAY_ASSET_A=XLM
ORACLE_RELAY_ASSET_B=USDC
# How often the relay polls Lens and updates the contract.
ORACLE_RELAY_INTERVAL_MS=60000
# --- Price Alert Bot Example ---
# Lens WebSocket endpoint the alert bot connects to.
ALERT_BOT_WS_URL=ws://localhost:3002/ws
# Pair to watch and the threshold to alert on.
ALERT_BOT_ASSET_A=XLM
ALERT_BOT_ASSET_B=USDC
ALERT_BOT_THRESHOLD=0.15
# Alert direction: "above" or "below".
ALERT_BOT_DIRECTION=above
# Optional base64 X-PAYMENT header for x402-gated streams.
ALERT_BOT_PAYMENT=
# Optional HTTPS URL to forward alerts to, plus its HMAC secret.
ALERT_BOT_NOTIFY_URL=
ALERT_BOT_NOTIFY_SECRET=alert-bot
# --- x402 Facilitator (POST /settle) ---
# The Stellar secret key the facilitator signs settlement transactions with,
# per network. This is a fee and sequence-number key only: the payer authorises
# inside the payload as a signed Soroban auth entry, so no payer key is ever
# held by this process. Leave unset to run without settlement — /settle then
# fails explicitly rather than half-working, and /supported and the Bazaar
# still serve.
FACILITATOR_SECRET_KEY_TESTNET=
FACILITATOR_SECRET_KEY_MAINNET=
# Unsuffixed form, applied to testnet only.
FACILITATOR_SECRET_KEY=
# Maximum fee in stroops the facilitator will pay (default 50000).
FACILITATOR_FEE_STROOPS_TESTNET=50000
FACILITATOR_FEE_STROOPS_MAINNET=50000