-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy path.env.example
More file actions
96 lines (84 loc) · 3.41 KB
/
Copy path.env.example
File metadata and controls
96 lines (84 loc) · 3.41 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
# --- 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
# --- Stellar Network ---
# URL of the Horizon server (default: testnet)
HORIZON_URL=https://horizon-testnet.stellar.org
# URL of the Soroban RPC server (default: testnet)
RPC_URL=https://soroban-testnet.stellar.org
# Stellar network passphrase
NETWORK_PASSPHRASE=Test SDF Network ; September 2015
# Network mode: mainnet or testnet (used for x402 gating logic)
STELLAR_NETWORK=testnet
# --- 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
# --- 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
# --- App Logic ---
# Comma-separated list of asset pairs to watch.
# Format: "CODE:ISSUER/CODE:ISSUER". Use "native" for XLM.
# Example: XLM/USDC on testnet
WATCHED_PAIRS=XLM:native/USDC:GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5
# --- x402 Payment Gate ---
# Stellar public key where API payments should be sent.
# If unset, x402 gating is disabled.
ORACLE_PAYMENT_ADDRESS=GD...
# URL of the x402 facilitator (default: https://facilitator.stellar.org)
X402_FACILITATOR_URL=https://facilitator.stellar.org
# --- 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
# --- Soroswap AMM Ingester ---
# Mainnet Soroswap factory contract address
# See: https://github.com/soroswap/core
SOROSWAP_FACTORY_ADDRESS=CA4HEQTL2WPEUYKYKCDOHCDNIV4QHNJ7EL4J4NQ6VADP7SYHVRYZ7AW2
# How often to poll Soroswap pool reserves in milliseconds (default: 60000 = 60s)
SOROSWAP_POLL_INTERVAL_MS=60000