-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy path.env.example
More file actions
98 lines (87 loc) · 5.11 KB
/
Copy path.env.example
File metadata and controls
98 lines (87 loc) · 5.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
# ─── 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
#
# 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=
# ─── 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
NFT_CONTRACT_IDS=
# 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