@clawcard/cli 3.1.6 → 3.2.1
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 +1 -1
- package/src/commands/agent.js +24 -7
package/package.json
CHANGED
package/src/commands/agent.js
CHANGED
|
@@ -69,19 +69,24 @@ export async function agentInfoCmd(options) {
|
|
|
69
69
|
console.log(` Email: ${me.email || "-"}`);
|
|
70
70
|
console.log(` Phone: ${me.phone || "-"}`);
|
|
71
71
|
if (wallet) {
|
|
72
|
-
console.log(` Wallet: ${orange(wallet.address)}
|
|
73
|
-
console.log(`
|
|
72
|
+
console.log(` Wallet: ${orange(wallet.address)}`);
|
|
73
|
+
console.log(` ${chalk.dim("https://basescan.org/address/" + wallet.address)}`);
|
|
74
|
+
console.log(` ${chalk.dim("https://explore.tempo.xyz/address/" + wallet.address)}`);
|
|
75
|
+
console.log(` USDC: ${chalk.green(wallet.balanceUsdc + " USDC")} ${chalk.dim("(x402)")}`);
|
|
74
76
|
if (wallet.balanceEth) {
|
|
75
77
|
console.log(` ETH: ${chalk.dim(wallet.balanceEth + " ETH (gas)")}`);
|
|
76
78
|
}
|
|
77
79
|
if (wallet.balancePathUsd && parseFloat(wallet.balancePathUsd) > 0) {
|
|
78
|
-
console.log(` pathUSD: ${chalk.green(wallet.balancePathUsd + " pathUSD (MPP)")}`);
|
|
80
|
+
console.log(` pathUSD: ${chalk.green(wallet.balancePathUsd + " pathUSD")} ${chalk.dim("(MPP)")}`);
|
|
79
81
|
}
|
|
80
82
|
} else {
|
|
81
83
|
console.log(` Wallet: ${chalk.dim("none — run: clawcard agent wallet")}`);
|
|
82
84
|
}
|
|
83
85
|
if (identity && (identity.walletAddress || identity.registered)) {
|
|
84
86
|
console.log(` Identity: ${chalk.green("verified")} ${chalk.dim("ERC-8004 on Base")}`);
|
|
87
|
+
if (identity.basescanUrl) {
|
|
88
|
+
console.log(` ${chalk.dim(identity.basescanUrl)}`);
|
|
89
|
+
}
|
|
85
90
|
} else {
|
|
86
91
|
console.log(` Identity: ${chalk.dim("not registered — run: clawcard setup")}`);
|
|
87
92
|
}
|
|
@@ -568,9 +573,16 @@ export async function agentWalletSendCmd(options) {
|
|
|
568
573
|
if (result.success) {
|
|
569
574
|
console.log();
|
|
570
575
|
if (result.protocol === "x402" || result.protocol === "mpp") {
|
|
571
|
-
|
|
576
|
+
const currency = result.protocol === "mpp" ? "pathUSD" : "USDC";
|
|
577
|
+
const amount = result.amountUsdc && result.amountUsdc !== "0.000000" ? result.amountUsdc : null;
|
|
578
|
+
console.log(` ${chalk.green("Paid!")} ${amount ? amount + " " + currency : ""} via ${result.protocol}`);
|
|
572
579
|
console.log(` URL: ${chalk.dim(result.url)}`);
|
|
573
|
-
|
|
580
|
+
if (result.txHash) {
|
|
581
|
+
console.log(` TX: ${chalk.dim(result.txHash)}`);
|
|
582
|
+
}
|
|
583
|
+
if (result.explorerUrl) {
|
|
584
|
+
console.log(` View: ${chalk.dim(result.explorerUrl)}`);
|
|
585
|
+
}
|
|
574
586
|
console.log();
|
|
575
587
|
if (result.data) {
|
|
576
588
|
console.log(` ${orange("Response:")}`);
|
|
@@ -613,9 +625,14 @@ export async function agentWalletTransactionsCmd(options) {
|
|
|
613
625
|
for (const t of txns) {
|
|
614
626
|
const dir = t.type === "receive" ? chalk.green("←") : t.type === "send" ? chalk.blue("→") : chalk.yellow("⟳");
|
|
615
627
|
const date = new Date(t.createdAt).toLocaleString();
|
|
616
|
-
|
|
628
|
+
const currency = t.protocol === "mpp" ? "pathUSD" : t.protocol === "bridge" ? "USDC→pathUSD" : "USDC";
|
|
629
|
+
const amount = t.amountUsdc === "0.000000" ? "" : t.amountUsdc + " ";
|
|
630
|
+
console.log(` ${dir} ${amount}${currency} ${chalk.dim(t.counterparty || "")} ${chalk.dim(t.protocol)} ${chalk.dim(date)}`);
|
|
617
631
|
if (t.txHash) {
|
|
618
|
-
|
|
632
|
+
const explorerUrl = (t.protocol === "mpp" || t.protocol === "bridge")
|
|
633
|
+
? `https://explore.tempo.xyz/receipt/${t.txHash}`
|
|
634
|
+
: `https://basescan.org/tx/${t.txHash}`;
|
|
635
|
+
console.log(` ${chalk.dim(explorerUrl)}`);
|
|
619
636
|
}
|
|
620
637
|
}
|
|
621
638
|
console.log();
|