@portkey/onboarding 1.4.0-alpha.1 → 1.4.0-alpha.3

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 (37) hide show
  1. package/dist/commonjs/constants/index.d.ts +1 -0
  2. package/dist/commonjs/constants/index.js +2 -1
  3. package/dist/commonjs/evokePortkey/checkPortkeyExtension.d.ts +2 -1
  4. package/dist/commonjs/evokePortkey/checkPortkeyExtension.js +1 -2
  5. package/dist/commonjs/evokePortkey/evokeByThirdParty.d.ts +16 -0
  6. package/dist/commonjs/evokePortkey/evokeByThirdParty.js +34 -0
  7. package/dist/commonjs/evokePortkey/evokePortkeyApp.d.ts +3 -16
  8. package/dist/commonjs/evokePortkey/evokePortkeyApp.js +1 -2
  9. package/dist/commonjs/evokePortkey/index.d.ts +26 -2
  10. package/dist/commonjs/evokePortkey/index.js +9 -2
  11. package/dist/commonjs/evokePortkey/types.d.ts +15 -0
  12. package/dist/commonjs/evokePortkey/types.js +2 -0
  13. package/dist/esm/constants/index.d.ts +1 -0
  14. package/dist/esm/constants/index.js +1 -0
  15. package/dist/esm/evokePortkey/checkPortkeyExtension.d.ts +2 -1
  16. package/dist/esm/evokePortkey/checkPortkeyExtension.js +2 -1
  17. package/dist/esm/evokePortkey/evokeByThirdParty.d.ts +16 -0
  18. package/dist/esm/evokePortkey/evokeByThirdParty.js +32 -0
  19. package/dist/esm/evokePortkey/evokePortkeyApp.d.ts +3 -16
  20. package/dist/esm/evokePortkey/evokePortkeyApp.js +2 -1
  21. package/dist/esm/evokePortkey/index.d.ts +26 -2
  22. package/dist/esm/evokePortkey/index.js +5 -2
  23. package/dist/esm/evokePortkey/types.d.ts +15 -0
  24. package/dist/esm/evokePortkey/types.js +1 -0
  25. package/dist/types/constants/index.d.ts +1 -0
  26. package/dist/types/constants/index.d.ts.map +1 -1
  27. package/dist/types/evokePortkey/checkPortkeyExtension.d.ts +2 -1
  28. package/dist/types/evokePortkey/checkPortkeyExtension.d.ts.map +1 -1
  29. package/dist/types/evokePortkey/evokeByThirdParty.d.ts +17 -0
  30. package/dist/types/evokePortkey/evokeByThirdParty.d.ts.map +1 -0
  31. package/dist/types/evokePortkey/evokePortkeyApp.d.ts +3 -16
  32. package/dist/types/evokePortkey/evokePortkeyApp.d.ts.map +1 -1
  33. package/dist/types/evokePortkey/index.d.ts +26 -2
  34. package/dist/types/evokePortkey/index.d.ts.map +1 -1
  35. package/dist/types/evokePortkey/types.d.ts +16 -0
  36. package/dist/types/evokePortkey/types.d.ts.map +1 -0
  37. package/package.json +4 -4
@@ -7,3 +7,4 @@ export declare const EXTENSION_DOWNLOAD_URL: {
7
7
  EDGE: string;
8
8
  DEFAULT: string;
9
9
  };
