# ============================================================ # Nexus — Environment Configuration # Copy this file to .env and fill in your values. # # There are two .env consumers in this repo: # 1. Repo-root .env → used by scripts/ and mcp-server/ (Node, dotenv) # 2. frontend/.env → used by the SvelteKit app (Vite, PUBLIC_* only) # Vite ONLY exposes variables prefixed with PUBLIC_ to browser code. # ============================================================ # ------------------------------------------------------------ # A. Scripts + MCP server (repo-root .env) # ------------------------------------------------------------ # Tatum API key. REQUIRED for the MCP server (reads Sui via the Tatum gateway) # and for scripts (seed_marketplace.ts, walrus-spike.ts, test-contracts.ts). TATUM_API_KEY=your_tatum_api_key_here # Tatum Sui RPC gateway used by the MCP server. Defaults to testnet if unset. TATUM_RPC_URL=https://sui-testnet.gateway.tatum.io # Network selector. Options: testnet | mainnet | devnet SUI_NETWORK=testnet # Sui wallet private key in BECH32 format (starts with "suiprivkey1..."). # Required ONLY by seed_marketplace.ts to sign listing transactions. # Never needed by the frontend (the browser wallet signs there). SUI_PRIVATE_KEY=suiprivkey1_your_private_key_here # Move contract addresses (populated after `sui client publish`). # Consumed by scripts and the MCP server. NEXUS_PACKAGE_ID= NEXUS_MARKETPLACE_ID= # Walrus endpoints. Publisher = uploads, Aggregator = downloads. WALRUS_PUBLISHER_URL=https://publisher.walrus-testnet.walrus.space WALRUS_AGGREGATOR_URL=https://aggregator.walrus-testnet.walrus.space # ------------------------------------------------------------ # B. Frontend (frontend/.env — Vite, PUBLIC_* only) # ------------------------------------------------------------ # All of these have hardcoded fallbacks in frontend/src/lib/sui/config.ts, # so the app loads even if they are unset — but set them for clarity/prod. PUBLIC_SUI_NETWORK=testnet PUBLIC_TATUM_RPC_URL=https://sui-testnet.gateway.tatum.io # Optional: send this as x-api-key so the frontend's Tatum RPC calls are # authenticated. Without it the frontend still works via Tatum's anonymous tier. PUBLIC_TATUM_API_KEY=your_tatum_api_key_here PUBLIC_NEXUS_PACKAGE_ID= PUBLIC_NEXUS_MARKETPLACE_ID= PUBLIC_WALRUS_AGGREGATOR_URL=https://aggregator.walrus-testnet.walrus.space # Optional: Seal key servers for encrypted datasets (comma-separated object IDs). # Defaults to the Mysten testnet open-mode key servers if unset. PUBLIC_SEAL_KEY_SERVERS=0x73d05d62c18d9374e3ea529e8e0ed6161da1a141a94d3f76ae3fe4e99356db75,0xf5d14a81a982144ae441cd7d64b09027f116a468bd36e7eca494f750591623c8 # ------------------------------------------------------------ # C. Legacy / unused (kept for reference — safe to omit) # ------------------------------------------------------------ # SUI_RPC_URL=https://sui-testnet.gateway.tatum.io # not read by current code # WALRUS_UPLOAD_RELAY_URL=https://upload-relay.testnet.walrus.space # SDK-only path, unused