| 282 | } |
| 283 | |
| 284 | async function cmdWallet(port: number): Promise<void> { |
| 285 | try { |
| 286 | const data = (await queryProxy("/health?full=true", port)) as Record<string, unknown>; |
| 287 | console.log(`\nClawRouter Wallet\n`); |
| 288 | console.log(` Payment Chain: ${data.paymentChain}`); |
| 289 | console.log(); |
| 290 | console.log(` Base (EVM):`); |
| 291 | console.log(` Address: ${data.wallet}`); |
| 292 | console.log(` Fund: https://basescan.org/address/${data.wallet}`); |
| 293 | if (data.solana) { |
| 294 | console.log(); |
| 295 | console.log(` Solana:`); |
| 296 | console.log(` Address: ${data.solana}`); |
| 297 | console.log(` Fund: https://solscan.io/account/${data.solana}`); |
| 298 | } |
| 299 | console.log(); |
| 300 | console.log(` Balance: ${data.balance ?? "unknown"} (USDC)`); |
| 301 | if (data.isEmpty) console.log(` ⚠ Empty — fund wallet or use free models`); |
| 302 | console.log(); |
| 303 | } catch { |
| 304 | console.error(`✗ Cannot connect to ClawRouter on port ${port}`); |
| 305 | process.exit(1); |
| 306 | } |
| 307 | } |
| 308 | |
| 309 | async function cmdModels(port: number): Promise<void> { |
| 310 | try { |