-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy path.env.example
More file actions
169 lines (130 loc) · 6.03 KB
/
Copy path.env.example
File metadata and controls
169 lines (130 loc) · 6.03 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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# =============================================================================
# x402 Starter Kit - Environment Configuration
# =============================================================================
# Copy this file to .env and fill in your values:
# cp .env.example .env
# =============================================================================
# -----------------------------------------------------------------------------
# API Server Configuration
# -----------------------------------------------------------------------------
# Port for the API server (default: 3000)
# PORT=3000
# Your wallet address to receive payments
# PAY_TO_ADDRESS=0xYourWalletAddress
# Network to use for payments
# Legacy names: base, base-sepolia, polygon, polygon-amoy, avalanche, avalanche-fuji,
# iotex, sei, sei-testnet, peaq, solana, solana-devnet
# CAIP-2 format: eip155:8453, eip155:84532, solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp, etc.
# NETWORK=solana
# Settlement mode: "facilitator" (default) or "direct" (EVM only)
# - facilitator: Uses a facilitator service to settle payments (supports EVM + Solana)
# - direct: Settles payments directly on-chain (EVM only, requires PRIVATE_KEY)
SETTLEMENT_MODE=facilitator
# -----------------------------------------------------------------------------
# Facilitator Configuration (when SETTLEMENT_MODE=facilitator)
# -----------------------------------------------------------------------------
# Custom facilitator URL (optional)
# Default: https://x402.org/facilitator (TESTNET ONLY)
# For mainnet, run your own facilitator: npm run start:facilitator
# FACILITATOR_URL=http://localhost:4022
# API key for authenticated facilitators (optional)
# FACILITATOR_API_KEY=
# -----------------------------------------------------------------------------
# Direct Settlement Configuration (when SETTLEMENT_MODE=direct, EVM only)
# -----------------------------------------------------------------------------
# Private key for direct on-chain settlement (required for direct mode)
# This wallet pays gas fees for settling payments
# PRIVATE_KEY=0xYourPrivateKey
# Custom RPC URL (optional, uses defaults per network if not set)
# RPC_URL=https://your-rpc-provider.com
# Custom chain ID (optional, auto-detected from network name)
# CHAIN_ID=84532
# -----------------------------------------------------------------------------
# Custom Asset Configuration (optional, uses USDC defaults)
# -----------------------------------------------------------------------------
# Custom asset address (defaults to USDC on the selected network)
# ASSET_ADDRESS=0xCustomTokenAddress
# Custom asset name for EIP-712 domain (defaults to network's USDC name)
# ASSET_NAME=USDC
# Custom block explorer URL
# EXPLORER_URL=https://sepolia.basescan.org
# -----------------------------------------------------------------------------
# AI Provider Configuration
# -----------------------------------------------------------------------------
# AI provider to use: "openai" or "eigenai"
AI_PROVIDER=openai
# OpenAI Configuration
# OPENAI_API_KEY=sk-your-openai-api-key
# Custom OpenAI-compatible base URL (optional)
# OPENAI_BASE_URL=https://api.openai.com/v1
# EigenAI Configuration (alternative to OpenAI)
# EIGENAI_API_KEY=your-eigenai-api-key
# EIGENAI_BASE_URL=https://eigenai.eigencloud.xyz/v1
# AI Model settings
# AI_MODEL=gpt-4o-mini
# AI_TEMPERATURE=0.7
# AI_MAX_TOKENS=500
# AI_SEED=42 # For EigenAI reproducibility
# -----------------------------------------------------------------------------
# Test Client Configuration (for running npm run test)
# -----------------------------------------------------------------------------
# Agent URL for test clients (default: http://localhost:3000)
# AGENT_URL=http://localhost:3000
# EVM test client private key (must have USDC + gas tokens)
# EVM_CLIENT_PRIVATE_KEY=0xYourTestClientPrivateKey
# Solana test client private key (base58 or JSON array format)
# Must have USDC + SOL for fees
# SOLANA_CLIENT_PRIVATE_KEY=YourBase58EncodedKeypair
# =============================================================================
# Local Facilitator Configuration (npm run start:facilitator)
# =============================================================================
# Run your own facilitator for mainnet support or custom networks
# Port for the facilitator server (default: 4022)
FACILITATOR_PORT=4022
# EVM private key for the facilitator (required)
# This wallet settles EVM payments and pays gas fees
EVM_PRIVATE_KEY=0xYourFacilitatorEvmPrivateKey
# Solana private key for the facilitator (required)
# Base58 encoded or JSON array format from solana-keygen
# This wallet settles Solana payments and pays transaction fees
SVM_PRIVATE_KEY=YourBase58EncodedSolanaKeypair
# Networks the facilitator supports
# EVM: base, base-sepolia, polygon, polygon-amoy, avalanche, avalanche-fuji, etc.
FACILITATOR_EVM_NETWORK=base
# Solana: solana (mainnet), solana-devnet
FACILITATOR_SVM_NETWORK=solana
# Custom RPC URL for EVM facilitator (optional)
# FACILITATOR_EVM_RPC_URL=https://your-rpc-provider.com
# =============================================================================
# Example Configurations
# =============================================================================
# --- Testnet with Default Facilitator ---
# PORT=3000
# PAY_TO_ADDRESS=0xYourAddress
# NETWORK=base-sepolia
# OPENAI_API_KEY=sk-xxx
# --- Mainnet with Local Facilitator (EVM) ---
# PORT=3000
# PAY_TO_ADDRESS=0xYourAddress
# NETWORK=base
# FACILITATOR_URL=http://localhost:4022
# OPENAI_API_KEY=sk-xxx
# # Facilitator config:
# EVM_PRIVATE_KEY=0xYourFacilitatorKey
# FACILITATOR_EVM_NETWORK=base
# --- Mainnet with Local Facilitator (Solana) ---
# PORT=3000
# PAY_TO_ADDRESS=YourSolanaAddress
# NETWORK=solana
# FACILITATOR_URL=http://localhost:4022
# OPENAI_API_KEY=sk-xxx
# # Facilitator config:
# SVM_PRIVATE_KEY=YourBase58Keypair
# FACILITATOR_SVM_NETWORK=solana
# --- Direct Settlement (EVM Mainnet, no facilitator) ---
# PORT=3000
# PAY_TO_ADDRESS=0xYourAddress
# NETWORK=base
# SETTLEMENT_MODE=direct
# PRIVATE_KEY=0xYourMerchantKey
# OPENAI_API_KEY=sk-xxx