-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
103 lines (90 loc) · 4.05 KB
/
.env.example
File metadata and controls
103 lines (90 loc) · 4.05 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
# ================================================================
# SwarmMind - Environment Variables
# ================================================================
# Copy this file to .env and fill in your values:
# cp .env.example .env
#
# IMPORTANT: Never commit .env to git! It contains your private keys.
# ================================================================
# ============================================================
# 1. AI Provider Configuration
# ============================================================
# Choose your AI provider: anthropic | openai | deepseek | openrouter
AI_PROVIDER=openai
# Fill in the API key for your chosen provider:
ANTHROPIC_API_KEY=
OPENAI_API_KEY=your_api_key_here
DEEPSEEK_API_KEY=
OPENROUTER_API_KEY=
# Optional: override the default model for your provider
# Default models:
# anthropic = claude-haiku-4-5-20251001
# openai = gpt-4o-mini
# deepseek = deepseek-chat
# openrouter = deepseek/deepseek-chat
# AI_MODEL=gpt-4o
# Optional: custom API endpoint for third-party relay/proxy providers
# If you use a relay provider (中转站), set this to their base URL.
# Examples:
# AI_BASE_URL=https://api.your-relay.com (OpenAI-compatible relay)
# AI_BASE_URL=https://your-proxy.com/anthropic (Anthropic relay)
# Leave empty to use the official API endpoint for each provider.
# AI_BASE_URL=
# ============================================================
# 2. OKX OnchainOS API (required for market data + DEX trading)
# ============================================================
# Get your keys at: https://web3.okx.com/onchainos/dev-docs/home/developer-portal
# Steps: Register OKX account -> Developer Portal -> Create API key
OKX_API_KEY=your_okx_api_key
OKX_SECRET_KEY=your_okx_secret_key
OKX_PASSPHRASE=your_okx_passphrase
OKX_PROJECT_ID=your_okx_project_id
# ============================================================
# 3. Agent Wallets (private keys)
# ============================================================
# WARNING: NEVER commit real private keys to git!
# Generate new wallets:
# node -e "console.log('0x'+require('crypto').randomBytes(32).toString('hex'))"
#
# Wallet addresses are auto-derived from private keys (no need to set addresses).
# Fund each wallet with:
# - Small amount of OKB for gas (~0.2 OKB, testnet faucet: https://www.okx.com/xlayer/faucet)
# - Small amount of USDC for x402 micropayments (~$5)
DEPLOYER_PRIVATE_KEY=0x_your_deployer_private_key
ALPHA_SCOUT_PRIVATE_KEY=0x_your_alpha_scout_private_key
RISK_ORACLE_PRIVATE_KEY=0x_your_risk_oracle_private_key
TRADE_EXECUTOR_PRIVATE_KEY=0x_your_trade_executor_private_key
PORTFOLIO_MANAGER_PRIVATE_KEY=0x_your_portfolio_manager_private_key
# ============================================================
# 4. X Layer Network Configuration
# ============================================================
# Mainnet (Chain ID 196)
XLAYER_RPC_URL=https://rpc.xlayer.tech
XLAYER_CHAIN_ID=196
# Testnet (Chain ID 1952)
XLAYER_TESTNET_RPC_URL=https://testrpc.xlayer.tech
XLAYER_TESTNET_CHAIN_ID=1952
# USDC on X Layer mainnet
USDC_ADDRESS=0x74b7F16337b8972027F6196A17a631aC6dE26d22
# ============================================================
# 5. Service Ports
# ============================================================
PORTFOLIO_MANAGER_PORT=3000
ALPHA_SCOUT_PORT=3001
RISK_ORACLE_PORT=3002
TRADE_EXECUTOR_PORT=3003
DASHBOARD_PORT=3100
# Trade Executor internal API key (for agent-to-agent auth)
TRADE_EXECUTOR_API_KEY=swarmmind-internal
# ============================================================
# 6. x402 Payment Facilitator
# ============================================================
# Thirdweb facilitator supports 170+ EVM chains including X Layer
X402_FACILITATOR_URL=https://x402.thirdweb.com
# ============================================================
# 7. Deployed Contract Addresses (fill after deployment)
# ============================================================
# These are populated by running: npx hardhat run scripts/deploy.ts --network xlayer
AGENT_REGISTRY_ADDRESS=
WALLET_FACTORY_ADDRESS=
PAYMENT_SETTLEMENT_ADDRESS=