feat: real-time wallet validation — key check, address display, USDC balance, claw402 health

- POST /api/wallet/validate: validate key, derive address, query Base USDC, check claw402
- Claw402ConfigForm: debounced validation, balance display, connection test button
- i18n: 11 new keys (en/zh/id)
- Private key never logged or stored
This commit is contained in:
shinchan-zhai
2026-03-21 01:08:29 +08:00
parent 53ac52562f
commit 79a513470b
4 changed files with 386 additions and 3 deletions
+3
View File
@@ -87,6 +87,9 @@ func (s *Server) setupRoutes() {
// System config (no authentication required, for frontend to determine admin mode/registration status)
s.route(api, "GET", "/config", "Get system configuration", s.handleGetSystemConfig)
// Wallet validation (no authentication required — used by frontend config form)
api.POST("/wallet/validate", s.handleWalletValidate)
// Crypto related endpoints (no authentication required, not exposed to bot)
api.GET("/crypto/config", s.cryptoHandler.HandleGetCryptoConfig)
api.GET("/crypto/public-key", s.cryptoHandler.HandleGetPublicKey)