# ============================================================================= # Nodal AI — Environment Configuration # ============================================================================= # Copy this file to .env and fill in your values: # cp .env.example .env # # Never commit .env to version control — it contains secrets. # See backend/config.ts for full schema validation and defaults. # ============================================================================= # ----------------------------------------------------------------------------- # Network # ----------------------------------------------------------------------------- # Stellar network to target. # Valid values: testnet | mainnet | futurenet # Default: testnet STELLAR_NETWORK=testnet # ----------------------------------------------------------------------------- # RPC Endpoints # ----------------------------------------------------------------------------- # Horizon REST API URL for the selected network. # Testnet: https://horizon-testnet.stellar.org # Mainnet: https://horizon.stellar.org # Futurenet: https://horizon-futurenet.stellar.org HORIZON_URL=https://horizon-testnet.stellar.org # Soroban RPC URL for the selected network. # Testnet: https://soroban-testnet.stellar.org # Mainnet: https://mainnet.stellar.validationcloud.io/v1/ # Futurenet: https://rpc-futurenet.stellar.org SOROBAN_RPC_URL=https://soroban-testnet.stellar.org # ----------------------------------------------------------------------------- # Agent Identity # ----------------------------------------------------------------------------- # Stellar secret key used to sign transactions (must start with S, 56 characters). # Generate one at: https://laboratory.stellar.org/#account-creator AGENT_SECRET_KEY=SXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX # Stellar public key (G-address, 56 characters). # Optional — derived automatically from AGENT_SECRET_KEY when omitted. # Provide it as a cross-check; the agent will exit if it does not match the derived key. # AGENT_PUBLIC_KEY=GXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX # ----------------------------------------------------------------------------- # x402 / PayFi Asset # ----------------------------------------------------------------------------- # Asset code for the x402 payment standard. # Use "XLM" for native lumens, or a custom 1–12 character code (e.g. "USDC"). # Default: USDC X402_ASSET_CODE=USDC # Issuer account for the x402 asset (56-character G-address). # Required for non-native assets. Ignored when X402_ASSET_CODE is "XLM". X402_ASSET_ISSUER=GBBD47IF6LWK7P7MDEVSCWR7DPUWV3NY3DTQEVFL4NAT4AQH3ZLLFLA5 # ----------------------------------------------------------------------------- # Spending Cap # ----------------------------------------------------------------------------- # Maximum amount (in X402_ASSET_CODE units) the agent may pay in a single operation. # Must be a positive decimal with up to 7 decimal places (e.g. "100" or "50.0000000"). # On mainnet the hard ceiling is 10,000 regardless of this value. # Default: 100 AGENT_SPENDING_LIMIT=100 # ----------------------------------------------------------------------------- # Logging # ----------------------------------------------------------------------------- # Log verbosity level. # Valid values: debug | info | warn | error # Default: info LOG_LEVEL=info # ----------------------------------------------------------------------------- # Retry Behaviour # ----------------------------------------------------------------------------- # Maximum number of retry attempts for transient network/RPC failures. # Must be an integer between 1 and 10. # Default: 3 MAX_RETRIES=3 # Base delay in milliseconds between retry attempts (exponential back-off). # Must be an integer of at least 100. # Actual delay = RETRY_DELAY_MS * 2^(attempt-1), capped at 30,000 ms, plus ±20% jitter. # Default: 1500 RETRY_DELAY_MS=1500 # ----------------------------------------------------------------------------- # Concurrency & Rate Limiting # ----------------------------------------------------------------------------- # Maximum number of tasks allowed to execute concurrently in agent.run(). # Tasks submitted while this many are already in flight are rejected immediately # (not queued). Must be an integer of at least 1. # Default: 10 MAX_CONCURRENT_TASKS=10 # Maximum number of x402 payments allowed per 60-second sliding window. # Must be an integer of at least 1. # Default: 10 MAX_X402_PAYMENTS_PER_MINUTE=10 # Maximum Soroban transaction fee in stroops (1 stroop = 0.0000001 XLM). # Must be an integer of at least 100. # Default: 1000000 MAX_SOROBAN_FEE_STROOPS=1000000