@alchemy/cli 0.11.1 → 0.12.0

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/README.md CHANGED
@@ -118,8 +118,8 @@ Use `alchemy help` or `alchemy help <command>` for generated command help.
118
118
 
119
119
  | Command | What it does | Example |
120
120
  |---|---|---|
121
- | `wallet connect` | Interactive: choose a session wallet (recommended) or a local wallet. For scripts, pass `--mode <session\|local>`. | `alchemy wallet connect` |
122
- | `wallet connect --mode local --chain evm` | Create a new local EVM key (non-interactive). `--chain` accepts `evm`, `solana`, or `both`. | `alchemy wallet connect --mode local --chain both` |
121
+ | `wallet connect` | Connects a session wallet by default. Pass `--mode local` only when you explicitly need local keys. | `alchemy wallet connect` |
122
+ | `wallet connect --mode local` | Create new local EVM and Solana keys. | `alchemy wallet connect --mode local` |
123
123
  | `wallet connect --mode local --import <path>` | Import an existing EVM private key from a file. | `alchemy wallet connect --mode local --import ./key.txt` |
124
124
  | `wallet connect --mode session --instance-name <name>` | Connect a named session wallet instance. | `alchemy wallet connect --mode session --instance-name laptop` |
125
125
  | `wallet status [--verify]` | Reports session, local EVM, local Solana, and the active signer. `--verify` reconciles the session with the backend. | `alchemy wallet status --verify` |
@@ -69,10 +69,7 @@ function getSetupCapabilities(cfg) {
69
69
  complete: hasLocalWallet || hasSessionWallet,
70
70
  satisfiedBy: hasSessionWallet ? "wallet_session" : hasLocalWallet ? "local_wallet" : null,
71
71
  missing: hasLocalWallet || hasSessionWallet ? [] : ["wallet signer"],
72
- nextCommands: hasLocalWallet || hasSessionWallet ? [] : [
73
- "alchemy wallet connect",
74
- "alchemy wallet connect --mode local"
75
- ]
72
+ nextCommands: hasLocalWallet || hasSessionWallet ? [] : ["alchemy wallet connect"]
76
73
  }),
