@parallel-protocol/cli 0.2.10 → 0.2.11

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.
Files changed (2) hide show
  1. package/dist/index.js +14 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1635,7 +1635,7 @@ function suppressLogs() {
1635
1635
 
1636
1636
  // package.json
1637
1637
  var package_default = {
1638
- version: "0.2.10"};
1638
+ version: "0.2.11"};
1639
1639
  function findEnvFile(dir) {
1640
1640
  const candidate = join(dir, ".env");
1641
1641
  if (existsSync(candidate)) return candidate;
@@ -12452,9 +12452,9 @@ var envSchema = z.object({
12452
12452
  MCP_MAX_SESSIONS: z.coerce.number().default(500),
12453
12453
  MCP_SESSION_TTL_MS: z.coerce.number().default(10 * 60 * 1e3),
12454
12454
  ALCHEMY_API_KEY: z.string().optional(),
12455
- STAKE_API_URL: z.string().min(1).default("https://parallel-api-v2.vercel.app"),
12455
+ STAKE_API_URL: z.string().min(1).default("https://api.parallel.best"),
12456
12456
  STAKE_API_KEY: z.string().optional(),
12457
- SUPPLY_API_URL: z.string().min(1).default("https://parallel-api-v2.vercel.app"),
12457
+ SUPPLY_API_URL: z.string().min(1).default("https://api.parallel.best"),
12458
12458
  REDIS_URL: z.string().optional()
12459
12459
  });
12460
12460
  var env2 = envSchema.parse(process.env);
@@ -12465,9 +12465,12 @@ async function fetchAllRewards(address) {
12465
12465
  const baseUrl = env2.STAKE_API_URL;
12466
12466
  if (!baseUrl) return null;
12467
12467
  try {
12468
- const res = await fetch(`${baseUrl}/api/stake/rewards/all/${address}`, {
12469
- headers: env2.STAKE_API_KEY ? { "x-api-key": env2.STAKE_API_KEY } : {}
12470
- });
12468
+ const res = await fetchWithTimeout(
12469
+ `${baseUrl}/api/stake/rewards/all/${address}`,
12470
+ {
12471
+ headers: env2.STAKE_API_KEY ? { "x-api-key": env2.STAKE_API_KEY } : {}
12472
+ }
12473
+ );
12471
12474
  if (!res.ok) return null;
12472
12475
  const raw = await res.json();
12473
12476
  return (Array.isArray(raw) ? raw : raw.json) ?? null;
@@ -12653,7 +12656,7 @@ async function fetchEpochMeta() {
12653
12656
  const baseUrl = env2.STAKE_API_URL;
12654
12657
  if (!baseUrl) return null;
12655
12658
  try {
12656
- const res = await fetch(`${baseUrl}/api/stake/epoch/last`, {
12659
+ const res = await fetchWithTimeout(`${baseUrl}/api/stake/epoch/last`, {
12657
12660
  headers: env2.STAKE_API_KEY ? { "x-api-key": env2.STAKE_API_KEY } : {}
12658
12661
  });
12659
12662
  if (!res.ok) return null;
@@ -12714,7 +12717,9 @@ async function fetchPrlCirculatingSupply() {
12714
12717
  const supplyApiUrl = env2.SUPPLY_API_URL;
12715
12718
  if (!supplyApiUrl) return null;
12716
12719
  try {
12717
- const res = await fetch(`${supplyApiUrl}/public/supply/prl/circulating`);
12720
+ const res = await fetchWithTimeout(
12721
+ `${supplyApiUrl}/public/supply/prl/circulating`
12722
+ );
12718
12723
  if (!res.ok) return null;
12719
12724
  return (await res.text()).trim();
12720
12725
  } catch {
@@ -15342,7 +15347,7 @@ function swapCommand() {
15342
15347
 
15343
15348
  // ../mcp-server/package.json
15344
15349
  var package_default2 = {
15345
- version: "1.2.0"};
15350
+ version: "1.2.1"};
15346
15351
 
15347
15352
  // src/commands/version.ts
15348
15353
  function versionCommand() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parallel-protocol/cli",
3
- "version": "0.2.10",
3
+ "version": "0.2.11",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [