@t2000/cli 2.18.1 → 2.19.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/dist/index.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  saveKey,
13
13
  truncateAddress,
14
14
  walletExists
15
- } from "./chunk-ZNZ4MOY2.js";
15
+ } from "./chunk-R7KXQRHQ.js";
16
16
  import {
17
17
  esm_default3 as esm_default,
18
18
  esm_default8 as esm_default2
@@ -3735,10 +3735,10 @@ function parseSendArgs(args) {
3735
3735
  if (filtered.length >= 2) {
3736
3736
  return { amount: parseFloat(filtered[0]), asset: "USDC", recipient: filtered[filtered.length - 1] };
3737
3737
  }
3738
- throw new Error("Usage: t2000 send <amount> [asset] [to] <address_or_contact>");
3738
+ throw new Error("Usage: t2000 send <amount> [asset] [to] <0x-address|suins-name|contact>");
3739
3739
  }
3740
3740
  function registerSend(program3) {
3741
- program3.command("send").argument("<amount>", "Amount to send").argument("[args...]", 'Asset, "to" keyword, and recipient address or contact name').description("Send USDC (or other asset) to an address or contact name").option("--key <path>", "Key file path").action(async (amount, args, opts) => {
3741
+ program3.command("send").argument("<amount>", "Amount to send").argument("[args...]", 'Asset, "to" keyword, and recipient (0x address, SuiNS name like alex.sui, or saved contact)').description("Send USDC (or other asset) to a 0x address, SuiNS name, or saved contact").option("--key <path>", "Key file path").action(async (amount, args, opts) => {
3742
3742
  try {
3743
3743
  const { amount: parsedAmount, asset, recipient } = parseSendArgs([amount, ...args]);
3744
3744
  const pin = await resolvePin();
@@ -3753,7 +3753,14 @@ function registerSend(program3) {
3753
3753
  return;
3754
3754
  }
3755
3755
  printBlank();
3756
- const displayTo = result.contactName ? `${result.contactName} (${truncateAddress(result.to)})` : truncateAddress(result.to);
3756
+ let displayTo;
3757
+ if (result.suinsName) {
3758
+ displayTo = `${result.suinsName} (${truncateAddress(result.to)})`;
3759
+ } else if (result.contactName) {
3760
+ displayTo = `${result.contactName} (${truncateAddress(result.to)})`;
3761
+ } else {
3762
+ displayTo = truncateAddress(result.to);
3763
+ }
3757
3764
  printSuccess(`Sent ${formatUsd(result.amount)} ${asset.toUpperCase()} \u2192 ${displayTo}`);
3758
3765
  printKeyValue("Gas", `${result.gasCost.toFixed(4)} ${result.gasCostUnit}`);
3759
3766
  printKeyValue("Balance", formatUsd(result.balance.available) + " USDC");
@@ -7867,7 +7874,7 @@ function registerLock(program3) {
7867
7874
  });
7868
7875
  program3.command("unlock").description("Unlock agent \u2014 resume operations").action(async () => {
7869
7876
  try {
7870
- const { T2000: T20003 } = await import("./dist-EFTMN6BY.js");
7877
+ const { T2000: T20003 } = await import("./dist-A7D5R6SM.js");
7871
7878
  const MAX_ATTEMPTS2 = 3;
7872
7879
  let pin;
7873
7880
  for (let attempt = 1; attempt <= MAX_ATTEMPTS2; attempt++) {
@@ -8041,7 +8048,7 @@ function registerMcp(program3) {
8041
8048
  mcp.command("start", { isDefault: true }).description("Start MCP server (stdio transport)").option("--key <path>", "Key file path").action(async (opts) => {
8042
8049
  let mod;
8043
8050
  try {
8044
- mod = await import("./dist-APKOY2VV.js");
8051
+ mod = await import("./dist-EUGE6UAA.js");
8045
8052
  } catch {
8046
8053
  console.error(
8047
8054
  "MCP server not installed. Run:\n npm install -g @t2000/mcp"