@portkey/onboarding 0.0.2-alpha.2

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 (83) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +39 -0
  3. package/dist/commonjs/browser.d.ts +5 -0
  4. package/dist/commonjs/browser.js +37 -0
  5. package/dist/commonjs/constants/index.d.ts +10 -0
  6. package/dist/commonjs/constants/index.js +15 -0
  7. package/dist/commonjs/evokeApp/evoke.d.ts +22 -0
  8. package/dist/commonjs/evokeApp/evoke.js +101 -0
  9. package/dist/commonjs/evokeApp/generate.d.ts +5 -0
  10. package/dist/commonjs/evokeApp/generate.js +66 -0
  11. package/dist/commonjs/evokeApp/index.d.ts +21 -0
  12. package/dist/commonjs/evokeApp/index.js +129 -0
  13. package/dist/commonjs/evokeApp/types.d.ts +37 -0
  14. package/dist/commonjs/evokeApp/types.js +2 -0
  15. package/dist/commonjs/evokePortkey/checkPortkeyExtension.d.ts +3 -0
  16. package/dist/commonjs/evokePortkey/checkPortkeyExtension.js +44 -0
  17. package/dist/commonjs/evokePortkey/evokeByThirdParty.d.ts +16 -0
  18. package/dist/commonjs/evokePortkey/evokeByThirdParty.js +6 -0
  19. package/dist/commonjs/evokePortkey/evokePortkeyApp.d.ts +3 -0
  20. package/dist/commonjs/evokePortkey/evokePortkeyApp.js +31 -0
  21. package/dist/commonjs/evokePortkey/index.d.ts +24 -0
  22. package/dist/commonjs/evokePortkey/index.js +25 -0
  23. package/dist/commonjs/evokePortkey/types.d.ts +21 -0
  24. package/dist/commonjs/evokePortkey/types.js +2 -0
  25. package/dist/commonjs/index.d.ts +4 -0
  26. package/dist/commonjs/index.js +33 -0
  27. package/dist/commonjs/package.json +1 -0
  28. package/dist/commonjs/utils/index.d.ts +1 -0
  29. package/dist/commonjs/utils/index.js +23 -0
  30. package/dist/esm/browser.d.ts +5 -0
  31. package/dist/esm/browser.js +32 -0
  32. package/dist/esm/constants/index.d.ts +10 -0
  33. package/dist/esm/constants/index.js +12 -0
  34. package/dist/esm/evokeApp/evoke.d.ts +22 -0
  35. package/dist/esm/evokeApp/evoke.js +94 -0
  36. package/dist/esm/evokeApp/generate.d.ts +5 -0
  37. package/dist/esm/evokeApp/generate.js +59 -0
  38. package/dist/esm/evokeApp/index.d.ts +21 -0
  39. package/dist/esm/evokeApp/index.js +102 -0
  40. package/dist/esm/evokeApp/types.d.ts +37 -0
  41. package/dist/esm/evokeApp/types.js +1 -0
  42. package/dist/esm/evokePortkey/checkPortkeyExtension.d.ts +3 -0
  43. package/dist/esm/evokePortkey/checkPortkeyExtension.js +39 -0
  44. package/dist/esm/evokePortkey/evokeByThirdParty.d.ts +16 -0
  45. package/dist/esm/evokePortkey/evokeByThirdParty.js +4 -0
  46. package/dist/esm/evokePortkey/evokePortkeyApp.d.ts +3 -0
  47. package/dist/esm/evokePortkey/evokePortkeyApp.js +29 -0
  48. package/dist/esm/evokePortkey/index.d.ts +24 -0
  49. package/dist/esm/evokePortkey/index.js +5 -0
  50. package/dist/esm/evokePortkey/types.d.ts +21 -0
  51. package/dist/esm/evokePortkey/types.js +1 -0
  52. package/dist/esm/index.d.ts +4 -0
  53. package/dist/esm/index.js +4 -0
  54. package/dist/esm/package.json +1 -0
  55. package/dist/esm/utils/index.d.ts +1 -0
  56. package/dist/esm/utils/index.js +16 -0
  57. package/dist/types/browser.d.ts +6 -0
  58. package/dist/types/browser.d.ts.map +1 -0
  59. package/dist/types/constants/index.d.ts +11 -0
  60. package/dist/types/constants/index.d.ts.map +1 -0
  61. package/dist/types/evokeApp/evoke.d.ts +23 -0
  62. package/dist/types/evokeApp/evoke.d.ts.map +1 -0
  63. package/dist/types/evokeApp/generate.d.ts +6 -0
  64. package/dist/types/evokeApp/generate.d.ts.map +1 -0
  65. package/dist/types/evokeApp/index.d.ts +22 -0
  66. package/dist/types/evokeApp/index.d.ts.map +1 -0
  67. package/dist/types/evokeApp/types.d.ts +38 -0
  68. package/dist/types/evokeApp/types.d.ts.map +1 -0
  69. package/dist/types/evokePortkey/checkPortkeyExtension.d.ts +4 -0
  70. package/dist/types/evokePortkey/checkPortkeyExtension.d.ts.map +1 -0
  71. package/dist/types/evokePortkey/evokeByThirdParty.d.ts +17 -0
  72. package/dist/types/evokePortkey/evokeByThirdParty.d.ts.map +1 -0
  73. package/dist/types/evokePortkey/evokePortkeyApp.d.ts +4 -0
  74. package/dist/types/evokePortkey/evokePortkeyApp.d.ts.map +1 -0
  75. package/dist/types/evokePortkey/index.d.ts +25 -0
  76. package/dist/types/evokePortkey/index.d.ts.map +1 -0
  77. package/dist/types/evokePortkey/types.d.ts +22 -0
  78. package/dist/types/evokePortkey/types.d.ts.map +1 -0
  79. package/dist/types/index.d.ts +5 -0
  80. package/dist/types/index.d.ts.map +1 -0
  81. package/dist/types/utils/index.d.ts +2 -0
  82. package/dist/types/utils/index.d.ts.map +1 -0
  83. package/package.json +52 -0
