@portkey/onboarding 2.0.0-alpha.21 → 2.0.0-alpha.22

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.
@@ -5,9 +5,10 @@ const evokeApp_1 = require("../evokeApp");
5
5
  const constants_1 = require("../constants");
6
6
  const evokePortkeyApp = ({ domain, custom, action, timeout = 4000, customFailureCallback, onStatusChange, version, }) => {
7
7
  const downloadUrl = version !== 'v1' ? constants_1.PORTKEY_V2_DOWNLOAD_URL : constants_1.APP_DOWNLOAD_URL;
8
+ const scheme = version !== 'v1' ? utils_1.scheme.DID_APP_SCHEMA : utils_1.scheme.V1_DID_APP_SCHEMA;
8
9
  const callLib = new evokeApp_1.EvokeApp({
9
10
  scheme: {
10
- protocol: utils_1.scheme.DID_APP_SCHEMA,
11
+ protocol: scheme,
11
12
  domain: domain || (window === null || window === void 0 ? void 0 : window.location.host),
12
13
  },
13
14
  timeout,
@@ -16,7 +17,7 @@ const evokePortkeyApp = ({ domain, custom, action, timeout = 4000, customFailure
16
17
  logFunc: onStatusChange,
17
18
  buildScheme: (config, options) => {
18
19
  return utils_1.scheme.formatScheme({
19
- scheme: utils_1.scheme.DID_APP_SCHEMA,
20
+ scheme,
20
21
  action: action,
21
22
  domain: options.scheme.domain,
22
23
  custom: config.param,
@@ -5,21 +5,25 @@ export declare const evokePortkey: {
5
5
  domain?: string | undefined;
6
6
  action: "login";
7
7
  custom: any;
8
+ version?: "v1" | undefined;
8
9
  } & import("./types").IBaseEvokeAppOption & import("./types").TVersion): void;
9
10
  (params: {
10
11
  domain?: string | undefined;
11
12
  action: "linkDapp";
12
13
  custom: import("@portkey/utils/dist/commonjs/scheme").LinkDappData;
14
+ version?: "v1" | undefined;
13
15
  } & import("./types").IBaseEvokeAppOption & import("./types").TVersion): void;
14
16
  (params: {
15
17
  domain?: string | undefined;
16
18
  action: "addContact";
17
19
  custom: string;
20
+ version?: "v1" | undefined;
18
21
  } & import("./types").IBaseEvokeAppOption & import("./types").TVersion): void;
19
22
  (params: {
20
23
  domain?: string | undefined;
21
24
  action: "addGroup";
22
25
  custom: string;
26
+ version?: "v1" | undefined;
23
27
  } & import("./types").IBaseEvokeAppOption & import("./types").TVersion): void;
24
28
  };
25
29
  extension: (params?: import("./types").IEvokeExtensionProps | undefined) => Promise<boolean>;
@@ -3,9 +3,10 @@ import { EvokeApp } from '../evokeApp/index.js';
3
3
  import { APP_DOWNLOAD_URL, PORTKEY_V2_DOWNLOAD_URL } from '../constants/index.js';
4
4
  const evokePortkeyApp = ({ domain, custom, action, timeout = 4000, customFailureCallback, onStatusChange, version, }) => {
5
5
  const downloadUrl = version !== 'v1' ? PORTKEY_V2_DOWNLOAD_URL : APP_DOWNLOAD_URL;
6
+ const scheme = version !== 'v1' ? schemeUtils.DID_APP_SCHEMA : schemeUtils.V1_DID_APP_SCHEMA;
6
7
  const callLib = new EvokeApp({
7
8
  scheme: {
8
- protocol: schemeUtils.DID_APP_SCHEMA,
9
+ protocol: scheme,
9
10
  domain: domain || (window === null || window === void 0 ? void 0 : window.location.host),
10
11
  },
11
12
  timeout,
@@ -14,7 +15,7 @@ const evokePortkeyApp = ({ domain, custom, action, timeout = 4000, customFailure
14
15
  logFunc: onStatusChange,
15
16
  buildScheme: (config, options) => {
16
17
  return schemeUtils.formatScheme({
17
- scheme: schemeUtils.DID_APP_SCHEMA,
18
+ scheme,
18
19
  action: action,
19
20
  domain: options.scheme.domain,
20
21
  custom: config.param,
@@ -5,21 +5,25 @@ export declare const evokePortkey: {
5
5
  domain?: string | undefined;
6
6
  action: "login";
7
7
  custom: any;
8
+ version?: "v1" | undefined;
8
9
  } & import("./types").IBaseEvokeAppOption & import("./types").TVersion): void;
9
10
  (params: {
10
11
  domain?: string | undefined;
11
12
  action: "linkDapp";
12
13
  custom: import("@portkey/utils/dist/commonjs/scheme").LinkDappData;
14
+ version?: "v1" | undefined;
13
15
  } & import("./types").IBaseEvokeAppOption & import("./types").TVersion): void;
14
16
  (params: {
15
17
  domain?: string | undefined;
16
18
  action: "addContact";
17
19
  custom: string;
20
+ version?: "v1" | undefined;
18
21
  } & import("./types").IBaseEvokeAppOption & import("./types").TVersion): void;
19
22
  (params: {
20
23
  domain?: string | undefined;
21
24
  action: "addGroup";
22
25
  custom: string;
26
+ version?: "v1" | undefined;
23
27
  } & import("./types").IBaseEvokeAppOption & import("./types").TVersion): void;
24
28
  };
25
29
  extension: (params?: import("./types").IEvokeExtensionProps | undefined) => Promise<boolean>;
@@ -5,21 +5,25 @@ export declare const evokePortkey: {
5
5
  domain?: string | undefined;
6
6
  action: "login";
7
7
  custom: any;
8
+ version?: "v1" | undefined;
8
9
  } & import("./types").IBaseEvokeAppOption & import("./types").TVersion): void;
9
10
  (params: {
10
11
  domain?: string | undefined;
11
12
  action: "linkDapp";
12
13
  custom: import("@portkey/utils/dist/commonjs/scheme").LinkDappData;
14
+ version?: "v1" | undefined;
13
15
  } & import("./types").IBaseEvokeAppOption & import("./types").TVersion): void;
14
16
  (params: {
15
17
  domain?: string | undefined;
16
18
  action: "addContact";
17
19
  custom: string;
20
+ version?: "v1" | undefined;
18
21
  } & import("./types").IBaseEvokeAppOption & import("./types").TVersion): void;
19
22
  (params: {
20
23
  domain?: string | undefined;
21
24
  action: "addGroup";
22
25
  custom: string;
26
+ version?: "v1" | undefined;
23
27
  } & import("./types").IBaseEvokeAppOption & import("./types").TVersion): void;
24
28
  };
25
29
  extension: (params?: import("./types").IEvokeExtensionProps | undefined) => Promise<boolean>;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/evokePortkey/index.ts"],"names":[],"mappings":"AAGA,cAAc,SAAS,CAAC;AACxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAiC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/evokePortkey/index.ts"],"names":[],"mappings":"AAGA,cAAc,SAAS,CAAC;AACxB,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAiC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portkey/onboarding",
3
- "version": "2.0.0-alpha.21",
3
+ "version": "2.0.0-alpha.22",
4
4
  "description": "",
5
5
  "main": "./dist/commonjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -41,10 +41,10 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@portkey/detect-provider": "^2.0.0-alpha.2",
44
- "@portkey/types": "^2.0.0-alpha.21",
45
- "@portkey/utils": "^2.0.0-alpha.21",
44
+ "@portkey/types": "^2.0.0-alpha.22",
45
+ "@portkey/utils": "^2.0.0-alpha.22",
46
46
  "bowser": "^2.11.0",
47
47
  "query-string": "^7.1.1"
48
48
  },
49
- "gitHead": "03b8fcab6790a12ceae9e432e84e0f3ce6fd070c"
49
+ "gitHead": "3c2f1b7977fc1f843e849771d94dd1e6591956c6"
50
50
  }