@alchemy/cli 0.6.1 → 0.6.2

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.
@@ -53,7 +53,7 @@ function semverLT(a, b) {
53
53
  return false;
54
54
  }
55
55
  function currentVersion() {
56
- return true ? "0.6.1" : "0.0.0";
56
+ return true ? "0.6.2" : "0.0.0";
57
57
  }
58
58
  function toUpdateStatus(latestVersion, checkedAt) {
59
59
  const current = currentVersion();
package/dist/index.js CHANGED
@@ -29,7 +29,7 @@ import {
29
29
  getAvailableUpdate,
30
30
  getUpdateStatus,
31
31
  printUpdateNotice
32
- } from "./chunk-7GD5HACA.js";
32
+ } from "./chunk-TK3HZ5UT.js";
33
33
  import {
34
34
  bold,
35
35
  brand,
@@ -729,7 +729,7 @@ function resolveBlockParam(block) {
729
729
  return blockParam;
730
730
  }
731
731
  function registerBalance(program2) {
732
- program2.command("balance").argument("[address]", "Wallet address (0x...) or ENS name, or pipe via stdin").alias("bal").description("Returns the native token balance (ETH, MATIC, etc.) for any wallet address or ENS name. Use when the user wants to know how much native currency a wallet holds. Does NOT return ERC-20 tokens \u2014 use `alchemy tokens balances` for that.").addHelpText(
732
+ program2.command("balance").argument("[address]", "Wallet address (0x...) or ENS name, or pipe via stdin").alias("bal").description("Returns the native token balance (ETH, MATIC, etc.) for a single address on the current network. Use for 'how much ETH does this wallet have' queries only. Does NOT return ERC-20 tokens or multi-network portfolio data \u2014 use `alchemy tokens balances` for ERC-20s, or `alchemy portfolio tokens` for a full cross-network portfolio overview.").addHelpText(
733
733
  "after",
734
734
  `
735
735
  Examples:
@@ -2057,7 +2057,7 @@ function registerWallet(program2) {
2057
2057
  exitWithError(err);
2058
2058
  }
2059
2059
  });
2060
- cmd.command("address").description("Display the address of the locally configured x402 wallet. This shows the CLI's own signing wallet only \u2014 it does NOT look up arbitrary addresses. To check a wallet's ETH balance, use `alchemy balance`.").action(() => {
2060
+ cmd.command("address").description("Display the address of the locally configured x402 wallet. This shows the CLI's own signing wallet only \u2014 it does NOT look up arbitrary addresses or retrieve wallet history. To check a wallet's ETH balance, use `alchemy balance`. For transfer history, use `alchemy transfers`. For token portfolio, use `alchemy portfolio tokens`. For NFTs owned by a wallet, use `alchemy nfts`.").action(() => {
2061
2061
  try {
2062
2062
  const key = resolveWalletKey(program2);
2063
2063
  if (!key) throw errWalletKeyRequired();
@@ -2202,7 +2202,7 @@ function formatTransferRows(transfers) {
2202
2202
  });
2203
2203
  }
2204
2204
  function registerTransfers(program2) {
2205
- program2.command("transfers").argument("[address]", "Wallet address or ENS name \u2014 queries outgoing transfers (use --to-address for incoming)").description("Lists all asset transfer transactions for a wallet address \u2014 ERC-20, ERC-721, ERC-1155, and native (ETH) transfers. Use for transaction history or transfer activity. Does NOT return current balances \u2014 use `alchemy balance` or `alchemy tokens balances` for that.").option("--from-address <address>", "Filter sender address").option("--to-address <address>", "Filter recipient address").option("--from-block <block>", "Start block (default: 0x0)").option("--to-block <block>", "End block (default: latest)").option("--category <list>", "Comma-separated categories (erc20,erc721,erc1155,external,internal,specialnft)").option("--max-count <hexOrDecimal>", "Max records to return per page").option("--page-key <key>", "Pagination key").addHelpText(
2205
+ program2.command("transfers").argument("[address]", "Wallet address or ENS name \u2014 queries outgoing transfers (use --to-address for incoming)").description("Retrieves transfer history \u2014 all inbound and outbound asset movements (ERC-20, ERC-721, ERC-1155, and native ETH) for a wallet address. USE WHEN: user asks for transaction history, past transfers, or asset movements. Does NOT return current balances \u2014 use `alchemy balance` or `alchemy tokens balances` for that.").option("--from-address <address>", "Filter sender address").option("--to-address <address>", "Filter recipient address").option("--from-block <block>", "Start block (default: 0x0)").option("--to-block <block>", "End block (default: latest)").option("--category <list>", "Comma-separated categories (erc20,erc721,erc1155,external,internal,specialnft)").option("--max-count <hexOrDecimal>", "Max records to return per page").option("--page-key <key>", "Pagination key").addHelpText(
2206
2206
  "after",
2207
2207
  `
2208
2208
  Examples:
@@ -2424,7 +2424,7 @@ async function runDataCall(program2, title, path, body) {
2424
2424
  }
2425
2425
  function registerPortfolio(program2) {
2426
2426
  const cmd = program2.command("portfolio").description("Portfolio API wrappers");
2427
- cmd.command("tokens").description("Returns all ERC-20 token holdings and their USD values across one or more networks for a wallet address. Use for a portfolio view of fungible token assets. For a single-network NFT list, use `alchemy nfts`; for native token balance, use `alchemy balance`.").requiredOption("--body <json>", "JSON body for /assets/tokens/by-address").action(async (opts) => {
2427
+ cmd.command("tokens").description("Returns a full cross-network portfolio of all ERC-20 token holdings and USD values for a wallet address. USE WHEN: user asks for portfolio overview, all tokens held, or assets across multiple networks. For NFTs only, use `alchemy nfts`. For native ETH balance only, use `alchemy balance`.").requiredOption("--body <json>", "JSON body for /assets/tokens/by-address").action(async (opts) => {
2428
2428
  try {
2429
2429
  const result = await runDataCall(
2430
2430
  program2,
@@ -2544,7 +2544,7 @@ function resolveWebhookApiKey(opts) {
2544
2544
  function registerWebhooks(program2) {
2545
2545
  const cmd = program2.command("webhooks").description("Notify API wrappers");
2546
2546
  cmd.option("--webhook-api-key <key>", "Webhook API key").option("--notify-token <token>", "Deprecated alias for webhook API key");
2547
- cmd.command("list").description("Lists all existing Alchemy webhooks configured for this team. Use to view or audit registered webhooks. Does NOT create webhooks \u2014 use `alchemy webhooks create` for that.").action(async () => {
2547
+ cmd.command("list").description("Lists all existing registered Alchemy webhooks (read-only). USE WHEN: user wants to view, see, audit, or check current webhooks. DOES NOT create or modify webhooks \u2014 use `alchemy webhooks create` to register a new one.").action(async () => {
2548
2548
  try {
2549
2549
  const token = resolveWebhookApiKey(cmd.opts());
2550
2550
  const result = await withSpinner(
@@ -2558,7 +2558,7 @@ function registerWebhooks(program2) {
2558
2558
  exitWithError(err);
2559
2559
  }
2560
2560
  });
2561
- cmd.command("create").description("Creates a new Alchemy webhook subscription for a given event type (address activity, mined transactions, dropped transactions, etc.). Use this to register a new webhook endpoint. To view existing webhooks, use `alchemy webhooks list`.").requiredOption("--body <json>", "Create webhook JSON payload").option("--dry-run", "Preview without executing").action(async (opts) => {
2561
+ cmd.command("create").description("Creates and registers a NEW Alchemy webhook endpoint (write operation). USE WHEN: user wants to set up, add, register, or create a webhook for address activity, mined/dropped transactions, etc. DOES NOT list existing webhooks \u2014 use `alchemy webhooks list` for that.").requiredOption("--body <json>", "Create webhook JSON payload").option("--dry-run", "Preview without executing").action(async (opts) => {
2562
2562
  try {
2563
2563
  const payload = parseRequiredJSON(opts.body, "--body");
2564
2564
  if (opts.dryRun) {
@@ -3397,7 +3397,7 @@ function resetUpdateNoticeState() {
3397
3397
  }
3398
3398
  program.name("alchemy").description(
3399
3399
  "The Alchemy CLI lets you query blockchain data, call JSON-RPC methods, and manage your Alchemy configuration."
3400
- ).version("0.6.1", "-v, --version", "display CLI version").option("--api-key <key>", "Alchemy API key (env: ALCHEMY_API_KEY)").option("--access-key <key>", "Alchemy access key (env: ALCHEMY_ACCESS_KEY)").option(
3400
+ ).version("0.6.2", "-v, --version", "display CLI version").option("--api-key <key>", "Alchemy API key (env: ALCHEMY_API_KEY)").option("--access-key <key>", "Alchemy access key (env: ALCHEMY_ACCESS_KEY)").option(
3401
3401
  "-n, --network <network>",
3402
3402
  "Target network (default: eth-mainnet) (env: ALCHEMY_NETWORK)"
3403
3403
  ).option("--x402", "Use x402 wallet-based gateway auth").option("--wallet-key-file <path>", "Path to wallet private key file for x402").option("--json", "Force JSON output (auto-enabled when piped)").option("-q, --quiet", "Suppress non-essential output").option("--verbose", "Enable verbose output").option("--no-color", "Disable color output").option("--reveal", "Show secrets in plain text").option("--timeout <ms>", "Request timeout in milliseconds (default: none)", parseInt).option("--debug", "Enable debug diagnostics").option("--no-interactive", "Disable REPL and prompt-driven interactions").addHelpCommand(false).allowExcessArguments(true).exitOverride((err) => {
@@ -3600,7 +3600,7 @@ ${styledLine}`;
3600
3600
  if (isInteractiveAllowed(program)) {
3601
3601
  let latestForInteractiveStartup = null;
3602
3602
  if (shouldRunOnboarding(program, cfg)) {
3603
- const { runOnboarding } = await import("./onboarding-3WIM6PVV.js");
3603
+ const { runOnboarding } = await import("./onboarding-IP4R44EQ.js");
3604
3604
  const latest = getAvailableUpdateOnce();
3605
3605
  const completed = await runOnboarding(program, latest);
3606
3606
  updateShownDuringInteractiveStartup = Boolean(latest);
@@ -3612,7 +3612,7 @@ ${styledLine}`;
3612
3612
  latestForInteractiveStartup = getAvailableUpdateOnce();
3613
3613
  updateShownDuringInteractiveStartup = Boolean(latestForInteractiveStartup);
3614
3614
  }
3615
- const { startREPL } = await import("./interactive-QJ4REXWB.js");
3615
+ const { startREPL } = await import("./interactive-UGD7GYJM.js");
3616
3616
  program.exitOverride();
3617
3617
  program.configureOutput({
3618
3618
  writeErr: () => {
@@ -9,7 +9,7 @@ import "./chunk-ATX65U7J.js";
9
9
  import "./chunk-JQRGILIS.js";
10
10
  import {
11
11
  getUpdateNoticeLines
12
- } from "./chunk-7GD5HACA.js";
12
+ } from "./chunk-TK3HZ5UT.js";
13
13
  import {
14
14
  bold,
15
15
  brand,
@@ -2,7 +2,7 @@
2
2
  if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
3
3
  import {
4
4
  getUpdateNoticeLines
5
- } from "./chunk-7GD5HACA.js";
5
+ } from "./chunk-TK3HZ5UT.js";
6
6
  import {
7
7
  bold,
8
8
  brand,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alchemy/cli",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Alchemy CLI — interact with blockchain data",
5
5
  "type": "module",
6
6
  "bin": {