@@ -0,0 +1,21 @@
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
+ export type EvokePortkeyByLinkDapp = PartialOption<Omit<schemeUtils.ILinkDappHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
11
+ export type EvokePortkeyByAddContact = PartialOption<Omit<schemeUtils.IAddContactHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
12
+ export type EvokePortkeyByAddGroup = PartialOption<Omit<schemeUtils.IAddGroupHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
13
+ export interface IEvokePortkeyApp {
14
+ evokePortkeyApp(params: EvokePortkeyByLogin): void;
15
+ evokePortkeyApp(params: EvokePortkeyByLinkDapp): void;
16
+ evokePortkeyApp(params: EvokePortkeyByAddContact): void;
17
+ evokePortkeyApp(params: EvokePortkeyByAddGroup): void;
18
+ }
19
+ export interface IEvokeExtensionProps {
20
+ openTarget?: '_self' | '_blank';
21
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from './evokeApp/index.js';
2
+ export * as Browser from './browser.js';
3
+ export * from './evokePortkey/index.js';
4
+ export * from './utils/index.js';
@@ -0,0 +1,4 @@
1
+ export * from './evokeApp/index.js';
2
+ export * as Browser from './browser.js';
3
+ export * from './evokePortkey/index.js';
4
+ export * from './utils/index.js';
@@ -0,0 +1 @@
1
+ {"type": "module"}
@@ -0,0 +1 @@
1
+ export declare const detectBrowserName: () => string;
@@ -0,0 +1,16 @@
1
+ import Bowser from 'bowser';
2
+ export const detectBrowserName = () => {
3
+ if (typeof navigator === 'undefined')
4
+ return '';
5
+ const browserInfo = Bowser.parse(window.navigator.userAgent);
6
+ if (browserInfo.browser.name === 'Firefox') {
7
+ return 'FIREFOX';
8
+ }
9
+ else if (['Chrome', 'Chromium'].includes(browserInfo.browser.name || '')) {
10
+ return 'CHROME';
11
+ }
12
+ else if (browserInfo.browser.name === 'Microsoft Edge') {
13
+ return 'EDGE';
14
+ }
15
+ return browserInfo.browser.name || '';
16
+ };
@@ -0,0 +1,6 @@
1
+ export declare const semverCompare: (verionA: string, versionB: string) => -1 | 0 | 1;
2
+ export declare const getIOSVersion: () => number;
3
+ export declare const isAndroid: boolean;
4
+ export declare const isIos: boolean;
5
+ export declare const isOriginalChrome: boolean;
6
+ //# sourceMappingURL=browser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../src/browser.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,YAAa,MAAM,YAAY,MAAM,KAAG,CAAC,CAAC,GAAG,CAAC,GAAG,CAkB1E,CAAC;AAEF,eAAO,MAAM,aAAa,cAOzB,CAAC;AAEF,eAAO,MAAM,SAAS,SAAsB,CAAC;AAE7C,eAAO,MAAM,KAAK,SAA+B,CAAC;AAElD,eAAO,MAAM,gBAAgB,SAC+D,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare const APP_DOWNLOAD_URL: {
2
+ APP_STORE: string;
3
+ CHROME_STORE: string;
4
+ };
5
+ export declare const EXTENSION_DOWNLOAD_URL: {
6
+ CHROME: string;
7
+ EDGE: string;
8
+ DEFAULT: string;
9
+ };
10
+ export declare const WEB_PAGE = "https://openlogin.portkey.finance";
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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;AAEF,eAAO,MAAM,QAAQ,sCAAsC,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { OpenStatus } from './types';
2
+ /**
3
+ * Jump via top.location.href
4
+ * @param {string} [uri] - open
5
+ */
6
+ export declare function evokeByLocation(uri: string): void;
7
+ /**
8
+ * Evoked by the A tag
9
+ * @param {string} uri - open url
10
+ */
11
+ export declare function evokeByTagA(uri: string): void;
12
+ /**
13
+ * Evoked by iframe
14
+ * @param {string} [uri] - open url
15
+ */
16
+ export declare function evokeByIFrame(uri: string): void;
17
+ /**
18
+ * Check whether the calling end is successful
19
+ * @param cb - Callback failure callback function
20
+ * @param timeout
21
+ */
22
+ export declare function checkOpen(callback: (status: OpenStatus) => void, timeout: number): void;
23
+ //# sourceMappingURL=evoke.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"evoke.d.ts","sourceRoot":"","sources":["../../../src/evokeApp/evoke.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,UAAU,EAAoB,MAAM,SAAS,CAAC;AAiC/D;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAIjD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAQ7C;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,CAQ/C;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,CAAC,MAAM,EAAE,UAAU,KAAK,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAuBvF"}
@@ -0,0 +1,6 @@
1
+ import { EvokeAppConfig, EvokeAppOptions } from './types';
2
+ export declare function buildScheme(config: EvokeAppConfig, options: EvokeAppOptions): string;
3
+ export declare function generateScheme(config: EvokeAppConfig, options: EvokeAppOptions): string;
4
+ export declare function generateIntent(config: EvokeAppConfig, options: EvokeAppOptions): string;
5
+ export declare function generateUniversalLink(config: EvokeAppConfig, options: EvokeAppOptions): string;
6
+ //# sourceMappingURL=generate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/evokeApp/generate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAU,MAAM,SAAS,CAAC;AAGlE,wBAAgB,WAAW,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,GAAG,MAAM,CAiBpF;AAGD,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,GAAG,MAAM,CAUvF;AAGD,wBAAgB,cAAc,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,GAAG,MAAM,CAkBvF;AAGD,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,GAAG,MAAM,CA0B9F"}
@@ -0,0 +1,22 @@
1
+ import { EvokeAppConfig, EvokeAppOptions } from './types';
2
+ export declare class EvokeApp {
3
+ private readonly options;
4
+ constructor(options: EvokeAppOptions);
5
+ /**
6
+ * register as method
7
+ * generateScheme | generateIntent | generateUniversalLink | checkOpen
8
+ */
9
+ generateScheme(config: EvokeAppConfig): string;
10
+ generateIntent(config: EvokeAppConfig): string;
11
+ generateUniversalLink(config: EvokeAppConfig): string;
12
+ checkOpen(): Promise<unknown>;
13
+ fallToAppStore(): void;
14
+ fallToFbUrl(): void;
15
+ fallToCustomCb(callback: () => void): void;
16
+ /**
17
+ * Evoke the client
18
+ * Execute different call-out strategies according to different browsers
19
+ */
20
+ open(config: EvokeAppConfig): void;
21
+ }
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/evokeApp/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1D,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAwC;gBAGpD,OAAO,EAAE,eAAe;IAKpC;;;OAGG;IACI,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM;IAI9C,cAAc,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM;IAI9C,qBAAqB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM;IAI5D,SAAS;IAYT,cAAc,IAAI,IAAI;IAKtB,WAAW,IAAI,IAAI;IAQnB,cAAc,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAI1C;;;OAGG;IACH,IAAI,CAAC,MAAM,EAAE,cAAc,GAAG,IAAI;CA2CnC"}
@@ -0,0 +1,38 @@
1
+ import { StringifiableRecord } from 'query-string';
2
+ export interface EvokeAppConfig<Params = StringifiableRecord> {
3
+ path: string;
4
+ param?: Params;
5
+ callback?: () => void;
6
+ }
7
+ export interface EvokeAppOptions {
8
+ scheme: {
9
+ protocol: string;
10
+ domain: string;
11
+ };
12
+ outChain?: {
13
+ protocol: string;
14
+ path: string;
15
+ key: string;
16
+ };
17
+ intent?: Intent;
18
+ universal?: {
19
+ domain: string;
20
+ pathKey?: string;
21
+ };
22
+ appStore: string;
23
+ fallback?: string;
24
+ timeout?: number;
25
+ logFunc?: (status: 'pending' | 'failure' | 'success') => void;
26
+ buildScheme?: (config: EvokeAppConfig, options: EvokeAppOptions) => string;
27
+ }
28
+ export interface Intent {
29
+ package: string;
30
+ scheme: string;
31
+ action?: string;
32
+ category?: string;
33
+ component?: string;
34
+ }
35
+ export type Hidden = 'hidden' | 'webkitHidden' | 'msHidden' | undefined;
36
+ export type VisibilityChange = 'visibilitychange' | 'webkitvisibilitychange' | 'msvisibilitychange' | undefined;
37
+ export type OpenStatus = 'failure' | 'success';
38
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/evokeApp/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD,MAAM,WAAW,cAAc,CAAC,MAAM,GAAG,mBAAmB;IAC1D,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE;QACN,QAAQ,EAAE,MAAM,CAAC;QACjB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,QAAQ,CAAC,EAAE;QACT,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACb,CAAC;IACF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE;QACV,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,KAAK,IAAI,CAAC;IAC9D,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,OAAO,EAAE,eAAe,KAAK,MAAM,CAAC;CAC5E;AAED,MAAM,WAAW,MAAM;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,cAAc,GAAG,UAAU,GAAG,SAAS,CAAC;AAExE,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,GAAG,wBAAwB,GAAG,oBAAoB,GAAG,SAAS,CAAC;AAEhH,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { IEvokeExtensionProps } from './types';
2
+ declare const checkPortkeyExtension: (params?: IEvokeExtensionProps) => Promise<boolean>;
3
+ export default checkPortkeyExtension;
4
+ //# sourceMappingURL=checkPortkeyExtension.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkPortkeyExtension.d.ts","sourceRoot":"","sources":["../../../src/evokePortkey/checkPortkeyExtension.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAe/C,QAAA,MAAM,qBAAqB,YAAmB,oBAAoB,qBAYjE,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,CACoB,CAAC;AAEpF,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { IEvokePortkeyApp } from './types';
2
+ declare const evokePortkeyApp: IEvokePortkeyApp['evokePortkeyApp'];
3
+ export default evokePortkeyApp;
4
+ //# sourceMappingURL=evokePortkeyApp.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,25 @@
1
+ export * from './types';
2
+ export declare const evokePortkey: {
3
+ app: {
4
+ (params: import("./types").EvokePortkeyByLogin): void;
5
+ (params: import("./types").EvokePortkeyByLinkDapp): void;
6
+ (params: import("./types").EvokePortkeyByAddContact): void;
7
+ (params: import("./types").EvokePortkeyByAddGroup): void;
8
+ };
9
+ extension: (params?: import("./types").IEvokeExtensionProps | undefined) => Promise<boolean>;
10
+ thirdParty: {
11
+ (params?: ({
12
+ action: "login";
13
+ custom: any;
14
+ } & {
15
+ timeout?: number | undefined;
16
+ }) | undefined): Promise<any>;
17
+ (params?: ({
18
+ action: "linkDapp";
19
+ custom: import("@portkey/utils/dist/commonjs/scheme").LinkDappData;
20
+ } & {
21
+ timeout?: number | undefined;
22
+ }) | undefined): Promise<any>;
23
+ };
24
+ };
25
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,22 @@
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
+ export type EvokePortkeyByLinkDapp = PartialOption<Omit<schemeUtils.ILinkDappHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
11
+ export type EvokePortkeyByAddContact = PartialOption<Omit<schemeUtils.IAddContactHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
12
+ export type EvokePortkeyByAddGroup = PartialOption<Omit<schemeUtils.IAddGroupHandleSchemeParams, 'scheme'>, 'domain'> & IBaseEvokeAppOption;
13
+ export interface IEvokePortkeyApp {
14
+ evokePortkeyApp(params: EvokePortkeyByLogin): void;
15
+ evokePortkeyApp(params: EvokePortkeyByLinkDapp): void;
16
+ evokePortkeyApp(params: EvokePortkeyByAddContact): void;
17
+ evokePortkeyApp(params: EvokePortkeyByAddGroup): void;
18
+ }
19
+ export interface IEvokeExtensionProps {
20
+ openTarget?: '_self' | '_blank';
21
+ }
22
+ //# 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,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,2BAA2B,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,GACnH,mBAAmB,CAAC;AAEtB,MAAM,MAAM,wBAAwB,GAAG,aAAa,CAClD,IAAI,CAAC,WAAW,CAAC,6BAA6B,EAAE,QAAQ,CAAC,EACzD,QAAQ,CACT,GACC,mBAAmB,CAAC;AAEtB,MAAM,MAAM,sBAAsB,GAAG,aAAa,CAAC,IAAI,CAAC,WAAW,CAAC,2BAA2B,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,GACnH,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;IACtD,eAAe,CAAC,MAAM,EAAE,wBAAwB,GAAG,IAAI,CAAC;IACxD,eAAe,CAAC,MAAM,EAAE,sBAAsB,GAAG,IAAI,CAAC;CACvD;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CACjC"}
@@ -0,0 +1,5 @@
1
+ export * from './evokeApp';
2
+ export * as Browser from './browser';
3
+ export * from './evokePortkey';
4
+ export * from './utils';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const detectBrowserName: () => string;
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,cAW7B,CAAC"}
package/package.json ADDED
@@ -0,0 +1,52 @@
1
+ {
2
+ "name": "@portkey/onboarding",
3
+ "version": "0.0.2-alpha.2",
4
+ "description": "",
5
+ "main": "./dist/commonjs/index.js",
6
+ "module": "./dist/esm/index.js",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/types/index.d.ts",
10
+ "import": "./dist/esm/index.js",
11
+ "require": "./dist/commonjs/index.js"
12
+ }
13
+ },
14
+ "author": "",
15
+ "license": "ISC",
16
+ "publishConfig": {
17
+ "access": "public",
18
+ "registry": "https://registry.npmjs.org"
19
+ },
20
+ "files": [
21
+ "dist/*"
22
+ ],
23
+ "homepage": "https://portkey.finance/",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "https://github.com/Portkey-Wallet/portkey-web.git",
27
+ "directory": "packages/utils"
28
+ },
29
+ "scripts": {
30
+ "clean": "rm -rf dist",
31
+ "prebuild": "yarn clean",
32
+ "build": "yarn build:cjs & yarn build:esm & yarn build:types",
33
+ "build:cjs": "tsc && echo '{\"type\": \"commonjs\"}' > ./dist/commonjs/package.json",
34
+ "build:esm": "tsc --build tsconfig.esm.json && echo '{\"type\": \"module\"}' > ./dist/esm/package.json && yarn esm:fix",
35
+ "build:types": "tsc --build tsconfig.types.json",
36
+ "esm:fix": "node ../../scripts/fix-esm.js dist/esm",
37
+ "lint": "eslint --ext .js,.ts .",
38
+ "lint:fix": "eslint --fix --ext .js,.ts .",
39
+ "format": "prettier --write '**/*'",
40
+ "start": "tsc --watch"
41
+ },
42
+ "dependencies": {
43
+ "@portkey/detect-provider": "^1.1.1-alpha.1 ",
44
+ "bowser": "^2.11.0"
45
+ },
46
+ "peerDependencies": {
47
+ "@portkey/types": "^1.5.1",
48
+ "@portkey/utils": "^1.5.1",
49
+ "query-string": "^7.1.1"
50
+ },
51
+ "gitHead": "f47ad5bac9db1797d7c86639f4bfca105528452d"
52
+ }