10
+ export declare const WEB_PAGE = "http://localhost:3000";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EXTENSION_DOWNLOAD_URL = exports.APP_DOWNLOAD_URL = void 0;
3
+ exports.WEB_PAGE = exports.EXTENSION_DOWNLOAD_URL = exports.APP_DOWNLOAD_URL = void 0;
4
4
  exports.APP_DOWNLOAD_URL = {
5
5
  APP_STORE: 'https://apps.apple.com/us/app/portkey-ca-wallet-crypto-nft/id6445808228',
6
6
  CHROME_STORE: 'https://play.google.com/store/apps/details?id=com.portkey.did',
@@ -10,3 +10,4 @@ exports.EXTENSION_DOWNLOAD_URL = {
10
10
  EDGE: 'https://chrome.google.com/webstore/detail/portkey-did-crypto-nft/hpjiiechbbhefmpggegmahejiiphbmij',
11
11
  DEFAULT: 'https://portkey.finance/download',
12
12
  };
13
+ exports.WEB_PAGE = 'http://localhost:3000';
@@ -1 +1,2 @@
1
- export declare const checkPortkeyExtension: () => Promise<boolean>;
1
+ declare const checkPortkeyExtension: () => Promise<boolean>;
2
+ export default checkPortkeyExtension;
@@ -9,7 +9,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.checkPortkeyExtension = void 0;
13
12
  const utils_1 = require("@portkey/utils");
14
13
  const utils_2 = require("../utils");
15
14
  const constants_1 = require("../constants");
@@ -27,4 +26,4 @@ const checkPortkeyExtension = () => __awaiter(void 0, void 0, void 0, function*
27
26
  _window.open(downloadURL, '_blank');
28
27
  return false;
29
28
  });
30
- exports.checkPortkeyExtension = checkPortkeyExtension;
29
+ exports.default = checkPortkeyExtension;
@@ -0,0 +1,16 @@
1
+ import { scheme } from '@portkey/utils';
2
+ type IBaseOption = {
3
+ timeout?: number;
4
+ };
5
+ interface IEvokeByThirdParty {
6
+ evokeByThirdParty(params?: {
7
+ action: 'login';
8
+ custom: scheme.ILoginHandleSchemeParams['custom'];
9
+ } & IBaseOption): Promise<any>;
10
+ evokeByThirdParty(params?: {
11
+ action: 'linkDapp';
12
+ custom: scheme.ILinkDappHandleSchemeParams['custom'];
13
+ } & IBaseOption): Promise<any>;
14
+ }
15
+ declare const evokeByThirdParty: IEvokeByThirdParty['evokeByThirdParty'];
16
+ export default evokeByThirdParty;
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const query_string_1 = require("query-string");
4
+ const constants_1 = require("../constants");
5
+ const evokeByThirdParty = params => new Promise((resolve, reject) => {
6
+ let timer = null;
7
+ const onMessage = (event) => {
8
+ const type = event.data.type;
9
+ if (type === 'PortkeyDownloadOnSuccess' || type === 'PortkeyDownloadOnFailure') {
10
+ timer && clearInterval(timer);
11
+ }
12
+ switch (type) {
13
+ case 'PortkeyDownloadOnSuccess':
14
+ resolve(event.data.data);
15
+ break;
16
+ case 'PortkeyDownloadOnFailure':
17
+ reject(event.data.error);
18
+ break;
19
+ default:
20
+ return;
21
+ }
22
+ window.removeEventListener('message', onMessage);
23
+ };
24
+ window.addEventListener('message', onMessage);
25
+ const windowOpener = window.open(`${constants_1.WEB_PAGE}/portkey-download?${(0, query_string_1.stringify)(params)}`);
26
+ timer = setInterval(() => {
27
+ if (windowOpener === null || windowOpener === void 0 ? void 0 : windowOpener.closed) {
28
+ clearInterval(timer);
29
+ reject('User close the prompt');
30
+ timer = null;
31
+ }
32
+ }, 1600);
33
+ });
34
+ exports.default = evokeByThirdParty;
@@ -1,16 +1,3 @@
1
- import { scheme as schemeUtils } from '@portkey/utils';
2
- import { PartialOption } from '@portkey/types';
3
- import { EvokeAppOptions } from '../evokeApp/types';
4
- export interface IBaseEvokeAppOption {
5
- timeout?: number;
6
- customFailureCallback?: () => void;
7
- onStatusChange?: EvokeAppOptions['logFunc'];
8
- }
9
- export type EvokePortkeyByLogin = PartialOption<Omit<schemeUtils.ILoginHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
10
- type EvokePortkeyByLinkDapp = PartialOption<Omit<schemeUtils.ILinkDappHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
11
- export interface IEvokePortkeyApp {
12
- evokePortkeyApp(params: EvokePortkeyByLogin): void;
13
- evokePortkeyApp(params: EvokePortkeyByLinkDapp): void;
14
- }
15
- export declare const evokePortkeyApp: IEvokePortkeyApp['evokePortkeyApp'];
16
- export {};
1
+ import { IEvokePortkeyApp } from './types';
2
+ declare const evokePortkeyApp: IEvokePortkeyApp['evokePortkeyApp'];
3
+ export default evokePortkeyApp;
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.evokePortkeyApp = void 0;
4
3
  const utils_1 = require("@portkey/utils");
