vibe-cli 0.2.0__tar.gz → 0.2.2__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.2
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.2"
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.2"
@@ -124,6 +124,14 @@ class VibeClient:
124
124
  body = {"action": action, "token": token, "amount": amount, "protocol": protocol, **kwargs}
125
125
  return self.request_sync("POST", "/vibe-tools/defi/deposit", body)
126
126
 
127
+ def evm_defi_quote(self, network: str, token_in: str, token_out: str, amount_in: str) -> dict:
128
+ body = {"network": network, "token_in": token_in, "token_out": token_out, "amount_in": amount_in}
129
+ return self.request_sync("POST", "/vibe-tools/evm/defi/quote", body)
130
+
131
+ def evm_defi_deposit(self, network: str, token_in: str, token_out: str, amount_in: str, slippage: str = "100") -> dict:
132
+ body = {"network": network, "token_in": token_in, "token_out": token_out, "amount_in": amount_in, "slippage": slippage}
133
+ return self.request_sync("POST", "/vibe-tools/evm/defi/deposit", body)
134
+
127
135
  def bags_launch_token(self, name: str, symbol: str, description: str, image_url: str, **kwargs) -> dict:
128
136
  body = {"name": name, "symbol": symbol, "description": description, "image_url": image_url, **kwargs}
129
137
  return self.request_sync("POST", "/vibe-tools/bags/launch-token", body)
@@ -186,6 +194,23 @@ class VibeClient:
186
194
  def wallet_security_status(self) -> dict:
187
195
  return self.request_sync("GET", "/wallet/security-status")
188
196
 
197
+ # --- Wallet via Gateway (API key auth from /vibe-tools/wallet/*) ---
198
+
199
+ def wallet_config_gateway(self) -> dict:
200
+ return self.request_sync("GET", "/vibe-tools/wallet/config")
201
+
202
+ def wallet_address_gateway(self, network: str = "base-sepolia") -> dict:
203
+ return self.request_sync("GET", "/vibe-tools/wallet/address", params={"network": network})
204
+
205
+ def wallet_balance_gateway(self, network: str = "base-sepolia") -> dict:
206
+ return self.request_sync("GET", "/vibe-tools/wallet/balance", params={"network": network})
207
+
208
+ def wallet_transactions_gateway(self, network: str = "base-sepolia", limit: int = 50) -> dict:
209
+ return self.request_sync(
210
+ "GET", "/vibe-tools/wallet/transactions",
211
+ params={"network": network, "limit": limit},
212
+ )
213
+
189
214
  # --- OpenClaw Gateway (JWT auth from /api/openclaw/*) ---
190
215
 
191
216
  def gateway_status(self) -> dict:
