# ============================================================================= # MPC Service - Environment Variables # ============================================================================= # # mpc-service 作为 MPC 服务网关: # 1. 缓存 username + publicKey 的映射关系 # 2. 存储 delegate share # 3. 转发请求到 mpc-system (Go/TSS实现) # # ============================================================================= # Application NODE_ENV="development" APP_PORT=3001 API_PREFIX="api/v1" # Database (PostgreSQL) DATABASE_URL="postgresql://postgres:password@localhost:5432/rwa_mpc?schema=public" # Redis REDIS_HOST="localhost" REDIS_PORT=6379 REDIS_PASSWORD="" REDIS_DB=5 # JWT JWT_SECRET="your-jwt-secret-change-in-production" JWT_ACCESS_EXPIRES_IN="2h" JWT_REFRESH_EXPIRES_IN="30d" # Kafka KAFKA_BROKERS="localhost:9092" KAFKA_CLIENT_ID="mpc-service" KAFKA_GROUP_ID="mpc-service-group" # ============================================================================= # MPC System Configuration (Go/TSS Backend) # ============================================================================= # MPC System Account Service URL (creates keygen/signing sessions) MPC_SYSTEM_URL="http://192.168.1.111:4000" # API Key for authenticating with MPC system MPC_API_KEY="your-mpc-api-key-change-in-production" # Session Coordinator URL (coordinates TSS sessions) MPC_COORDINATOR_URL="http://192.168.1.111:8081" # Message Router WebSocket URL (TSS message routing) MPC_MESSAGE_ROUTER_WS_URL="ws://192.168.1.111:8082" # Coordinator timeout in milliseconds MPC_COORDINATOR_TIMEOUT=30000 # ============================================================================= # Share Encryption # ============================================================================= # IMPORTANT: Generate a secure 32-byte hex key for production # Example: openssl rand -hex 32 SHARE_MASTER_KEY="0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" # ============================================================================= # MPC Protocol Timeouts (in milliseconds) # ============================================================================= MPC_KEYGEN_TIMEOUT=300000 MPC_SIGNING_TIMEOUT=180000 MPC_REFRESH_TIMEOUT=300000 # ============================================================================= # TSS Library (optional, for direct TSS operations) # ============================================================================= TSS_LIB_PATH="/opt/tss-lib/tss" TSS_TEMP_DIR="/tmp/tss"