perp-cli 0.12.5 → 0.12.6

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.
@@ -70,15 +70,17 @@ function askChoice(rl, question, choices) {
70
70
  });
71
71
  }
72
72
  // ── Exchange → env var mapping ────────────────────────────────
73
- // Aster removed in v0.12.4: legacy HMAC API-key signing path was retired in
74
- // Plan v3.0. New users must onboard via `perp wallet agent approve aster`
75
- // (off-chain agent wallet, same flow as HL/PAC/LT). The setup wizard
76
- // surfaces a redirect when Aster is selected; `wallet set aster <key>`
77
- // throws INVALID_PARAMS pointing at the agent flow.
73
+ // v0.12.4 retired the legacy HMAC ASTER_API_KEY/SECRET path (Plan v3.0).
74
+ // v0.12.6 restores Aster as a normal EVM exchange: `ASTER_PRIVATE_KEY`
75
+ // (Tier 3 PK direct path) is collected like HL/LT, and the agent flow
76
+ // (`wallet agent approve aster`) is the recommended Tier 1 onboarding.
77
+ // Removing Aster entirely was over-correction — the entry must exist so
78
+ // `wallet import` / `wallet set` / setup wizard treat all 4 DEX uniformly.
78
79
  export const EXCHANGE_ENV_MAP = {
79
80
  pacifica: { envKey: "PACIFICA_PRIVATE_KEY", chain: "solana", label: "Pacifica (Solana)" },
80
81
  hyperliquid: { envKey: "HL_PRIVATE_KEY", chain: "evm", label: "Hyperliquid (EVM)" },
81
82
  lighter: { envKey: "LIGHTER_PRIVATE_KEY", chain: "evm", label: "Lighter (EVM)" },
83
+ aster: { envKey: "ASTER_PRIVATE_KEY", chain: "evm", label: "Aster (BNB Chain)" },
82
84
  };
83
85
  // ── Validate keys ─────────────────────────────────────────────
84
86
  export async function validateKey(chain, key) {
@@ -179,25 +181,9 @@ export function registerInitCommand(program) {
179
181
  console.log(` 4) ${chalk.cyan("Aster")} ${chalk.gray("— BNB Chain perps (use 'wallet agent approve aster')")}`);
180
182
  console.log();
181
183
  const exchangeChoice = await ask(rl, " Which exchange(s)? (1,2,3,4 or 'all'): ");
182
- const selectedRaw = parseExchangeChoice(exchangeChoice);
183
- // v0.12.4: legacy Aster HMAC API-key path is removed. The wizard can
184
- // no longer collect ASTER_API_KEY/ASTER_API_SECRET — Aster onboarding
185
- // is now exclusively via `perp wallet agent approve aster --master`.
186
- // Print a redirect and drop Aster from the env-write set.
187
- const asterRequested = selectedRaw.includes("aster");
188
- const selected = selectedRaw.filter((e) => e !== "aster");
189
- if (asterRequested) {
190
- console.log(chalk.yellow.bold("\n Aster onboarding is via agent wallet (no API keys):"));
191
- console.log(` ${chalk.green("perp wallet agent approve aster --master <name>")}`);
192
- console.log(chalk.gray(" Run that after this wizard completes.\n"));
193
- }
184
+ const selected = parseExchangeChoice(exchangeChoice);
194
185
  if (selected.length === 0) {
195
- if (asterRequested) {
196
- console.log(chalk.gray(" No additional exchanges to configure here. See the Aster instructions above.\n"));
197
- }
198
- else {
199
- console.log(chalk.red("\n No exchanges selected.\n"));
200
- }
186
+ console.log(chalk.red("\n No exchanges selected.\n"));
201
187
  rl.close();
202
188
  return;
203
189
  }
@@ -613,29 +613,14 @@ export function registerWalletCommands(program, isJson, getAdapter, getPacificaA
613
613
  // Resolve alias (hl → hyperliquid, pac → pacifica, lt → lighter, ast → aster)
614
614
  const aliases = { hl: "hyperliquid", pac: "pacifica", lt: "lighter", ast: "aster" };
615
615
  const resolved = aliases[exchange.toLowerCase()] || exchange.toLowerCase();
616
- // v0.12.4: Aster legacy HMAC API-key path is removed entirely. Plan v3.0
617
- // de-wired the runtime/signing surface but left the wallet set entry
618
- // accepting keys that no longer drive any signing path. Fail loudly
619
- // (SSOT Rule #2) and point at the agent flow.
620
- if (resolved === "aster") {
621
- const msg = "'wallet set aster' is removed in v0.13. Use 'wallet agent approve aster' instead.";
622
- const remediation = "perp wallet agent approve aster --master <wallet>";
623
- if (isJson()) {
624
- const { jsonError } = await import("../utils.js");
625
- return printJson(jsonError("INVALID_PARAMS", msg, { details: { remediation } }));
626
- }
627
- console.error(chalk.red(`\n ${msg}`));
628
- console.error(chalk.gray(` Run: ${remediation}\n`));
629
- process.exit(1);
630
- }
631
616
  const info = EXCHANGE_ENV_MAP[resolved];
632
617
  if (!info) {
633
618
  if (isJson()) {
634
619
  const { jsonError } = await import("../utils.js");
635
- return printJson(jsonError("INVALID_PARAMS", `Unknown exchange: ${exchange}. Use: pacifica, hyperliquid, lighter (or hl, pac, lt). For Aster: 'perp wallet agent approve aster'.`));
620
+ return printJson(jsonError("INVALID_PARAMS", `Unknown exchange: ${exchange}. Use: pacifica, hyperliquid, lighter, aster (or hl, pac, lt, ast).`));
636
621
  }
637
622
  console.error(chalk.red(`\n Unknown exchange: ${exchange}`));
638
- console.error(chalk.gray(` Use: pacifica, hyperliquid, lighter (or hl, pac, lt). For Aster: 'perp wallet agent approve aster'.\n`));
623
+ console.error(chalk.gray(` Use: pacifica, hyperliquid, lighter, aster (or hl, pac, lt, ast).\n`));
639
624
  process.exit(1);
640
625
  }
641
626
  const { valid, address } = await validateKey(info.chain, key);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "perp-cli",
3
- "version": "0.12.5",
3
+ "version": "0.12.6",
4
4
  "description": "Multi-DEX Perpetual Futures CLI - Pacifica, Hyperliquid, Lighter, Aster",
5
5
  "bin": {
6
6
  "perp": "dist/index.js",
@@ -5,7 +5,7 @@ allowed-tools: "Bash(perp:*), Bash(npx perp-cli:*), Bash(npx -y perp-cli:*)"
5
5
  license: MIT
6
6
  metadata:
7
7
  author: hypurrquant
8
- version: "0.12.5"
8
+ version: "0.12.6"
9
9
  ---
10
10
 
11
11
  # perp-cli Agent Guide
@@ -41,7 +41,7 @@ Multi-DEX perpetual futures CLI + MCP server — Pacifica (Solana), Hyperliquid
41
41
  ## Install
42
42
 
43
43
  ```bash
44
- perp --version 2>/dev/null # check if exists (must be >= 0.12.5)
44
+ perp --version 2>/dev/null # check if exists (must be >= 0.12.6)
45
45
  npm install -g perp-cli@latest 2>/dev/null || npx -y perp-cli@latest --json --version
46
46
  ```
47
47