-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.env.example
More file actions
149 lines (116 loc) · 8.38 KB
/
.env.example
File metadata and controls
149 lines (116 loc) · 8.38 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
# ═══════════════════════════════════════════════════════════════════════════════
# OYA PROTOCOL NODE CONFIGURATION
# ═══════════════════════════════════════════════════════════════════════════════
#
# Copy this file to .env and fill in your actual values.
# DO NOT commit the .env file to version control.
#
# ─────────────────────────────────────────────────────────────────────────────
# AUTHENTICATION
# ─────────────────────────────────────────────────────────────────────────────
# Bearer token for authenticating POST requests to the node
# Used by the web app when sending intentions to the proposer
# Should be at least 32 characters for security
# Generate with: openssl rand -hex 32
API_BEARER_TOKEN=your-secret-bearer-token-at-least-32-characters-long
# ─────────────────────────────────────────────────────────────────────────────
# DATABASE
# ─────────────────────────────────────────────────────────────────────────────
# PostgreSQL connection string
# Format: postgresql://[user]:[password]@[host]:[port]/[database]
DATABASE_URL=postgresql://user:password@localhost:5432/oya_db
# Test database connection string (optional)
# If not set, will auto-derive from DATABASE_URL by appending '_test' to database name
# TEST_DATABASE_URL=postgresql://user:password@localhost:5432/oya_db_test
# Enable SSL for database connections (default: true)
# Set to false for local development databases without SSL
# DATABASE_SSL=true
# ─────────────────────────────────────────────────────────────────────────────
# BLOCKCHAIN
# ─────────────────────────────────────────────────────────────────────────────
# Alchemy API key for blockchain RPC access
# Get your key at: https://www.alchemy.com/
# Must be exactly 32 characters
ALCHEMY_API_KEY=your-32-character-alchemy-api-key
# BundleTracker and VaultTracker smart contract addresses on Sepolia testnet
# Current Bundle Tracker Contract Address: 0xF96cd74e7EEcb93a773105269b7ef5187db30aef
# Current Vault Tracker Contract Address: 0x6f2B59f69296c9F045C699472174D878BB4B8aB8
BUNDLE_TRACKER_ADDRESS=0xF96cd74e7EEcb93a773105269b7ef5187db30aef
VAULT_TRACKER_ADDRESS=0x6f2B59f69296c9F045C699472174D878BB4B8aB8
# Public and Private key for the bundle proposer account
# Must have sufficient ETH for gas fees on Sepolia
# Format: 0x followed by 64 hex characters
# NEVER share or commit the private key
PROPOSER_ADDRESS=0xYourPublicKeyHere
PROPOSER_KEY=0xYourPrivateKeyHere
# Your vaultID as the Proposer
# Create a Vault by calling the VaultTracker 'createVault' function, it will return your VaultID
PROPOSER_VAULT_ID=1
# Feature flag for automatically seeding new vaults with OyaTest Tokens
# Default: false (disabled). Set to true to enable automatic vault seeding.
VAULT_SEEDING=false
# ─────────────────────────────────────────────────────────────────────────────
# WEBHOOK CONFIGURATION
# ─────────────────────────────────────────────────────────────────────────────
#
# Used when the node (bundle proposer) sends notifications to the web app
# whenever a bundle is proposed or finalized.
#
# Webhook endpoint URL on the web app server
# Example: https://your-webapp.example.com/api/protocol/webhook
WEBHOOK_URL=https://your-webapp.example.com/api/protocol/webhook
# Shared secret for authenticating node → web app webhook requests
# Keep this secret! Never expose it publicly.
# Generate with: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
WEBHOOK_SECRET=your-generated-webhook-secret
# Webhook request timeout in milliseconds (default: 6000)
# Optional; defines how long to wait for a response before retrying
# WEBHOOK_TIMEOUT_MS=6000
# Maximum number of retries for failed webhook deliveries (default: 6)
# Retries use exponential backoff with jitter
# WEBHOOK_MAX_RETRIES=6
# ─────────────────────────────────────────────────────────────────────────────
# OPTIONAL CONFIGURATION
# ─────────────────────────────────────────────────────────────────────────────
# Server port (default: 3000)
# PORT=3000
# Logging level (default: 3)
# 0=silly, 1=trace, 2=debug, 3=info, 4=warn, 5=error, 6=fatal
# LOG_LEVEL=3
# Enable diagnostic logging for debugging (default: false)
# Set to true for verbose output during development
# DIAGNOSTIC_LOGGER=false
# ─────────────────────────────────────────────────────────────────────────────
# RATE LIMITING
# ─────────────────────────────────────────────────────────────────────────────
# Enable or disable rate limiting middleware (default: true)
# Set to false to disable rate limiting entirely
# RATE_LIMIT_ENABLED=true
# Rate limit window duration in milliseconds (default: 60000 = 1 minute)
# RATE_LIMIT_WINDOW_MS=60000
# Maximum requests per window for permissive tier (default: 300)
# Most lenient - suitable for high-volume endpoints
# RATE_LIMIT_PERMISSIVE=300
# Maximum requests per window for standard tier (default: 100)
# Moderate restrictions - suitable for most endpoints
# RATE_LIMIT_STANDARD=100
# Maximum requests per window for strict tier (default: 50)
# Most restrictive - suitable for sensitive endpoints
# RATE_LIMIT_STRICT=50
# ─────────────────────────────────────────────────────────────────────────────
# FILECOIN PIN (OPTIONAL - ALPHA SOFTWARE)
# ─────────────────────────────────────────────────────────────────────────────
# Enable Filecoin pinning for bundles (default: false)
# NOTE: This is alpha software running on Calibration testnet
# Requires a funded Filecoin wallet with test FIL and test USDFC
# Get test FIL: https://faucet.calibration.fildev.network/
# Get test USDFC: Contact Filecoin team or use their faucet
# FILECOIN_PIN_ENABLED=false
# Filecoin wallet private key for Calibration testnet
# Required if FILECOIN_PIN_ENABLED=true
# Format: 0x followed by 64 hex characters
# NEVER share or commit this private key
# FILECOIN_PIN_PRIVATE_KEY=0xYourFilecoinPrivateKeyHere
# Filecoin Calibration testnet RPC endpoint (default: https://api.calibration.node.glif.io/rpc/v1)
# Only change if using a different RPC provider
# FILECOIN_PIN_RPC_URL=https://api.calibration.node.glif.io/rpc/v1