vibe-cli 0.2.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: vibe-cli
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: VIBE Airforce CLI — Web3 trading and data at your fingertips
5
5
  License: MIT
6
6
  Requires-Python: >=3.10
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "vibe-cli"
7
- version = "0.2.0"
7
+ version = "0.2.1"
8
8
  description = "VIBE Airforce CLI — Web3 trading and data at your fingertips"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -1,3 +1,3 @@
1
1
  """VIBE Airforce CLI — Web3 trading and data at your fingertips."""
2
2
 
3
- __version__ = "0.2.0"
3
+ __version__ = "0.2.1"
@@ -186,6 +186,23 @@ class VibeClient:
186
186
  def wallet_security_status(self) -> dict:
187
187
  return self.request_sync("GET", "/wallet/security-status")
188
188
 
189
+ # --- Wallet via Gateway (API key auth from /vibe-tools/wallet/*) ---
190
+
191
+ def wallet_config_gateway(self) -> dict:
192
+ return self.request_sync("GET", "/vibe-tools/wallet/config")
193
+
194
+ def wallet_address_gateway(self, network: str = "base-sepolia") -> dict:
195
+ return self.request_sync("GET", "/vibe-tools/wallet/address", params={"network": network})
196
+
197
+ def wallet_balance_gateway(self, network: str = "base-sepolia") -> dict:
198
+ return self.request_sync("GET", "/vibe-tools/wallet/balance", params={"network": network})
199
+
200
+ def wallet_transactions_gateway(self, network: str = "base-sepolia", limit: int = 50) -> dict:
201
+ return self.request_sync(
202
+ "GET", "/vibe-tools/wallet/transactions",
203
+ params={"network": network, "limit": limit},
204
+ )
205
+
189
206
  # --- OpenClaw Gateway (JWT auth from /api/openclaw/*) ---
190
207
 
191
208
  def gateway_status(self) -> dict:
@@ -352,52 +352,67 @@ def token_info(
352
352
 
353
353
 
354
354
  # ---------------------------------------------------------------------------
355
- # Wallet (requires JWT auth via 'vibe auth')
355
+ # Wallet (prefers API key gateway, falls back to JWT auth)
356
356
  # ---------------------------------------------------------------------------
357
357
 
358
+ def _has_api_key() -> bool:
359
+ """Check if an API key is configured (not JWT)."""
360
+ key = get_api_key()
361
+ return bool(key and key.startswith("pk_"))
362
+
363
+
358
364
  @app.command(name="wallet-config")
359
- def wallet_config(
365
+ def wallet_config_cmd(
360
366
  output: str = typer.Option("table", "-o", "--output", help="Output format: table, json, raw"),
361
367
  field: Optional[str] = typer.Option(None, "-f", "--field", help="Extract nested field"),
362
368
  ):
363
369
  """Get wallet configuration (network, auto-confirm)."""
364
370
  client = VibeClient()
365
- response = client.wallet_config()
371
+ if _has_api_key():
372
+ response = client.wallet_config_gateway()
373
+ else:
374
+ response = client.wallet_config()
366
375
  if "error" in response:
367
376
  print_error(response["error"])
368
377
  format_output(response.get("data", response), output, field)
369
378
 
370
379
 
371
380
  @app.command(name="wallet-address")
372
- def wallet_address(
381
+ def wallet_address_cmd(
373
382
  network: str = typer.Option("base", "--network", "-n", help="Network: base, ethereum, solana"),
374
383
  output: str = typer.Option("table", "-o", "--output", help="Output format: table, json, raw"),
375
384
  field: Optional[str] = typer.Option(None, "-f", "--field", help="Extract nested field"),
376
385
  ):
377
386
  """Get wallet address for a network."""
378
387
  client = VibeClient()
379
- response = client.wallet_address(network=network)
388
+ if _has_api_key():
389
+ response = client.wallet_address_gateway(network=network)
390
+ else:
391
+ response = client.wallet_address(network=network)
380
392
  if "error" in response:
381
393
  print_error(response["error"])
382
394
  format_output(response.get("data", response), output, field)
383
395
 
384
396
 
385
397
  @app.command(name="wallet-balance")
386
- def wallet_balance(
398
+ def wallet_balance_cmd(
387
399
  network: str = typer.Option("base", "--network", "-n", help="Network: base, ethereum, solana"),
388
400
  output: str = typer.Option("table", "-o", "--output", help="Output format: table, json, raw"),
389
401
  field: Optional[str] = typer.Option(None, "-f", "--field", help="Extract nested field"),
390
402
  ):
391
403
  """Get wallet token balances."""
392
404
  client = VibeClient()
393
- response = client.wallet_balance(network=network)
405
+ if _has_api_key():
406
+ response = client.wallet_balance_gateway(network=network)
407
+ else:
408
+ response = client.wallet_balance(network=network)
394
409
  if "error" in response:
395
410
  print_error(response["error"])
396
411
  format_output(response.get("data", response), output, field)
397
412
 
398
413
 
399
414
  @app.command(name="wallet-transactions")
400
- def wallet_transactions(
415
+ def wallet_transactions_cmd(
401
416
  network: str = typer.Option("base", "--network", "-n", help="Network: base, ethereum, solana"),
402
417
  limit: int = typer.Option(50, "--limit", "-n", help="Max transactions to return"),
403
418
  output: str = typer.Option("table", "-o", "--output", help="Output format: table, json, raw"),
@@ -405,7 +420,10 @@ def wallet_transactions(
405
420
  ):
406
421
  """Get wallet transaction history."""
407
422
  client = VibeClient()
408
- response = client.wallet_transactions(network=network, limit=limit)
423
+ if _has_api_key():
424
+ response = client.wallet_transactions_gateway(network=network, limit=limit)
425
+ else:
426
+ response = client.wallet_transactions(network=network, limit=limit)
409
427
  if "error" in response:
410
428
  print_error(response["error"])
411
429
  format_output(response.get("data", response), output, field)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: vibe-cli
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: VIBE Airforce CLI — Web3 trading and data at your fingertips
5
5
  License: MIT
6
6
  Requires-Python: >=3.10
File without changes
File without changes
File without changes
File without changes
File without changes