@getpara/core-sdk 2.0.0-alpha.45 → 2.0.0-alpha.47

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.
@@ -316,11 +316,16 @@ const _ParaCore = class _ParaCore {
316
316
  return (yield this.ctx.client.getWalletBalance({ walletId, rpcUrl })).balance;
317
317
  });
318
318
  let env, apiKey;
319
- if (arguments.length === 1) {
320
- env = _ParaCore.resolveEnvironment(void 0, envOrApiKey);
321
- apiKey = envOrApiKey;
319
+ const actualArgs = Array.from(arguments).filter((arg) => arg !== void 0);
320
+ const actualArgumentCount = actualArgs.length;
321
+ if (actualArgumentCount === 1) {
322
+ if (Object.values(import_types.Environment).includes(envOrApiKey)) {
323
+ throw new Error("A Para API key is required.");
324
+ }
325
+ env = _ParaCore.resolveEnvironment(void 0, actualArgs[0]);
326
+ apiKey = actualArgs[0];
322
327
  opts = void 0;
323
- } else if (arguments.length === 2) {
328
+ } else if (actualArgumentCount === 2) {
324
329
  if (typeof apiKeyOrOpts === "object" && apiKeyOrOpts !== null) {
325
330
  env = _ParaCore.resolveEnvironment(void 0, envOrApiKey);
326
331
  apiKey = envOrApiKey;
@@ -41,7 +41,7 @@ __export(constants_exports, {
41
41
  SHORT_POLLING_INTERVAL_MS: () => SHORT_POLLING_INTERVAL_MS
42
42
  });
43
43
  module.exports = __toCommonJS(constants_exports);
44
- const PARA_CORE_VERSION = "2.0.0-alpha.45";
44
+ const PARA_CORE_VERSION = "2.0.0-alpha.47";
45
45
  const PREFIX = "@CAPSULE/";
46
46
  const PARA_PREFIX = "@PARA/";
47
47
  const LOCAL_STORAGE_AUTH_INFO = `${PREFIX}authInfo`;
@@ -281,11 +281,16 @@ const _ParaCore = class _ParaCore {
281
281
  return (yield this.ctx.client.getWalletBalance({ walletId, rpcUrl })).balance;
282
282
  });
283
283
  let env, apiKey;
284
- if (arguments.length === 1) {
285
- env = _ParaCore.resolveEnvironment(void 0, envOrApiKey);
286
- apiKey = envOrApiKey;
284
+ const actualArgs = Array.from(arguments).filter((arg) => arg !== void 0);
285
+ const actualArgumentCount = actualArgs.length;
286
+ if (actualArgumentCount === 1) {
287
+ if (Object.values(Environment).includes(envOrApiKey)) {
288
+ throw new Error("A Para API key is required.");
289
+ }
290
+ env = _ParaCore.resolveEnvironment(void 0, actualArgs[0]);
291
+ apiKey = actualArgs[0];
287
292
  opts = void 0;
288
- } else if (arguments.length === 2) {
293
+ } else if (actualArgumentCount === 2) {
289
294
  if (typeof apiKeyOrOpts === "object" && apiKeyOrOpts !== null) {
290
295
  env = _ParaCore.resolveEnvironment(void 0, envOrApiKey);
291
296
  apiKey = envOrApiKey;
@@ -1,5 +1,5 @@
1
1
  import "./chunk-7B52C2XE.js";
2
- const PARA_CORE_VERSION = "2.0.0-alpha.45";
2
+ const PARA_CORE_VERSION = "2.0.0-alpha.47";
3
3
  const PREFIX = "@CAPSULE/";
4
4
  const PARA_PREFIX = "@PARA/";
5
5
  const LOCAL_STORAGE_AUTH_INFO = `${PREFIX}authInfo`;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@getpara/core-sdk",
3
- "version": "2.0.0-alpha.45",
3
+ "version": "2.0.0-alpha.47",
4
4
  "dependencies": {
5
5
  "@celo/utils": "^8.0.2",
6
6
  "@cosmjs/encoding": "^0.32.4",
7
7
  "@ethereumjs/util": "^9.1.0",
8
- "@getpara/user-management-client": "2.0.0-alpha.45",
8
+ "@getpara/user-management-client": "2.0.0-alpha.47",
9
9
  "@noble/hashes": "^1.5.0",
10
10
  "base64url": "^3.0.1",
11
11
  "libphonenumber-js": "^1.11.7",
@@ -27,7 +27,7 @@
27
27
  "dist",
28
28
  "package.json"
29
29
  ],
30
- "gitHead": "0a049e7d4e48caae1347619fd8c0518793fbc53c",
30
+ "gitHead": "c26d1830f6e63b34f33b5c799795c8c7cb00bb5a",
31
31
  "main": "dist/cjs/index.js",
32
32
  "module": "dist/esm/index.js",
33
33
  "scripts": {