forked from Waffle-finance/waffle-finance-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenv.example
More file actions
150 lines (122 loc) · 5.43 KB
/
Copy pathenv.example
File metadata and controls
150 lines (122 loc) · 5.43 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
# ========================================
# WAFFLEFINANCE 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 ↔ Solana asset mappings live in @wafflefinance/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).
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:./wafflefinance.db (SQLite, local development)
# Production: postgresql://user:password@host:5432/wafflefinance (PostgreSQL)
# The schema is automatically applied on startup.
DATABASE_URL=file:./wafflefinance.db
COORDINATOR_PORT=3001
COORDINATOR_POLL_INTERVAL_MS=15000
COORDINATOR_RPC_TIMEOUT_MS=8000
# Comma-separated list of bearer tokens authorized for privileged operator endpoints.
# Gates POST /api/orders/:id/src-locked, POST /api/orders/:id/dst-locked, and GET /metrics.
# MUST be kept distinct from COORDINATOR_API_KEYS.
COORDINATOR_OPERATOR_KEYS=
# ========================================
# RELAYER ADMIN AUTHENTICATION
# ========================================
# Bearer token / API key that gates all /api/admin/* and /api/debug/* endpoints.
# Generate with: openssl rand -hex 32
# If blank, ALL admin and debug requests are rejected with 401.
# Supply as: Authorization: Bearer <token> or X-Api-Key: <token>
RELAYER_ADMIN_API_KEY=
# Private key used by POST /api/admin/authorize-relayer to sign the on-chain
# authorizeResolver() transaction. NEVER send this over the network — it is
# read exclusively from the server environment.
RELAYER_ADMIN_PRIVATE_KEY=
# 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=
# Resolver RPC retry configuration (for transient network errors)
RESOLVER_RPC_MAX_RETRIES=5
RESOLVER_RPC_BASE_DELAY_MS=1000
RESOLVER_RPC_MAX_DELAY_MS=30000
RESOLVER_RPC_TIMEOUT_MS=10000
# Persistence (SQLite for dev, Postgres for prod).
DATABASE_URL=file:./wafflefinance.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=