-
Notifications
You must be signed in to change notification settings - Fork 51
Expand file tree
/
Copy path.env.example
More file actions
136 lines (122 loc) · 7.11 KB
/
Copy path.env.example
File metadata and controls
136 lines (122 loc) · 7.11 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
# ─── Database ───────────────────────────────────────────────
# Local:
# DATABASE_URL="postgresql://wraith:wraith@localhost:5432/wraith"
# DIRECT_DATABASE_URL="postgresql://wraith:wraith@localhost:5432/wraith"
#
# Supabase (pooler for queries, direct for migrations):
# DATABASE_URL="postgresql://postgres.[ref]:[password]@aws-0-[region].pooler.supabase.com:6543/postgres?pgbouncer=true&sslmode=require"
# DIRECT_DATABASE_URL="postgresql://postgres.[ref]:[password]@aws-0-[region].supabase.com:5432/postgres?sslmode=require"
DATABASE_URL="postgresql://wraith:wraith@localhost:5432/wraith"
DIRECT_DATABASE_URL="postgresql://wraith:wraith@localhost:5432/wraith"
# ─── Network ─────────────────────────────────────────────────
# Set STELLAR_NETWORK to "testnet" or "mainnet".
# testnet → SOROBAN_RPC_URL defaults to https://soroban-testnet.stellar.org
# mainnet → SOROBAN_RPC_URL is required (no free public mainnet RPC)
STELLAR_NETWORK="testnet"
# ─── Soroban RPC ─────────────────────────────────────────────
# Explicit RPC endpoint — overrides any network-based default.
# Required when STELLAR_NETWORK=mainnet.
# Backward-compat: STELLAR_RPC_URL is also accepted if SOROBAN_RPC_URL is unset.
#
# Testnet (public, free):
# SOROBAN_RPC_URL="https://soroban-testnet.stellar.org"
#
# Mainnet providers (choose one):
# Validation Cloud: https://mainnet.stellar.validationcloud.io/v1/<API_KEY>
# Ankr: https://rpc.ankr.com/stellar_soroban/<API_KEY>
# Self-hosted: https://your-own-rpc.example.com
#
# Leave blank when STELLAR_NETWORK=testnet to use the default testnet URL.
SOROBAN_RPC_URL=
# ─── Indexer config ──────────────────────────────────────────
# Ledger to start indexing from (leave blank to resume from DB state)
START_LEDGER=
# Polling interval in ms (default: 6000 = ~1 ledger)
POLL_INTERVAL_MS=6000
# ─── SAC Contract IDs ────────────────────────────────────────
# Comma-separated list of Soroban SAC (Stellar Asset Contract) IDs to watch.
# When unset, defaults to the native XLM SAC for the configured STELLAR_NETWORK:
# testnet → CDMLFMKMMD7MWZP3FKUBZPVHTUEDLSX4BYGYKH4GCESXYHS3IHQ4EIG4
# mainnet → CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC
#
# How to derive a SAC address for any Stellar asset:
# import { Asset, Networks } from '@stellar/stellar-sdk';
# // Native XLM:
# Asset.native().contractId(Networks.PUBLIC);
# // Custom asset (e.g., USDC issued by Centre):
# new Asset('USDC', 'GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN')
# .contractId(Networks.PUBLIC);
#
# Known mainnet SAC addresses:
# XLM (native): CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC
# USDC (Centre): CBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA
#
# Example (watch XLM + USDC on mainnet):
# SAC_CONTRACT_IDS=CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC,CBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA
#
# Per-network watch lists (for dual-network deployments when NETWORKS=testnet,mainnet):
# SAC_CONTRACT_IDS_TESTNET=CDMLFMKMMD7MWZP3FKUBZPVHTUEDLSX4BYGYKH4GCESXYHS3IHQ4EIG4
# SAC_CONTRACT_IDS_MAINNET=CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG2FB2RMQQVU2HHGCYSC
#
# Soroban RPC's getEvents accepts multiple contract IDs in a single request —
# there is no N+1 query penalty for watching multiple contracts.
SAC_CONTRACT_IDS=
SAC_CONTRACT_IDS_TESTNET=
SAC_CONTRACT_IDS_MAINNET=
# ─── NFT Contract IDs ───────────────────────────────────────────────────────
# Comma-separated list of CAP-46 NFT contract IDs to explicitly watch.
# When unset, NFT events are still auto-detected from any contract event that
# carries 4 topics (the CAP-46 transfer(from, to, token_id) structure).
#
# Example (watch a known testnet NFT contract):
# NFT_CONTRACT_IDS=CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
#
# Per-network NFT watch lists (for dual-network deployments):
# NFT_CONTRACT_IDS_TESTNET=
# NFT_CONTRACT_IDS_MAINNET=
NFT_CONTRACT_IDS=
NFT_CONTRACT_IDS_TESTNET=
NFT_CONTRACT_IDS_MAINNET=
# Legacy alias — CONTRACT_IDS is still accepted for backwards-compatibility.
# SAC_CONTRACT_IDS takes precedence when both are set.
# CONTRACT_IDS=
# Max events per RPC call (Stellar RPC hard-caps at 10000)
EVENTS_BATCH_SIZE=10000
# Delete transfers older than N days to stay within DB free-tier limits (default: 30)
RETENTION_DAYS=30
# ─── API ─────────────────────────────────────────────────────
PORT=3000
# ─── Response cache (Redis) ──────────────────────────────────
# Opt-in caching for the hot read endpoints (/assets/popular, /search).
# Off by default; set CACHE_ENABLED=true to turn it on.
# Clients can force a fresh response with the `X-No-Cache` request header.
CACHE_ENABLED=false
REDIS_URL="redis://localhost:6379"
# Key namespace applied to every cached entry.
CACHE_KEY_PREFIX="wraith:cache:"
# Per-route TTLs in milliseconds.
CACHE_TTL_POPULAR_MS=60000
CACHE_TTL_SEARCH_MS=15000
# ─── Contract tombstones ────────────────────────────────────────────────────
# How many poll cycles between contract-liveness checks (#137). Each check
# costs one RPC call per unique watched contract, so this is deliberately far
# rarer than a poll: a contract TTL is measured in weeks, and noticing an
# expiry ten minutes late costs nothing. Set to 0 to disable the check.
# Default: 100 cycles (~10 min at the default 6s poll interval).
TOMBSTONE_CHECK_EVERY_CYCLES=100
# ─── LP-share tracking ──────────────────────────────────────────────────────
# Contracts to treat as liquidity pools even before one of their explicit
# deposit/withdraw events has been observed (#136).
#
# Bare SEP-41 mint/burn is only recorded as an LP-share movement for contracts
# already established as pools — otherwise every stablecoin mint on the chain
# would land in LpShareTransfer as a liquidity deposit. A pool normally
# identifies itself by emitting deposit/withdraw; list one here only if it
# emits nothing but bare mint/burn.
LP_POOL_CONTRACT_IDS=
LP_POOL_CONTRACT_IDS_TESTNET=
LP_POOL_CONTRACT_IDS_MAINNET=
# Start the API without the indexer loop. Used by the integration harness so
# HTTP tests run against a seeded database without an ingest racing them, and
# without needing live RPC. Not for production.
SKIP_INDEXER=false