perp-cli 0.12.8 → 0.12.10

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/config.js CHANGED
@@ -74,15 +74,16 @@ export async function loadPrivateKey(exchange, pkOverride, walletName) {
74
74
  // settings module not available, skip
75
75
  }
76
76
  // 3. Exchange-specific env vars
77
- // v0.12.4: Aster's ASTER_API_KEY entry is removed — the legacy HMAC
78
- // signing path was retired in Plan v3.0. Aster onboarding is now via
79
- // `perp wallet agent approve aster` (off-chain agent wallet); the runtime
80
- // adapter pulls credentials from the agent store, not the env.
77
+ // v0.12.4 retired the legacy HMAC ASTER_API_KEY/SECRET path.
78
+ // v0.12.6 restored Aster as a normal EVM exchange in EXCHANGE_ENV_MAP
79
+ // (setup wizard / wallet show), but missed this map — leaving Tier 3
80
+ // env-PK loading broken. v0.12.10 restores ASTER_PRIVATE_KEY here so
81
+ // `tryLoadPrivateKey("aster")` finds the env value, mirroring HL/LT.
81
82
  const envMap = {
82
83
  pacifica: ["PACIFICA_PRIVATE_KEY", "pk"],
83
84
  hyperliquid: ["HYPERLIQUID_PRIVATE_KEY", "HL_PRIVATE_KEY"],
84
85
  lighter: ["LIGHTER_PRIVATE_KEY"],
85
- aster: [],
86
+ aster: ["ASTER_PRIVATE_KEY"],
86
87
  };
87
88
  for (const envVar of envMap[exchange]) {
88
89
  if (process.env[envVar])
@@ -383,6 +383,15 @@ export class HyperliquidAdapter {
383
383
  return "portfolio";
384
384
  if (raw === "disabled")
385
385
  return "standard";
386
+ // "default" is the implicit pre-set value HL returns when a user has
387
+ // never invoked `userSetAbstraction`. Per HL docs the four modes are
388
+ // Standard / Unified / Portfolio / (legacy) DEX abstraction. The set
389
+ // API only accepts the latter three; Standard is the de-facto baseline
390
+ // for unset accounts. Map "default" → "standard" so accounting branches
391
+ // pick the perp clearinghouse path. Users can opt into unified explicitly
392
+ // via `wallet manage account-mode unified`.
393
+ if (raw === "default")
394
+ return "standard";
386
395
  throw new PerpError("INVALID_PARAMS", `UNKNOWN_ACCOUNT_MODE: HL returned unrecognized userAbstraction mode: ${JSON.stringify(raw)}`, { remediation: "Check app.hyperliquid.xyz Settings → Account Mode" });
387
396
  });
388
397
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "perp-cli",
3
- "version": "0.12.8",
3
+ "version": "0.12.10",
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.8"
8
+ version: "0.12.10"
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.8)
44
+ perp --version 2>/dev/null # check if exists (must be >= 0.12.10)
45
45
  npm install -g perp-cli@latest 2>/dev/null || npx -y perp-cli@latest --json --version
46
46
  ```
47
47