mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-14 00:07:01 +08:00
feat: add Claw402 (claw402.ai) x402 USDC payment provider
Add Claw402Client for claw402.ai's x402 micropayment gateway (Base USDC). Supports 15+ AI models (GPT-5.4, Claude Opus, DeepSeek, Qwen, Grok, etc.) with per-model endpoint routing. - mcp/claw402.go: new client with model→endpoint mapping, x402 v2 payment flow - mcp/blockrun_base.go: extract shared signX402Payment() for reuse - Register "claw402" provider in all 6 consumer switch statements: api/server.go, api/strategy.go, trader/auto_trader.go, telegram/bot.go, debate/engine.go, backtest/ai_client.go
This commit is contained in:
@@ -216,6 +216,11 @@ func NewAutoTrader(config AutoTraderConfig, st *store.Store, userID string) (*Au
|
||||
mcpClient.SetAPIKey(config.CustomAPIKey, "", config.CustomModelName)
|
||||
logger.Infof("🤖 [%s] Using BlockRun (Solana Wallet) AI", config.Name)
|
||||
|
||||
case "claw402":
|
||||
mcpClient = mcp.NewClaw402Client()
|
||||
mcpClient.SetAPIKey(config.CustomAPIKey, "", config.CustomModelName)
|
||||
logger.Infof("🤖 [%s] Using Claw402 (Base USDC) AI", config.Name)
|
||||
|
||||
case "qwen":
|
||||
mcpClient = mcp.NewQwenClient()
|
||||
apiKey := config.QwenKey
|
||||
|
||||
Reference in New Issue
Block a user