77
74
  x402: capabilityStatus({
78
75
  complete: x402Ready,
@@ -53,7 +53,7 @@ function semverLT(a, b) {
53
53
  return false;
54
54
  }
55
55
  function currentVersion() {
56
- return true ? "0.11.1" : "0.0.0";
56
+ return true ? "0.12.0" : "0.0.0";
57
57
  }
58
58
  function toUpdateStatus(latestVersion, checkedAt) {
59
59
  const current = currentVersion();
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ import {
18
18
  getSetupStatus,
19
19
  isSetupComplete,
20
20
  shouldRunOnboarding
21
- } from "./chunk-QWLBZTG5.js";
21
+ } from "./chunk-2VVJKVRL.js";
22
22
  import {
23
23
  isInteractiveAllowed
24
24
  } from "./chunk-RPSHRYCZ.js";
@@ -68,7 +68,7 @@ import {
68
68
  getAvailableUpdate,
69
69
  getUpdateStatus,
70
70
  printUpdateNotice
71
- } from "./chunk-SRGDGXY5.js";
71
+ } from "./chunk-BFOZ2KM7.js";
72
72
  import {
73
73
  bold,
74
74
  brand,
@@ -2594,28 +2594,11 @@ async function runConnectFlow(program2, opts) {
2594
2594
  }
2595
2595
  mode = "session";
2596
2596
  }
2597
- if (importPath) {
2598
- if (mode === "session") {
2599
- throw errInvalidArgs("`--import` is only valid with `--mode local`.");
2600
- }
2601
- mode = "local";
2597
+ if (importPath && mode !== "local") {
2598
+ throw errInvalidArgs("`--import` is only valid with `--mode local`.");
2602
2599
  }
2603
2600
  if (!mode) {
2604
- if (!isInteractiveAllowed(program2)) {
2605
- mode = "session";
2606
- } else {
2607
- const choice = await promptSelect({
2608
- message: "Choose a wallet to connect",
2609
- options: [
2610
- { value: "session", label: "Session wallet", hint: "Recommended \u2014 Alchemy-managed, more secure" },
2611
- { value: "local", label: "Local wallet", hint: "Private key stored on this machine" }
2612
- ],
2613
- initialValue: "session",
2614
- cancelMessage: "Wallet connect cancelled."
2615
- });
2616
- if (choice === null) throw new WalletConnectInterruptedError();
2617
- mode = choice;
2618
- }
2601
+ mode = "session";
2619
2602
  }
2620
2603
  if (mode === "session") {
2621
2604
  await runSessionConnect({
@@ -2757,7 +2740,7 @@ async function buildSessionSnapshot(program2, verify) {
2757
2740
  }
2758
2741
  function registerWallets(program2) {
2759
2742
  const cmd = program2.command("wallet").description("Manage wallets");
2760
- cmd.command("connect").description("Connect a wallet for onchain actions (session or local)").option("--mode <mode>", "session | local").option("--import <path>", "For --mode local: import an EVM key from file instead of creating both wallets").option("--instance-name <name>", "For --mode session: name this CLI instance").option("--force", "Replace the existing signer").action(async (opts) => {
2743
+ cmd.command("connect").description("Connect a session wallet for onchain actions").option("--mode <mode>", "session | local (default: session; local must be explicit)").option("--import <path>", "For --mode local: import an EVM key from file instead of creating both wallets").option("--instance-name <name>", "For --mode session: name this CLI instance").option("--force", "Replace the existing signer").action(async (opts) => {
2761
2744
  try {
2762
2745
  await runConnectFlow(program2, opts);
2763
2746
  } catch (err) {
@@ -6434,7 +6417,7 @@ function buildAgentPrompt(program2) {
6434
6417
  "evm approve",
6435
6418
  "xchain bridge"
6436
6419
  ],
6437
- notes: "`--signer local` only selects the local signer. You still need a local EVM key via env, flag, or saved config."
6420
+ notes: "Use only when you explicitly need a local private key. `--signer local` selects the local signer but still requires a local EVM key via env, flag, or saved config."
6438
6421
  }
6439
6422
  ],
6440
6423
  commands,
@@ -10390,7 +10373,7 @@ async function flushProcessOutput() {
10390
10373
  }
10391
10374
  program.name("alchemy").description(
10392
10375
  "The Alchemy CLI lets you query blockchain data, call JSON-RPC methods, and manage your Alchemy configuration."
10393
- ).version("0.11.1", "-v, --version", "display CLI version").option("--api-key <key>", "Alchemy API key (env: ALCHEMY_API_KEY)").option(
10376
+ ).version("0.12.0", "-v, --version", "display CLI version").option("--api-key <key>", "Alchemy API key (env: ALCHEMY_API_KEY)").option(
10394
10377
  "-n, --network <network>",
10395
10378
  "Target network for networked commands"
10396
10379
  ).option("--x402", "Use x402 wallet-based gateway auth").option(
@@ -10616,7 +10599,7 @@ ${styledLine}`;
10616
10599
  if (isInteractiveAllowed(program)) {
10617
10600
  let latestForInteractiveStartup = null;
10618
10601
  if (shouldRunOnboarding(program, cfg)) {
10619
- const { runOnboarding } = await import("./onboarding-QOZOX4CZ.js");
10602
+ const { runOnboarding } = await import("./onboarding-RXNSVGSW.js");
10620
10603
  const latest = getAvailableUpdateOnce();
10621
10604
  const completed = await runOnboarding(program, latest);
10622
10605
  updateShownDuringInteractiveStartup = Boolean(latest);
@@ -10630,7 +10613,7 @@ ${styledLine}`;
10630
10613
  latestForInteractiveStartup
10631
10614
  );
10632
10615
  }
10633
- const { startREPL } = await import("./interactive-NPBITOGO.js");
10616
+ const { startREPL } = await import("./interactive-6L2HNSOS.js");
10634
10617
  program.exitOverride();
10635
10618
  program.configureOutput({
10636
10619
  writeErr: () => {
@@ -2,14 +2,14 @@
2
2
  if(process.argv.includes("--no-color"))process.env.NO_COLOR="1";
3
3
  import {
4
4
  getSetupMethod
5
- } from "./chunk-QWLBZTG5.js";
5
+ } from "./chunk-2VVJKVRL.js";
6
6
  import "./chunk-RPSHRYCZ.js";
7
7
  import {
8
8
  getRPCNetworkIds
9
9
  } from "./chunk-OL5MEN62.js";
10
10
  import {
11
11
  getUpdateNoticeLines
12
- } from "./chunk-SRGDGXY5.js";
12
+ } from "./chunk-BFOZ2KM7.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-SRGDGXY5.js";
5
+ } from "./chunk-BFOZ2KM7.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.11.1",
3
+ "version": "0.12.0",
4
4
  "description": "Alchemy CLI — interact with blockchain data",
5
5
  "type": "module",
6
6
  "bin": {