-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.env.example
More file actions
66 lines (55 loc) · 4.15 KB
/
.env.example
File metadata and controls
66 lines (55 loc) · 4.15 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
# Ag402 Environment Configuration
# Copy to ~/.ag402/.env and fill in your values.
# Run `ag402 setup` for an interactive wizard that writes this file automatically.
# ─── Mode ─────────────────────────────────────────────────────────────
# test = virtual funds, no real blockchain transactions (default)
# production = real on-chain USDC payments
X402_MODE=test
# ─── Network ──────────────────────────────────────────────────────────
# mock = in-memory mock (unit tests, default)
# localnet = local Solana validator (solana-test-validator)
# devnet = Solana devnet (free test tokens)
# mainnet = Solana mainnet-beta (real money!)
X402_NETWORK=mock
# ─── Solana Wallet (⚠️ BUYER ONLY) ───────────────────────────────────
# Full base58-encoded secret key (e.g. from Phantom export or solana-keygen)
# NEVER commit this value to version control!
# ⚠️ This key is ONLY needed by BUYERS (agents that pay for API calls).
# Sellers/providers do NOT need a private key — use AG402_RECEIVE_ADDRESS instead.
SOLANA_PRIVATE_KEY=
# RPC endpoint (defaults per network, override for premium providers like Helius/QuickNode)
# SOLANA_RPC_URL=https://api.devnet.solana.com
# SOLANA_RPC_BACKUP_URL=
# ─── USDC Mint ────────────────────────────────────────────────────────
# Devnet: 4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU
# Mainnet: EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v
# USDC_MINT_ADDRESS=4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU
# ─── Budget Limits ────────────────────────────────────────────────────
# X402_SINGLE_TX_LIMIT=5.0 # Max per transaction (hard ceiling: $5)
# X402_DAILY_LIMIT=10.0 # Max daily spend (hard ceiling: $1000)
# X402_PER_MINUTE_LIMIT=2.0 # Max per minute in USD
# X402_PER_MINUTE_COUNT=5 # Max transactions per minute
# ─── Gateway (seller side) ───────────────────────────────────────────
# AG402_RECEIVE_ADDRESS= # Your wallet address to receive payments
# AG402_API_PRICE=0.02 # Price per API call in USDC
# AG402_TARGET_API= # Upstream API URL to protect
# ─── Security ─────────────────────────────────────────────────────────
# X402_RATE_LIMIT=60 # Requests per minute (gateway)
# X402_CIRCUIT_BREAKER_THRESHOLD=3
# X402_CIRCUIT_BREAKER_COOLDOWN=60
# ─── Encrypted Wallet (optional, for production) ─────────────────────
# AG402_UNLOCK_PASSWORD= # Password to decrypt wallet key file
# AG402_WALLET_KEY_PATH=~/.ag402/wallet.key
# ─── Priority Fees (mainnet congestion) ──────────────────────────────
# X402_PRIORITY_FEE=0 # Microlamports (0 = disabled)
# X402_COMPUTE_UNIT_LIMIT=0 # Compute units (0 = auto)
# ─── E2E Test Variables ──────────────────────────────────────────────
# For devnet integration tests (pytest -m devnet):
# DEVNET_BUYER_PRIVATE_KEY= # Buyer's base58 key (Method A)
# DEVNET_BUYER_KEY_PATH=~/.ag402/devnet-buyer.json # Method B (JSON file)
# DEVNET_SELLER_PUBKEY= # Seller's PUBLIC address only (no private key needed!)
# GATEWAY_URL=http://localhost:8001
#
# ⚠️ Sellers NEVER need a private key in Ag402.
# The seller only provides a public receiving address (AG402_RECEIVE_ADDRESS).
# Ag402 uses it to verify incoming payments — no signing required.