@@ -269,6 +269,43 @@ def defi_deposit(
269
269
  execute_operation("POST /vibe-tools/defi/deposit", params, output, field)
270
270
 
271
271
 
272
+ # --- EVM DeFi (Enso Finance) ---
273
+
274
+ @app.command(name="evm-defi-quote")
275
+ def evm_defi_quote(
276
+ network: str = typer.Option("base", "--network", "-n", help="EVM network: base, ethereum, arbitrum, optimism, polygon"),
277
+ token_in: str = typer.Option(..., "--token-in", help="Input token address (or 'eth' for native)"),
278
+ token_out: str = typer.Option(..., "--token-out", help="Output vault/token address"),
279
+ amount_in: str = typer.Option(..., "--amount", help="Amount in human-readable units (e.g. '0.1')"),
280
+ output: str = typer.Option("table", "-o", "--output", help="Output format: table, json, raw"),
281
+ field: Optional[str] = typer.Option(None, "-f", "--field", help="Extract nested field"),
282
+ ):
283
+ """Get EVM DeFi quote via Enso (Base, Ethereum, Arbitrum, etc.)."""
284
+ client = VibeClient()
285
+ response = client.evm_defi_quote(network=network, token_in=token_in, token_out=token_out, amount_in=amount_in)
286
+ if "error" in response:
287
+ print_error(response["error"])
288
+ format_output(response.get("data", response), output, field)
289
+
290
+
291
+ @app.command(name="evm-defi-deposit")
292
+ def evm_defi_deposit(
293
+ network: str = typer.Option("base", "--network", "-n", help="EVM network: base, ethereum, arbitrum, optimism, polygon"),
294
+ token_in: str = typer.Option(..., "--token-in", help="Input token address (or 'eth' for native)"),
295
+ token_out: str = typer.Option(..., "--token-out", help="Vault/pool address to deposit into"),
296
+ amount_in: str = typer.Option(..., "--amount", help="Amount in human-readable units (e.g. '0.1')"),
297
+ slippage: str = typer.Option("100", "--slippage", help="Slippage tolerance in basis points"),
298
+ output: str = typer.Option("table", "-o", "--output", help="Output format: table, json, raw"),
299
+ field: Optional[str] = typer.Option(None, "-f", "--field", help="Extract nested field"),
300
+ ):
301
+ """Execute EVM DeFi deposit via Enso (returns unsigned transaction)."""
302
+ client = VibeClient()
303
+ response = client.evm_defi_deposit(network=network, token_in=token_in, token_out=token_out, amount_in=amount_in, slippage=slippage)
304
+ if "error" in response:
305
+ print_error(response["error"])
306
+ format_output(response.get("data", response), output, field)
307
+
308
+
272
309
  # --- bags.fm ---
273
310
 
274
311
  @app.command(name="bags-launch-token")
@@ -352,52 +389,67 @@ def token_info(
352
389
 
353
390
 
354
391
  # ---------------------------------------------------------------------------
355
- # Wallet (requires JWT auth via 'vibe auth')
392
+ # Wallet (prefers API key gateway, falls back to JWT auth)
356
393
  # ---------------------------------------------------------------------------
357
394
 
395
+ def _has_api_key() -> bool:
396
+ """Check if an API key is configured (not JWT)."""
397
+ key = get_api_key()
398
+ return bool(key and key.startswith("pk_"))
399
+
400
+
358
401
  @app.command(name="wallet-config")
359
- def wallet_config(
402
+ def wallet_config_cmd(
360
403
  output: str = typer.Option("table", "-o", "--output", help="Output format: table, json, raw"),
361
404
  field: Optional[str] = typer.Option(None, "-f", "--field", help="Extract nested field"),
362
405
  ):
363
406
  """Get wallet configuration (network, auto-confirm)."""
364
407
  client = VibeClient()
365
- response = client.wallet_config()
408
+ if _has_api_key():
409
+ response = client.wallet_config_gateway()
410
+ else:
411
+ response = client.wallet_config()
366
412
  if "error" in response:
367
413
  print_error(response["error"])
368
414
  format_output(response.get("data", response), output, field)
369
415
 
370
416
 
371
417
  @app.command(name="wallet-address")
372
- def wallet_address(
418
+ def wallet_address_cmd(
373
419
  network: str = typer.Option("base", "--network", "-n", help="Network: base, ethereum, solana"),
374
420
  output: str = typer.Option("table", "-o", "--output", help="Output format: table, json, raw"),
375
421
  field: Optional[str] = typer.Option(None, "-f", "--field", help="Extract nested field"),
376
422
  ):
377
423
  """Get wallet address for a network."""
378
424
  client = VibeClient()
379
- response = client.wallet_address(network=network)
425
+ if _has_api_key():
426
+ response = client.wallet_address_gateway(network=network)
427
+ else:
428
+ response = client.wallet_address(network=network)
380
429
  if "error" in response:
381
430
  print_error(response["error"])
382
431
  format_output(response.get("data", response), output, field)
383
432
 
384
433
 
385
434
  @app.command(name="wallet-balance")
386
- def wallet_balance(
435
+ def wallet_balance_cmd(
387
436
  network: str = typer.Option("base", "--network", "-n", help="Network: base, ethereum, solana"),
388
437
  output: str = typer.Option("table", "-o", "--output", help="Output format: table, json, raw"),
389
438
  field: Optional[str] = typer.Option(None, "-f", "--field", help="Extract nested field"),
390
439
  ):
391
440
  """Get wallet token balances."""
392
441
  client = VibeClient()
393
- response = client.wallet_balance(network=network)
442
+ if _has_api_key():
443
+ response = client.wallet_balance_gateway(network=network)
444
+ else:
445
+ response = client.wallet_balance(network=network)
394
446
  if "error" in response:
395
447
  print_error(response["error"])
396
448
  format_output(response.get("data", response), output, field)
397
449
 
398
450
 
399
451
  @app.command(name="wallet-transactions")
400
- def wallet_transactions(
452
+ def wallet_transactions_cmd(
401
453
  network: str = typer.Option("base", "--network", "-n", help="Network: base, ethereum, solana"),
402
454
  limit: int = typer.Option(50, "--limit", "-n", help="Max transactions to return"),
403
455
  output: str = typer.Option("table", "-o", "--output", help="Output format: table, json, raw"),
@@ -405,7 +457,10 @@ def wallet_transactions(
405
457
  ):
406
458
  """Get wallet transaction history."""
407
459
  client = VibeClient()
408
- response = client.wallet_transactions(network=network, limit=limit)
460
+ if _has_api_key():
461
+ response = client.wallet_transactions_gateway(network=network, limit=limit)
462
+ else:
463
+ response = client.wallet_transactions(network=network, limit=limit)
409
464
  if "error" in response:
410
465
  print_error(response["error"])
411
466
  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.2
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