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.
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/PKG-INFO +1 -1
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/pyproject.toml +1 -1
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/vibe_cli/__init__.py +1 -1
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/vibe_cli/client.py +17 -0
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/vibe_cli/main.py +27 -9
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/vibe_cli.egg-info/PKG-INFO +1 -1
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/README.md +0 -0
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/setup.cfg +0 -0
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/vibe_cli/auth.py +0 -0
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/vibe_cli/config.py +0 -0
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/vibe_cli/operations.py +0 -0
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/vibe_cli/output.py +0 -0
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/vibe_cli.egg-info/SOURCES.txt +0 -0
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/vibe_cli.egg-info/dependency_links.txt +0 -0
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/vibe_cli.egg-info/entry_points.txt +0 -0
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/vibe_cli.egg-info/requires.txt +0 -0
- {vibe_cli-0.2.0 → vibe_cli-0.2.1}/vibe_cli.egg-info/top_level.txt +0 -0
|
@@ -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 (
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|