@getpara/core-sdk 2.10.0 → 2.11.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.
@@ -44,7 +44,7 @@ __export(constants_exports, {
44
44
  SHORT_POLLING_INTERVAL_MS: () => SHORT_POLLING_INTERVAL_MS
45
45
  });
46
46
  module.exports = __toCommonJS(constants_exports);
47
- const PARA_CORE_VERSION = "2.10.0";
47
+ const PARA_CORE_VERSION = "2.11.0";
48
48
  const PREFIX = "@CAPSULE/";
49
49
  const PARA_PREFIX = "@PARA/";
50
50
  const LOCAL_STORAGE_AUTH_INFO = `${PREFIX}authInfo`;
@@ -49,16 +49,16 @@ function getBaseOAuthUrl(env) {
49
49
  throw new Error(`unsupported env: ${env}`);
50
50
  }
51
51
  }
52
- function getBaseUrl(env) {
52
+ function getBaseUrl(env, scheme = "http") {
53
53
  switch (env) {
54
54
  case import_types.Environment.DEV:
55
- return "http://localhost:8080/";
55
+ return `${scheme}://localhost:8080/`;
56
56
  case import_types.Environment.SANDBOX:
57
- return "https://api.sandbox.getpara.com/";
57
+ return `${scheme}s://api.sandbox.getpara.com/`;
58
58
  case import_types.Environment.BETA:
59
- return "https://api.beta.getpara.com/";
59
+ return `${scheme}s://api.beta.getpara.com/`;
60
60
  case import_types.Environment.PROD:
61
- return "https://api.getpara.com/";
61
+ return `${scheme}s://api.getpara.com/`;
62
62
  default:
63
63
  throw new Error(`unsupported env: ${env}`);
64
64
  }
@@ -1,5 +1,5 @@
1
1
  import "./chunk-7B52C2XE.js";
2
- const PARA_CORE_VERSION = "2.10.0";
2
+ const PARA_CORE_VERSION = "2.11.0";
3
3
  const PREFIX = "@CAPSULE/";
4
4
  const PARA_PREFIX = "@PARA/";
5
5
  const LOCAL_STORAGE_AUTH_INFO = `${PREFIX}authInfo`;
@@ -15,16 +15,16 @@ function getBaseOAuthUrl(env) {
15
15
  throw new Error(`unsupported env: ${env}`);
16
16
  }
17
17
  }
18
- function getBaseUrl(env) {
18
+ function getBaseUrl(env, scheme = "http") {
19
19
  switch (env) {
20
20
  case Environment.DEV:
21
- return "http://localhost:8080/";
21
+ return `${scheme}://localhost:8080/`;
22
22
  case Environment.SANDBOX:
23
- return "https://api.sandbox.getpara.com/";
23
+ return `${scheme}s://api.sandbox.getpara.com/`;
24
24
  case Environment.BETA:
25
- return "https://api.beta.getpara.com/";
25
+ return `${scheme}s://api.beta.getpara.com/`;
26
26
  case Environment.PROD:
27
- return "https://api.getpara.com/";
27
+ return `${scheme}s://api.getpara.com/`;
28
28
  default:
29
29
  throw new Error(`unsupported env: ${env}`);
30
30
  }
@@ -1,7 +1,7 @@
1
1
  import Client from '@getpara/user-management-client';
2
2
  import { Environment } from '../types/index.js';
3
3
  export declare function getBaseOAuthUrl(env: Environment): string;
4
- export declare function getBaseUrl(env: Environment): string;
4
+ export declare function getBaseUrl(env: Environment, scheme?: 'http' | 'ws'): string;
5
5
  export declare function getBaseMPCNetworkUrl(env: Environment, useWebsocket?: boolean): string;
6
6
  export declare function initClient({ env, version, apiKey, partnerId, useFetchAdapter, retrieveSessionCookie, persistSessionCookie, }: {
7
7
  env: Environment;
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@getpara/core-sdk",
3
- "version": "2.10.0",
3
+ "version": "2.11.0",
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.10.0",
8
+ "@getpara/user-management-client": "2.11.0",
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": "8da2c51cc91f021acbc2ec7373b9ca0638fc840a",
30
+ "gitHead": "1cce45857320460cca03c4a9d0a59db169b222d6",
31
31
  "main": "dist/cjs/index.js",
32
32
  "module": "dist/esm/index.js",
33
33
  "scripts": {