-
Notifications
You must be signed in to change notification settings - Fork 66
Expand file tree
/
Copy pathenv.example
More file actions
138 lines (114 loc) · 5.14 KB
/
Copy pathenv.example
File metadata and controls
138 lines (114 loc) · 5.14 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
# ========================================
# OVERSYNC ENVIRONMENT CONFIGURATION
# ========================================
# Copy this file to `.env` (in the same directory) and fill in real values.
# All secret keys MUST be replaced before running the project.
NODE_ENV=development
DEBUG=false
LOG_LEVEL=info
# ========================================
# NETWORK CONFIGURATION
# ========================================
# Primary network mode (testnet or mainnet). All chain selection is derived
# from this single value; testnet uses Sepolia + Stellar testnet, mainnet
# uses Ethereum mainnet + Stellar public network.
NETWORK_MODE=testnet
# Canonical Ethereum ↔ Stellar asset mappings live in @oversync/sdk
# (packages/sdk/src/assets/index.ts). Extend there for custom testnet pairs.
# RPC URLs — Infura (recommended for production)
# -----------------------------------------------
# Option A (simplest): one key for backend + local dev
# INFURA_API_KEY=your_project_key
#
# Option B: full URLs (override the key — e.g. different Infura projects)
# SEPOLIA_RPC_URL=https://sepolia.infura.io/v3/your_project_key
# MAINNET_RPC_URL=https://mainnet.infura.io/v3/your_project_key
#
# Resolution order (testnet): SEPOLIA_RPC_URL → ETHEREUM_RPC_URL → Infura → public fallback
SEPOLIA_RPC_URL=
MAINNET_RPC_URL=
INFURA_API_KEY=
# Stellar Horizon endpoint (auto-selected if blank).
STELLAR_HORIZON_URL=
# Optional: Soroban RPC endpoint (required once Soroban contracts are deployed).
SOROBAN_RPC_URL=
# ========================================
# CONTRACT ADDRESSES (auto-populated after deploy)
# ========================================
# EVM contracts (filled by deploy scripts).
# v2 canonical names — must match deployments.testnet.json / deployments.mainnet.json.
ETH_HTLC_ESCROW_TESTNET=
ETH_HTLC_ESCROW_MAINNET=
ETH_RESOLVER_REGISTRY_TESTNET=
ETH_RESOLVER_REGISTRY_MAINNET=
# Soroban contract IDs (filled by deploy scripts).
SOROBAN_HTLC_TESTNET=
SOROBAN_HTLC_MAINNET=
SOROBAN_RESOLVER_REGISTRY_TESTNET=
SOROBAN_RESOLVER_REGISTRY_MAINNET=
# Optional 1inch Escrow Factory fallback (mainnet only).
ONEINCH_ESCROW_FACTORY_MAINNET=0xa7bcb4eac8964306f9e3764f67db6a7af6ddf99a
# ========================================
# COORDINATOR (ex-relayer) CONFIGURATION
# ========================================
# The coordinator NEVER holds user funds. The keys below are only used for
# (a) submitting non-custodial secret-reveal transactions on the user's
# behalf as a convenience and (b) running an optional reference resolver.
# Users can always claim/refund directly from their own wallet.
# Coordinator database URL
# Default: file:./oversync.db (SQLite, local development)
# Production: postgresql://user:password@host:5432/oversync (PostgreSQL)
# The schema is automatically applied on startup.
DATABASE_URL=file:./oversync.db
COORDINATOR_PORT=3001
COORDINATOR_POLL_INTERVAL_MS=15000
COORDINATOR_RPC_TIMEOUT_MS=8000
# Max JSON body size for coordinator API endpoints (bytes). Default: 65536 (64 KiB).
COORDINATOR_MAX_BODY_BYTES=65536
# CORS origins for the coordinator HTTP API.
# Comma-separated list of allowed origins (e.g., https://app.oversync.xyz).
# When set, only requests from these origins receive CORS headers.
# Requests without an Origin header (server-to-server) are always allowed.
# Default (unset): http://localhost:3000,http://localhost:5173,http://127.0.0.1:3000,http://127.0.0.1:5173
# Set to "*" to allow all origins (not recommended for production).
COORDINATOR_CORS_ORIGINS=
# Relayer chain polling (DigitalOcean / background listeners).
# Chain monitoring + Infura RPC start on the FIRST swap order only — not at boot,
# not when someone merely opens the site (/api/wake).
# Frontend POST /api/wake → session hint only (zero RPC).
RELAYER_ACTIVE_POLL_INTERVAL_MS=15000
RELAYER_IDLE_POLL_INTERVAL_MS=120000
RELAYER_VISITOR_TTL_MS=300000
# Optional: only required if this node also acts as a reference resolver.
# Leave blank if running coordinator-only mode.
RESOLVER_ETH_PRIVATE_KEY=
RESOLVER_STELLAR_SECRET=
# Persistence (SQLite for dev, Postgres for prod).
DATABASE_URL=file:./oversync.db
# ========================================
# 1INCH FUSION+ INTEGRATION (optional)
# ========================================
ONEINCH_API_KEY=
# ========================================
# THIRD-PARTY API KEYS
# ========================================
# INFURA_API_KEY is also read for EVM RPC (see NETWORK CONFIGURATION above).
ALCHEMY_API_KEY=
ETHERSCAN_API_KEY=
# ========================================
# FRONTEND (VITE_) CONFIGURATION
# ========================================
VITE_API_BASE_URL=http://localhost:3001
# Production API (DigitalOcean): https://oversync-k36vx.ondigitalocean.app — proxied via vercel.json /api/*
VITE_NETWORK_MODE=testnet
# Set to true to re-enable mainnet toggle (v2 mainnet post-audit)
VITE_MAINNET_ENABLED=false
# Frontend wallet RPC (Vercel). Use full URL or the same Infura key.
# Restrict the key by HTTP referrer in the Infura dashboard.
VITE_SEPOLIA_RPC_URL=
VITE_MAINNET_RPC_URL=
VITE_INFURA_API_KEY=
VITE_ONEINCH_API_KEY=
# v2 contract addresses for the frontend (mirror of ETH_HTLC_ESCROW_TESTNET).
VITE_ETH_HTLC_ESCROW_TESTNET=
VITE_ETH_HTLC_ESCROW_MAINNET=