@clawcard/cli 3.0.14 → 3.0.16

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawcard/cli",
3
- "version": "3.0.14",
3
+ "version": "3.0.16",
4
4
  "description": "The ClawCard CLI — manage your agent keys, billing, and setup from the terminal",
5
5
  "bin": {
6
6
  "clawcard": "./bin/clawcard.mjs"
@@ -63,6 +63,9 @@ export async function agentInfoCmd(options) {
63
63
  if (wallet) {
64
64
  console.log(` Wallet: ${orange(wallet.address)} ${chalk.dim("(Base)")}`);
65
65
  console.log(` USDC: ${chalk.green(wallet.balanceUsdc + " USDC")}`);
66
+ if (wallet.balanceEth) {
67
+ console.log(` ETH: ${chalk.dim(wallet.balanceEth + " ETH (gas)")}`);
68
+ }
66
69
  } else {
67
70
  console.log(` Wallet: ${chalk.dim("none — run: clawcard agent wallet")}`);
68
71
  }
@@ -414,7 +417,8 @@ export async function agentWalletCmd(options) {
414
417
  console.log();
415
418
  console.log(` Address: ${orange(wallet.address)}`);
416
419
  console.log(` Network: Base`);
417
- console.log(` Balance: ${chalk.green(wallet.balanceUsdc + " USDC")}`);
420
+ console.log(` USDC: ${chalk.green(wallet.balanceUsdc + " USDC")}`);
421
+ console.log(` ETH: ${chalk.dim((wallet.balanceEth || "0.000000") + " ETH (gas)")}`);
418
422
  console.log(` Status: ${wallet.status}`);
419
423
  console.log();
420
424
  return;
@@ -449,7 +453,8 @@ export async function agentWalletCmd(options) {
449
453
  console.log();
450
454
  console.log(` Address: ${orange(wallet.address)}`);
451
455
  console.log(` Network: Base`);
452
- console.log(` Balance: ${wallet.balanceUsdc} USDC`);
456
+ console.log(` USDC: ${wallet.balanceUsdc} USDC`);
457
+ console.log(` ETH: ${wallet.balanceEth || "0.000000"} ETH (gas)`);
453
458
  console.log(` Status: ${wallet.status}`);
454
459
  console.log();
455
460
  console.log(chalk.dim(" Fund via FIAT balance or send USDC directly to the address above."));
@@ -473,7 +478,8 @@ export async function agentWalletBalanceCmd(options) {
473
478
 
474
479
  console.log();
475
480
  console.log(` USDC Balance: ${chalk.green(wallet.balanceUsdc + " USDC")}`);
476
- console.log(` FIAT Budget: ${chalk.green("$" + fiatBudget.toFixed(2))} ${chalk.dim("(available for auto-conversion)")}`);
481
+ console.log(` ETH (gas): ${chalk.dim((wallet.balanceEth || "0.000000") + " ETH")}`);
482
+ console.log(` FIAT Budget: ${chalk.green("$" + fiatBudget.toFixed(2))} ${chalk.dim("(for cards)")}`);
477
483
  console.log(` Effective: ${chalk.green("~$" + effective.toFixed(2))} ${chalk.dim("total spending power")}`);
478
484
  console.log();
479
485
  } catch (err) {
@@ -528,11 +534,24 @@ export async function agentWalletSendCmd(options) {
528
534
 
529
535
  if (result.success) {
530
536
  console.log();
531
- console.log(` ${chalk.green("Sent!")} ${result.amountUsdc} USDC ${result.to}`);
532
- console.log(` TX: ${chalk.dim(result.txHash)}`);
533
- console.log(` Protocol: ${result.protocol}`);
534
- if (result.fiatConverted) {
535
- console.log(` Converted: ${result.fiatConverted} from FIAT budget`);
537
+ if (result.protocol === "x402" || result.protocol === "mpp") {
538
+ console.log(` ${chalk.green("Paid!")} ${result.amountUsdc || "?"} USDC via ${result.protocol}`);
539
+ console.log(` URL: ${chalk.dim(result.url)}`);
540
+ console.log(` TX: ${chalk.dim(result.txHash)}`);
541
+ console.log();
542
+ if (result.data) {
543
+ console.log(` ${orange("Response:")}`);
544
+ try {
545
+ const parsed = JSON.parse(result.data);
546
+ console.log(JSON.stringify(parsed, null, 2));
547
+ } catch {
548
+ console.log(result.data.slice(0, 2000));
549
+ }
550
+ }
551
+ } else {
552
+ console.log(` ${chalk.green("Sent!")} ${result.amountUsdc} USDC → ${result.to}`);
553
+ console.log(` TX: ${chalk.dim(result.txHash)}`);
554
+ console.log(` Protocol: ${result.protocol}`);
536
555
  }
537
556
  console.log();
538
557
  } else {