5
4
  const evokeApp_1 = require("../evokeApp");
6
5
  const constants_1 = require("../constants");
@@ -29,4 +28,4 @@ const evokePortkeyApp = ({ domain, custom, action, timeout = 4000, customFailure
29
28
  callback: customFailureCallback,
30
29
  });
31
30
  };
32
- exports.evokePortkeyApp = evokePortkeyApp;
31
+ exports.default = evokePortkeyApp;
@@ -1,2 +1,26 @@
1
- export * from './evokePortkeyApp';
2
- export * from './checkPortkeyExtension';
1
+ export * from './types';
2
+ export declare const evokePortkey: {
3
+ app: {
4
+ (params: import("./types").EvokePortkeyByLogin): void;
5
+ (params: {
6
+ domain?: string | undefined;
7
+ action: "linkDapp";
8
+ custom: import("@portkey/utils/dist/commonjs/scheme").LinkDappData;
9
+ } & import("./types").IBaseEvokeAppOption): void;
10
+ };
11
+ extension: () => Promise<boolean>;
12
+ thirdParty: {
13
+ (params?: ({
14
+ action: "login";
15
+ custom: any;
16
+ } & {
17
+ timeout?: number | undefined;
18
+ }) | undefined): Promise<any>;
19
+ (params?: ({
20
+ action: "linkDapp";
21
+ custom: import("@portkey/utils/dist/commonjs/scheme").LinkDappData;
22
+ } & {
23
+ timeout?: number | undefined;
24
+ }) | undefined): Promise<any>;
25
+ };
26
+ };
@@ -13,6 +13,13 @@ var __createBinding = (this && this.__createBinding) || (Object.create ? (functi
13
13
  var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
+ var __importDefault = (this && this.__importDefault) || function (mod) {
17
+ return (mod && mod.__esModule) ? mod : { "default": mod };
18
+ };
16
19
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./evokePortkeyApp"), exports);
18
- __exportStar(require("./checkPortkeyExtension"), exports);
20
+ exports.evokePortkey = void 0;
21
+ const evokePortkeyApp_1 = __importDefault(require("./evokePortkeyApp"));
22
+ const checkPortkeyExtension_1 = __importDefault(require("./checkPortkeyExtension"));
23
+ const evokeByThirdParty_1 = __importDefault(require("./evokeByThirdParty"));
24
+ __exportStar(require("./types"), exports);
25
+ exports.evokePortkey = { app: evokePortkeyApp_1.default, extension: checkPortkeyExtension_1.default, thirdParty: evokeByThirdParty_1.default };
@@ -0,0 +1,15 @@
1
+ import { PartialOption } from '@portkey/types';
2
+ import { EvokeAppOptions } from '../evokeApp/types';
3
+ import { scheme as schemeUtils } from '@portkey/utils';
4
+ export interface IBaseEvokeAppOption {
5
+ timeout?: number;
6
+ customFailureCallback?: () => void;
7
+ onStatusChange?: EvokeAppOptions['logFunc'];
8
+ }
9
+ export type EvokePortkeyByLogin = PartialOption<Omit<schemeUtils.ILoginHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
10
+ type EvokePortkeyByLinkDapp = PartialOption<Omit<schemeUtils.ILinkDappHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
11
+ export interface IEvokePortkeyApp {
12
+ evokePortkeyApp(params: EvokePortkeyByLogin): void;
13
+ evokePortkeyApp(params: EvokePortkeyByLinkDapp): void;
14
+ }
15
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -7,3 +7,4 @@ export declare const EXTENSION_DOWNLOAD_URL: {
7
7
  EDGE: string;
8
8
  DEFAULT: string;
9
9
  };
10
+ export declare const WEB_PAGE = "http://localhost:3000";
@@ -7,3 +7,4 @@ export const EXTENSION_DOWNLOAD_URL = {
7
7
  EDGE: 'https://chrome.google.com/webstore/detail/portkey-did-crypto-nft/hpjiiechbbhefmpggegmahejiiphbmij',
8
8
  DEFAULT: 'https://portkey.finance/download',
9
9
  };
10
+ export const WEB_PAGE = 'http://localhost:3000';
@@ -1 +1,2 @@
1
- export declare const checkPortkeyExtension: () => Promise<boolean>;
1
+ declare const checkPortkeyExtension: () => Promise<boolean>;
2
+ export default checkPortkeyExtension;
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  import { sleep } from '@portkey/utils';
11
11
  import { detectBrowserName } from '../utils/index.js';
12
12
  import { EXTENSION_DOWNLOAD_URL } from '../constants/index.js';
13
- export const checkPortkeyExtension = () => __awaiter(void 0, void 0, void 0, function* () {
13
+ const checkPortkeyExtension = () => __awaiter(void 0, void 0, void 0, function* () {
14
14
  if (typeof window === 'undefined')
15
15
  return false;
16
16
  const _window = window;
@@ -24,3 +24,4 @@ export const checkPortkeyExtension = () => __awaiter(void 0, void 0, void 0, fun
24
24
  _window.open(downloadURL, '_blank');
25
25
  return false;
26
26
  });
27
+ export default checkPortkeyExtension;
@@ -0,0 +1,16 @@
1
+ import { scheme } from '@portkey/utils';
2
+ type IBaseOption = {
3
+ timeout?: number;
4
+ };
5
+ interface IEvokeByThirdParty {
6
+ evokeByThirdParty(params?: {
7
+ action: 'login';
8
+ custom: scheme.ILoginHandleSchemeParams['custom'];
9
+ } & IBaseOption): Promise<any>;
10
+ evokeByThirdParty(params?: {
11
+ action: 'linkDapp';
12
+ custom: scheme.ILinkDappHandleSchemeParams['custom'];
13
+ } & IBaseOption): Promise<any>;
14
+ }
15
+ declare const evokeByThirdParty: IEvokeByThirdParty['evokeByThirdParty'];
16
+ export default evokeByThirdParty;
@@ -0,0 +1,32 @@
1
+ import { stringify } from 'query-string';
2
+ import { WEB_PAGE } from '../constants/index.js';
3
+ const evokeByThirdParty = params => new Promise((resolve, reject) => {
4
+ let timer = null;
5
+ const onMessage = (event) => {
6
+ const type = event.data.type;
7
+ if (type === 'PortkeyDownloadOnSuccess' || type === 'PortkeyDownloadOnFailure') {
8
+ timer && clearInterval(timer);
9
+ }
10
+ switch (type) {
11
+ case 'PortkeyDownloadOnSuccess':
12
+ resolve(event.data.data);
13
+ break;
14
+ case 'PortkeyDownloadOnFailure':
15
+ reject(event.data.error);
16
+ break;
17
+ default:
18
+ return;
19
+ }
20
+ window.removeEventListener('message', onMessage);
21
+ };
22
+ window.addEventListener('message', onMessage);
23
+ const windowOpener = window.open(`${WEB_PAGE}/portkey-download?${stringify(params)}`);
24
+ timer = setInterval(() => {
25
+ if (windowOpener === null || windowOpener === void 0 ? void 0 : windowOpener.closed) {
26
+ clearInterval(timer);
27
+ reject('User close the prompt');
28
+ timer = null;
29
+ }
30
+ }, 1600);
31
+ });
32
+ export default evokeByThirdParty;
@@ -1,16 +1,3 @@
1
- import { scheme as schemeUtils } from '@portkey/utils';
2
- import { PartialOption } from '@portkey/types';
3
- import { EvokeAppOptions } from '../evokeApp/types.js';
4
- export interface IBaseEvokeAppOption {
5
- timeout?: number;
6
- customFailureCallback?: () => void;
7
- onStatusChange?: EvokeAppOptions['logFunc'];
8
- }
9
- export type EvokePortkeyByLogin = PartialOption<Omit<schemeUtils.ILoginHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
10
- type EvokePortkeyByLinkDapp = PartialOption<Omit<schemeUtils.ILinkDappHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
11
- export interface IEvokePortkeyApp {
12
- evokePortkeyApp(params: EvokePortkeyByLogin): void;
13
- evokePortkeyApp(params: EvokePortkeyByLinkDapp): void;
14
- }
15
- export declare const evokePortkeyApp: IEvokePortkeyApp['evokePortkeyApp'];
16
- export {};
1
+ import { IEvokePortkeyApp } from './types.js';
2
+ declare const evokePortkeyApp: IEvokePortkeyApp['evokePortkeyApp'];
3
+ export default evokePortkeyApp;
@@ -1,7 +1,7 @@
1
1
  import { scheme as schemeUtils } from '@portkey/utils';
2
2
  import { EvokeApp } from '../evokeApp/index.js';
3
3
  import { APP_DOWNLOAD_URL } from '../constants/index.js';
4
- export const evokePortkeyApp = ({ domain, custom, action, timeout = 4000, customFailureCallback, onStatusChange, }) => {
4
+ const evokePortkeyApp = ({ domain, custom, action, timeout = 4000, customFailureCallback, onStatusChange, }) => {
5
5
  const callLib = new EvokeApp({
6
6
  scheme: {
7
7
  protocol: schemeUtils.DID_APP_SCHEMA,
@@ -26,3 +26,4 @@ export const evokePortkeyApp = ({ domain, custom, action, timeout = 4000, custom
26
26
  callback: customFailureCallback,
27
27
  });
28
28
  };
29
+ export default evokePortkeyApp;
@@ -1,2 +1,26 @@
1
- export * from './evokePortkeyApp.js';
2
- export * from './checkPortkeyExtension.js';
1
+ export * from './types.js';
2
+ export declare const evokePortkey: {
3
+ app: {
4
+ (params: import("./types").EvokePortkeyByLogin): void;
5
+ (params: {
6
+ domain?: string | undefined;
7
+ action: "linkDapp";
8
+ custom: import("@portkey/utils/dist/commonjs/scheme").LinkDappData;
9
+ } & import("./types").IBaseEvokeAppOption): void;
10
+ };
11
+ extension: () => Promise<boolean>;
12
+ thirdParty: {
13
+ (params?: ({
14
+ action: "login";
15
+ custom: any;
16
+ } & {
17
+ timeout?: number | undefined;
18
+ }) | undefined): Promise<any>;
19
+ (params?: ({
20
+ action: "linkDapp";
21
+ custom: import("@portkey/utils/dist/commonjs/scheme").LinkDappData;
22
+ } & {
23
+ timeout?: number | undefined;
24
+ }) | undefined): Promise<any>;
25
+ };
26
+ };
@@ -1,2 +1,5 @@
1
- export * from './evokePortkeyApp.js';
2
- export * from './checkPortkeyExtension.js';
1
+ import app from './evokePortkeyApp.js';
2
+ import extension from './checkPortkeyExtension.js';
3
+ import thirdParty from './evokeByThirdParty.js';
4
+ export * from './types.js';
5
+ export const evokePortkey = { app, extension, thirdParty };
@@ -0,0 +1,15 @@
1
+ import { PartialOption } from '@portkey/types';
2
+ import { EvokeAppOptions } from '../evokeApp/types.js';
3
+ import { scheme as schemeUtils } from '@portkey/utils';
4
+ export interface IBaseEvokeAppOption {
5
+ timeout?: number;
6
+ customFailureCallback?: () => void;
7
+ onStatusChange?: EvokeAppOptions['logFunc'];
8
+ }
9
+ export type EvokePortkeyByLogin = PartialOption<Omit<schemeUtils.ILoginHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
10
+ type EvokePortkeyByLinkDapp = PartialOption<Omit<schemeUtils.ILinkDappHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
11
+ export interface IEvokePortkeyApp {
12
+ evokePortkeyApp(params: EvokePortkeyByLogin): void;
13
+ evokePortkeyApp(params: EvokePortkeyByLinkDapp): void;
14
+ }
15
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -7,4 +7,5 @@ export declare const EXTENSION_DOWNLOAD_URL: {
7
7
  EDGE: string;
8
8
  DEFAULT: string;
9
9
  };
10
+ export declare const WEB_PAGE = "http://localhost:3000";
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;CAG5B,CAAC;AACF,eAAO,MAAM,sBAAsB;;;;CAIlC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;CAG5B,CAAC;AACF,eAAO,MAAM,sBAAsB;;;;CAIlC,CAAC;AAIF,eAAO,MAAM,QAAQ,0BAA0B,CAAC"}
@@ -1,2 +1,3 @@
1
- export declare const checkPortkeyExtension: () => Promise<boolean>;
1
+ declare const checkPortkeyExtension: () => Promise<boolean>;
2
+ export default checkPortkeyExtension;
2
3
  //# sourceMappingURL=checkPortkeyExtension.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkPortkeyExtension.d.ts","sourceRoot":"","sources":["../../../src/evokePortkey/checkPortkeyExtension.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,qBAAqB,wBAYjC,CAAC"}
1
+ {"version":3,"file":"checkPortkeyExtension.d.ts","sourceRoot":"","sources":["../../../src/evokePortkey/checkPortkeyExtension.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,qBAAqB,wBAY1B,CAAC;AAEF,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { scheme } from '@portkey/utils';
2
+ type IBaseOption = {
3
+ timeout?: number;
4
+ };
5
+ interface IEvokeByThirdParty {
6
+ evokeByThirdParty(params?: {
7
+ action: 'login';
8
+ custom: scheme.ILoginHandleSchemeParams['custom'];
9
+ } & IBaseOption): Promise<any>;
10
+ evokeByThirdParty(params?: {
11
+ action: 'linkDapp';
12
+ custom: scheme.ILinkDappHandleSchemeParams['custom'];
13
+ } & IBaseOption): Promise<any>;
14
+ }
15
+ declare const evokeByThirdParty: IEvokeByThirdParty['evokeByThirdParty'];
16
+ export default evokeByThirdParty;
17
+ //# sourceMappingURL=evokeByThirdParty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evokeByThirdParty.d.ts","sourceRoot":"","sources":["../../../src/evokePortkey/evokeByThirdParty.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,KAAK,WAAW,GAAG;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,UAAU,kBAAkB;IAC1B,iBAAiB,CACf,MAAM,CAAC,EAAE;QACP,MAAM,EAAE,OAAO,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAAC;KACnD,GAAG,WAAW,GACd,OAAO,CAAC,GAAG,CAAC,CAAC;IAChB,iBAAiB,CACf,MAAM,CAAC,EAAE;QACP,MAAM,EAAE,UAAU,CAAC;QACnB,MAAM,EAAE,MAAM,CAAC,2BAA2B,CAAC,QAAQ,CAAC,CAAC;KACtD,GAAG,WAAW,GACd,OAAO,CAAC,GAAG,CAAC,CAAC;CACjB;AAED,QAAA,MAAM,iBAAiB,EAAE,kBAAkB,CAAC,mBAAmB,CAgC3D,CAAC;AAEL,eAAe,iBAAiB,CAAC"}
@@ -1,17 +1,4 @@
1
- import { scheme as schemeUtils } from '@portkey/utils';
2
- import { PartialOption } from '@portkey/types';
3
- import { EvokeAppOptions } from '../evokeApp/types';
4
- export interface IBaseEvokeAppOption {
5
- timeout?: number;
6
- customFailureCallback?: () => void;
7
- onStatusChange?: EvokeAppOptions['logFunc'];
8
- }
9
- export type EvokePortkeyByLogin = PartialOption<Omit<schemeUtils.ILoginHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
10
- type EvokePortkeyByLinkDapp = PartialOption<Omit<schemeUtils.ILinkDappHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
11
- export interface IEvokePortkeyApp {
12
- evokePortkeyApp(params: EvokePortkeyByLogin): void;
13
- evokePortkeyApp(params: EvokePortkeyByLinkDapp): void;
14
- }
15
- export declare const evokePortkeyApp: IEvokePortkeyApp['evokePortkeyApp'];
16
- export {};
1
+ import { IEvokePortkeyApp } from './types';
2
+ declare const evokePortkeyApp: IEvokePortkeyApp['evokePortkeyApp'];
3
+ export default evokePortkeyApp;
17
4
  //# sourceMappingURL=evokePortkeyApp.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"evokePortkeyApp.d.ts","sourceRoot":"","sources":["../../../src/evokePortkey/evokePortkeyApp.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEvD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,cAAc,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,wBAAwB,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,GAC7G,mBAAmB,CAAC;AACtB,KAAK,sBAAsB,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,2BAA2B,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,GAC5G,mBAAmB,CAAC;AAEtB,MAAM,WAAW,gBAAgB;IAC/B,eAAe,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnD,eAAe,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACvD;AACD,eAAO,MAAM,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAgC/D,CAAC"}
1
+ {"version":3,"file":"evokePortkeyApp.d.ts","sourceRoot":"","sources":["../../../src/evokePortkey/evokePortkeyApp.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,QAAA,MAAM,eAAe,EAAE,gBAAgB,CAAC,iBAAiB,CAgCxD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,3 +1,27 @@
1
- export * from './evokePortkeyApp';
2
- export * from './checkPortkeyExtension';
1
+ export * from './types';
2
+ export declare const evokePortkey: {
3
+ app: {
4
+ (params: import("./types").EvokePortkeyByLogin): void;
5
+ (params: {
6
+ domain?: string | undefined;
7
+ action: "linkDapp";
8
+ custom: import("@portkey/utils/dist/commonjs/scheme").LinkDappData;
9
+ } & import("./types").IBaseEvokeAppOption): void;
10
+ };
11
+ extension: () => Promise<boolean>;
12
+ thirdParty: {
13
+ (params?: ({
14
+ action: "login";
15
+ custom: any;
16
+ } & {
17
+ timeout?: number | undefined;
18
+ }) | undefined): Promise<any>;
19
+ (params?: ({
20
+ action: "linkDapp";
21
+ custom: import("@portkey/utils/dist/commonjs/scheme").LinkDappData;
22
+ } & {
23
+ timeout?: number | undefined;
24
+ }) | undefined): Promise<any>;
25
+ };
26
+ };
3
27
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/evokePortkey/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,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"}
@@ -0,0 +1,16 @@
1
+ import { PartialOption } from '@portkey/types';
2
+ import { EvokeAppOptions } from '../evokeApp/types';
3
+ import { scheme as schemeUtils } from '@portkey/utils';
4
+ export interface IBaseEvokeAppOption {
5
+ timeout?: number;
6
+ customFailureCallback?: () => void;
7
+ onStatusChange?: EvokeAppOptions['logFunc'];
8
+ }
9
+ export type EvokePortkeyByLogin = PartialOption<Omit<schemeUtils.ILoginHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
10
+ type EvokePortkeyByLinkDapp = PartialOption<Omit<schemeUtils.ILinkDappHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
11
+ export interface IEvokePortkeyApp {
12
+ evokePortkeyApp(params: EvokePortkeyByLogin): void;
13
+ evokePortkeyApp(params: EvokePortkeyByLinkDapp): void;
14
+ }
15
+ export {};
16
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/evokePortkey/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAEvD,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,cAAc,CAAC,EAAE,eAAe,CAAC,SAAS,CAAC,CAAC;CAC7C;AAED,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,wBAAwB,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,GAC7G,mBAAmB,CAAC;AACtB,KAAK,sBAAsB,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,2BAA2B,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,GAC5G,mBAAmB,CAAC;AAEtB,MAAM,WAAW,gBAAgB;IAC/B,eAAe,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnD,eAAe,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACvD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portkey/onboarding",
3
- "version": "1.4.0-alpha.1",
3
+ "version": "1.4.0-alpha.3",
4
4
  "description": "",
5
5
  "main": "./dist/commonjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -40,10 +40,10 @@
40
40
  "start": "tsc --watch"
41
41
  },
42
42
  "dependencies": {
43
- "@portkey/types": "^1.4.0-alpha.1",
44
- "@portkey/utils": "^1.4.0-alpha.1",
43
+ "@portkey/types": "^1.4.0-alpha.3",
44
+ "@portkey/utils": "^1.4.0-alpha.3",
45
45
  "bowser": "^2.11.0",
46
46
  "query-string": "^7.1.1"
47
47
  },
48
- "gitHead": "b79bbe7c365f46bc71fe1baccf60411be9a3986c"
48
+ "gitHead": "cec0a0894c8f5d2a14b44ebb62eda8efaee0ccb0"
49
49
  }