@matchain/matchid-sdk-react 0.1.42-alpha.16 → 0.1.42-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 (71) hide show
  1. package/dist/assets/icon/index.d.mts +1 -1
  2. package/dist/assets/icon/index.d.ts +1 -1
  3. package/dist/{chunk-WCS3X2LC.mjs → chunk-2YN5Y3SM.mjs} +2 -2
  4. package/dist/chunk-PZPEWHBV.mjs +4251 -0
  5. package/dist/chunk-PZPEWHBV.mjs.map +1 -0
  6. package/dist/components/index.d.mts +2 -3
  7. package/dist/components/index.d.ts +2 -3
  8. package/dist/components/index.js +486 -770
  9. package/dist/components/index.js.map +1 -1
  10. package/dist/components/index.mjs +3 -8
  11. package/dist/hooks/api/index.d.mts +2 -2
  12. package/dist/hooks/api/index.d.ts +2 -2
  13. package/dist/hooks/api/index.js +78 -137
  14. package/dist/hooks/api/index.js.map +1 -1
  15. package/dist/hooks/api/index.mjs +2 -3
  16. package/dist/hooks/index.d.mts +2 -5
  17. package/dist/hooks/index.d.ts +2 -5
  18. package/dist/hooks/index.js +158 -362
  19. package/dist/hooks/index.js.map +1 -1
  20. package/dist/hooks/index.mjs +1 -2
  21. package/dist/index-B4YpKSY3.d.ts +94 -0
  22. package/dist/{index-CLvQH5gM.d.ts → index-CxY3u9Rv.d.ts} +12 -32
  23. package/dist/{index-DlhAHm_s.d.mts → index-DCReY5T2.d.mts} +12 -32
  24. package/dist/{index-Ca9nh_8s.d.ts → index-DbjibQ5d.d.mts} +1 -1
  25. package/dist/{index-DFZpfAfc.d.mts → index-GcpJCj6O.d.ts} +1 -1
  26. package/dist/index-_k6h9w0P.d.mts +94 -0
  27. package/dist/index.css +4 -84
  28. package/dist/index.d.mts +5 -9
  29. package/dist/index.d.ts +5 -9
  30. package/dist/index.js +669 -1183
  31. package/dist/index.js.map +1 -1
  32. package/dist/index.mjs +2 -6
  33. package/dist/types.d-DwF-Pkvh.d.mts +179 -0
  34. package/dist/types.d-DwF-Pkvh.d.ts +179 -0
  35. package/example/package.json +0 -1
  36. package/example/src/App.tsx +28 -54
  37. package/example/src/components/Login/index.tsx +2 -2
  38. package/example/src/components/RoutePrivate/index.tsx +3 -4
  39. package/example/src/config/index.ts +2 -7
  40. package/example/src/pages/{User/index.tsx → User.tsx} +84 -55
  41. package/example/src/pages/Wallet.tsx +43 -258
  42. package/example/tsconfig.json +0 -1
  43. package/package.json +2 -7
  44. package/dist/chunk-SQIJR7RA.mjs +0 -29
  45. package/dist/chunk-SQIJR7RA.mjs.map +0 -1
  46. package/dist/chunk-UCIEZ3XI.mjs +0 -4747
  47. package/dist/chunk-UCIEZ3XI.mjs.map +0 -1
  48. package/dist/index-Bluim2ZP.d.mts +0 -143
  49. package/dist/index-BxS06a5O.d.ts +0 -50
  50. package/dist/index-EqksEEto.d.ts +0 -143
  51. package/dist/index-q5XDobUF.d.mts +0 -50
  52. package/dist/mpc-CTbBWHld.d.mts +0 -20
  53. package/dist/mpc-CTbBWHld.d.ts +0 -20
  54. package/dist/types/index.d.mts +0 -3
  55. package/dist/types/index.d.ts +0 -3
  56. package/dist/types/index.js +0 -44
  57. package/dist/types/index.js.map +0 -1
  58. package/dist/types/index.mjs +0 -10
  59. package/dist/types/index.mjs.map +0 -1
  60. package/dist/types-CVwZEgQ0.d.mts +0 -244
  61. package/dist/types-CVwZEgQ0.d.ts +0 -244
  62. package/example/src/abi/erc20.json +0 -222
  63. package/example/src/components/ButtonGroup/index.tsx +0 -10
  64. package/example/src/config/chains/index.ts +0 -2
  65. package/example/src/config/chains/matchMain.ts +0 -27
  66. package/example/src/config/chains/matchTest.ts +0 -33
  67. package/example/src/pages/User/components/BindListModal.tsx +0 -10
  68. package/example/src/pages/User/components/PohListModal.tsx +0 -10
  69. package/example/src/pages/User/components/QueryDisplay.tsx +0 -25
  70. package/example/src/store/useLocalStore.ts +0 -51
  71. /package/dist/{chunk-WCS3X2LC.mjs.map → chunk-2YN5Y3SM.mjs.map} +0 -0
@@ -4,8 +4,7 @@ import {
4
4
  useMatchEvents,
5
5
  useUserInfo,
6
6
  useWallet
7
- } from "../chunk-UCIEZ3XI.mjs";
8
- import "../chunk-SQIJR7RA.mjs";
7
+ } from "../chunk-PZPEWHBV.mjs";
9
8
  import "../chunk-DPXMCLYK.mjs";
10
9
  import "../chunk-J5LGTIGS.mjs";
11
10
  export {
@@ -0,0 +1,94 @@
1
+ import { j as ISocialLoginMethod, k as OverviewInfo, C as CEXType, l as LoginMethodType, I as IMatchEvents } from './types.d-DwF-Pkvh.js';
2
+ import * as viem from 'viem';
3
+ import { SignableMessage, Hex, TransactionSerializable, Account } from 'viem';
4
+
5
+ declare const LOGIN_METHOD_MAP: {
6
+ email: string;
7
+ evm: string;
8
+ sol: string;
9
+ btc: string;
10
+ ton: string;
11
+ tron: string;
12
+ google: string;
13
+ facebook: string;
14
+ x: string;
15
+ telegram: string;
16
+ github: string;
17
+ discord: string;
18
+ linkedin: string;
19
+ youtube: string;
20
+ };
21
+
22
+ declare function useUserInfo(): {
23
+ loginByMethod: (method: ISocialLoginMethod) => Promise<Window | null>;
24
+ loginByTelegram: () => Promise<Window | null>;
25
+ loginByTwitter: () => Promise<Window | null>;
26
+ loginByGoogle: () => Promise<Window | null>;
27
+ loginByWallet: () => Promise<Window | null>;
28
+ loginByEmail: ({ email, code }: {
29
+ email: string;
30
+ code: string;
31
+ }) => Promise<boolean>;
32
+ bindWallet: () => Promise<Window | null>;
33
+ bindTelegram: () => Promise<void>;
34
+ token: string;
35
+ mid: string;
36
+ did: string;
37
+ address: string;
38
+ isLogin: boolean;
39
+ logout: () => Promise<void>;
40
+ getLoginEmailCode: (email: string) => Promise<string>;
41
+ refreshOverview: () => Promise<void>;
42
+ overview: OverviewInfo | null;
43
+ bindCex: (type: CEXType) => void;
44
+ username: string;
45
+ auth: () => Promise<any>;
46
+ login: (method: LoginMethodType) => Promise<void | Window | null>;
47
+ bind: (method: LoginMethodType) => Promise<void | Window | null>;
48
+ getAuthInfo: (method: keyof typeof LOGIN_METHOD_MAP) => Promise<unknown>;
49
+ };
50
+
51
+ declare function useMatchEvents(handlers: IMatchEvents): void;
52
+
53
+ type ChainType = "ethereum" | "solana";
54
+ type RecoveryType = "base_generated_recovery_key" | "user_passcode_recovery_key"
55
+
56
+ interface UseWalletReturnType {
57
+ initWallet: (params: {
58
+ address: string;
59
+ did: string;
60
+ }) => Promise<void>;
61
+ generateWallet: (params: {
62
+ did: string;
63
+ userPasscode: string;
64
+ recoveryType?: RecoveryType;
65
+ }) => Promise<string>;
66
+ isRecovered: () => Promise<boolean>;
67
+ recoveryWallet: (chainType: ChainType | undefined, recoveryType: RecoveryType, userPasscode?: string) => Promise<void>;
68
+ signMessage: (message: SignableMessage, type?: ChainType) => Promise<Hex>;
69
+ signTransaction: (transaction: TransactionSerializable, type?: ChainType) => Promise<`0x02${string}` | `0x01${string}` | `0x03${string}` | `0x04${string}` | viem.TransactionSerializedLegacy>;
70
+ address: string;
71
+ evmAccount: Account | undefined;
72
+ recoverAfter: (func: (resolve: (value: any) => void, reject: (reason: string) => void) => Promise<any>) => Promise<any>;
73
+ }
74
+ declare function useWallet(): UseWalletReturnType;
75
+
76
+ declare function useCopyClipboard(timeout?: number): [boolean, (toCopy: string) => void];
77
+
78
+ declare function useDownMd(): boolean;
79
+
80
+ declare const useLayout_useDownMd: typeof useDownMd;
81
+ declare namespace useLayout {
82
+ export { useLayout_useDownMd as useDownMd };
83
+ }
84
+
85
+ declare const index_useCopyClipboard: typeof useCopyClipboard;
86
+ declare const index_useLayout: typeof useLayout;
87
+ declare const index_useMatchEvents: typeof useMatchEvents;
88
+ declare const index_useUserInfo: typeof useUserInfo;
89
+ declare const index_useWallet: typeof useWallet;
90
+ declare namespace index {
91
+ export { index_useCopyClipboard as useCopyClipboard, index_useLayout as useLayout, index_useMatchEvents as useMatchEvents, index_useUserInfo as useUserInfo, index_useWallet as useWallet };
92
+ }
93
+
94
+ export { useMatchEvents as a, useWallet as b, useCopyClipboard as c, useLayout as d, index as i, useUserInfo as u };
@@ -1,7 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { E as EmailModalProps, b as InputProps, B as ButtonProps, M as ModalProps, c as ModalWithHeaderProps, P as PopoverProps, d as LoginBoxProps, O as OtherLoginMethodType, R as RecommendLoginMethodType, e as WalletType, f as PopoverPositionType, g as PopoverTypeType, h as LoginPanelProps, i as LoginModalProps } from './types-CVwZEgQ0.js';
2
+ import { E as EmailModalProps, b as InputProps, B as ButtonProps, M as ModalProps, c as ModalWithHeaderProps, P as PopoverProps, d as LoginBoxProps, O as OtherLoginMethodType, R as RecommendLoginMethodType, e as WalletType, f as PopoverPositionType, g as PopoverTypeType, h as LoginPanelProps, i as LoginModalProps } from './types.d-DwF-Pkvh.js';
3
3
  import { ReactNode, PropsWithChildren } from 'react';
4
- import { C as ChainType, R as RecoveryType } from './mpc-CTbBWHld.js';
5
4
 
6
5
  declare function EmailModal({ isOpen, width, onClose, onBack, onLogin }: EmailModalProps): react_jsx_runtime.JSX.Element;
7
6
 
@@ -42,46 +41,29 @@ declare function UsernameModal({ title, isOpen, onSuccess, ...props }: ModalWith
42
41
  onSuccess?: () => void;
43
42
  }): react_jsx_runtime.JSX.Element;
44
43
 
45
- declare function PasswordModal({ title, isOpen, onSuccess, chainType, recoveryType, ...props }: ModalWithHeaderProps & {
44
+ declare function PasswordModal({ title, isOpen, onSuccess, ...props }: ModalWithHeaderProps & {
46
45
  onSuccess?: () => void;
47
- chainType?: `${ChainType}`;
48
- recoveryType?: `${RecoveryType}`;
49
46
  }): react_jsx_runtime.JSX.Element;
50
47
 
51
- type SOLModalProps = ModalWithHeaderProps & {
48
+ declare function SOLModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
52
49
  type?: 'login' | 'bind' | '';
53
50
  onSuccess?: () => void;
54
- };
55
- declare function SOLModal(props: SOLModalProps): false | react_jsx_runtime.JSX.Element;
51
+ }): react_jsx_runtime.JSX.Element;
56
52
 
57
- type TRONConnectModalProps = ModalWithHeaderProps & {
53
+ declare function TRONModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
58
54
  type?: 'login' | 'bind' | '';
59
55
  onSuccess?: () => void;
60
- };
61
- declare function TRONModal(props: TRONConnectModalProps): false | react_jsx_runtime.JSX.Element;
56
+ }): react_jsx_runtime.JSX.Element;
62
57
 
63
- type TonModalProps = ModalWithHeaderProps & {
58
+ declare function TONModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
64
59
  type?: 'login' | 'bind' | '';
65
60
  onSuccess?: () => void;
66
- };
67
- declare function TONModal(props: TonModalProps): false | react_jsx_runtime.JSX.Element;
61
+ }): react_jsx_runtime.JSX.Element;
68
62
 
69
- type BTCConnectModalProps = ModalWithHeaderProps & {
63
+ declare function BTCModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
70
64
  type?: 'login' | 'bind' | '';
71
65
  onSuccess?: () => void;
72
- };
73
- declare function BTCModal(props: BTCConnectModalProps): false | react_jsx_runtime.JSX.Element;
74
-
75
- declare function Overlay({ isOpen, children, zIndex, }: {
76
- isOpen?: boolean;
77
- zIndex?: number;
78
- } & PropsWithChildren): react_jsx_runtime.JSX.Element;
79
-
80
- type WalletModalProps = ModalWithHeaderProps & {
81
- type?: 'login' | 'bind' | '';
82
- methods?: WalletType[];
83
- };
84
- declare function WalletModal(props: WalletModalProps): false | react_jsx_runtime.JSX.Element;
66
+ }): react_jsx_runtime.JSX.Element;
85
67
 
86
68
  declare const index_BTCModal: typeof BTCModal;
87
69
  declare const index_Button: typeof Button;
@@ -94,16 +76,14 @@ declare const index_LoginModal: typeof LoginModal;
94
76
  declare const index_LoginPanel: typeof LoginPanel;
95
77
  declare const index_Modal: typeof Modal;
96
78
  declare const index_ModalWithHeader: typeof ModalWithHeader;
97
- declare const index_Overlay: typeof Overlay;
98
79
  declare const index_PasswordModal: typeof PasswordModal;
99
80
  declare const index_Popover: typeof Popover;
100
81
  declare const index_SOLModal: typeof SOLModal;
101
82
  declare const index_TONModal: typeof TONModal;
102
83
  declare const index_TRONModal: typeof TRONModal;
103
84
  declare const index_UsernameModal: typeof UsernameModal;
104
- declare const index_WalletModal: typeof WalletModal;
105
85
  declare namespace index {
106
- export { index_BTCModal as BTCModal, index_Button as Button, index_EmailModal as EmailModal, index_Field as Field, index_Input as Input, index_LoginBox as LoginBox, index_LoginButton as LoginButton, index_LoginModal as LoginModal, index_LoginPanel as LoginPanel, index_Modal as Modal, index_ModalWithHeader as ModalWithHeader, index_Overlay as Overlay, index_PasswordModal as PasswordModal, index_Popover as Popover, index_SOLModal as SOLModal, index_TONModal as TONModal, index_TRONModal as TRONModal, index_UsernameModal as UsernameModal, index_WalletModal as WalletModal };
86
+ export { index_BTCModal as BTCModal, index_Button as Button, index_EmailModal as EmailModal, index_Field as Field, index_Input as Input, index_LoginBox as LoginBox, index_LoginButton as LoginButton, index_LoginModal as LoginModal, index_LoginPanel as LoginPanel, index_Modal as Modal, index_ModalWithHeader as ModalWithHeader, index_PasswordModal as PasswordModal, index_Popover as Popover, index_SOLModal as SOLModal, index_TONModal as TONModal, index_TRONModal as TRONModal, index_UsernameModal as UsernameModal };
107
87
  }
108
88
 
109
- export { Button as B, EmailModal as E, Field as F, Input as I, LoginBox as L, Modal as M, Overlay as O, Popover as P, SOLModal as S, TRONModal as T, UsernameModal as U, WalletModal as W, ModalWithHeader as a, LoginButton as b, LoginPanel as c, LoginModal as d, PasswordModal as e, TONModal as f, BTCModal as g, index as i };
89
+ export { Button as B, EmailModal as E, Field as F, Input as I, LoginBox as L, Modal as M, Popover as P, SOLModal as S, TRONModal as T, UsernameModal as U, ModalWithHeader as a, LoginButton as b, LoginPanel as c, LoginModal as d, PasswordModal as e, TONModal as f, BTCModal as g, index as i };
@@ -1,7 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { E as EmailModalProps, b as InputProps, B as ButtonProps, M as ModalProps, c as ModalWithHeaderProps, P as PopoverProps, d as LoginBoxProps, O as OtherLoginMethodType, R as RecommendLoginMethodType, e as WalletType, f as PopoverPositionType, g as PopoverTypeType, h as LoginPanelProps, i as LoginModalProps } from './types-CVwZEgQ0.mjs';
2
+ import { E as EmailModalProps, b as InputProps, B as ButtonProps, M as ModalProps, c as ModalWithHeaderProps, P as PopoverProps, d as LoginBoxProps, O as OtherLoginMethodType, R as RecommendLoginMethodType, e as WalletType, f as PopoverPositionType, g as PopoverTypeType, h as LoginPanelProps, i as LoginModalProps } from './types.d-DwF-Pkvh.mjs';
3
3
  import { ReactNode, PropsWithChildren } from 'react';
4
- import { C as ChainType, R as RecoveryType } from './mpc-CTbBWHld.mjs';
5
4
 
6
5
  declare function EmailModal({ isOpen, width, onClose, onBack, onLogin }: EmailModalProps): react_jsx_runtime.JSX.Element;
7
6
 
@@ -42,46 +41,29 @@ declare function UsernameModal({ title, isOpen, onSuccess, ...props }: ModalWith
42
41
  onSuccess?: () => void;
43
42
  }): react_jsx_runtime.JSX.Element;
44
43
 
45
- declare function PasswordModal({ title, isOpen, onSuccess, chainType, recoveryType, ...props }: ModalWithHeaderProps & {
44
+ declare function PasswordModal({ title, isOpen, onSuccess, ...props }: ModalWithHeaderProps & {
46
45
  onSuccess?: () => void;
47
- chainType?: `${ChainType}`;
48
- recoveryType?: `${RecoveryType}`;
49
46
  }): react_jsx_runtime.JSX.Element;
50
47
 
51
- type SOLModalProps = ModalWithHeaderProps & {
48
+ declare function SOLModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
52
49
  type?: 'login' | 'bind' | '';
53
50
  onSuccess?: () => void;
54
- };
55
- declare function SOLModal(props: SOLModalProps): false | react_jsx_runtime.JSX.Element;
51
+ }): react_jsx_runtime.JSX.Element;
56
52
 
57
- type TRONConnectModalProps = ModalWithHeaderProps & {
53
+ declare function TRONModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
58
54
  type?: 'login' | 'bind' | '';
59
55
  onSuccess?: () => void;
60
- };
61
- declare function TRONModal(props: TRONConnectModalProps): false | react_jsx_runtime.JSX.Element;
56
+ }): react_jsx_runtime.JSX.Element;
62
57
 
63
- type TonModalProps = ModalWithHeaderProps & {
58
+ declare function TONModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
64
59
  type?: 'login' | 'bind' | '';
65
60
  onSuccess?: () => void;
66
- };
67
- declare function TONModal(props: TonModalProps): false | react_jsx_runtime.JSX.Element;
61
+ }): react_jsx_runtime.JSX.Element;
68
62
 
69
- type BTCConnectModalProps = ModalWithHeaderProps & {
63
+ declare function BTCModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
70
64
  type?: 'login' | 'bind' | '';
71
65
  onSuccess?: () => void;
72
- };
73
- declare function BTCModal(props: BTCConnectModalProps): false | react_jsx_runtime.JSX.Element;
74
-
75
- declare function Overlay({ isOpen, children, zIndex, }: {
76
- isOpen?: boolean;
77
- zIndex?: number;
78
- } & PropsWithChildren): react_jsx_runtime.JSX.Element;
79
-
80
- type WalletModalProps = ModalWithHeaderProps & {
81
- type?: 'login' | 'bind' | '';
82
- methods?: WalletType[];
83
- };
84
- declare function WalletModal(props: WalletModalProps): false | react_jsx_runtime.JSX.Element;
66
+ }): react_jsx_runtime.JSX.Element;
85
67
 
86
68
  declare const index_BTCModal: typeof BTCModal;
87
69
  declare const index_Button: typeof Button;
@@ -94,16 +76,14 @@ declare const index_LoginModal: typeof LoginModal;
94
76
  declare const index_LoginPanel: typeof LoginPanel;
95
77
  declare const index_Modal: typeof Modal;
96
78
  declare const index_ModalWithHeader: typeof ModalWithHeader;
97
- declare const index_Overlay: typeof Overlay;
98
79
  declare const index_PasswordModal: typeof PasswordModal;
99
80
  declare const index_Popover: typeof Popover;
100
81
  declare const index_SOLModal: typeof SOLModal;
101
82
  declare const index_TONModal: typeof TONModal;
102
83
  declare const index_TRONModal: typeof TRONModal;
103
84
  declare const index_UsernameModal: typeof UsernameModal;
104
- declare const index_WalletModal: typeof WalletModal;
105
85
  declare namespace index {
106
- export { index_BTCModal as BTCModal, index_Button as Button, index_EmailModal as EmailModal, index_Field as Field, index_Input as Input, index_LoginBox as LoginBox, index_LoginButton as LoginButton, index_LoginModal as LoginModal, index_LoginPanel as LoginPanel, index_Modal as Modal, index_ModalWithHeader as ModalWithHeader, index_Overlay as Overlay, index_PasswordModal as PasswordModal, index_Popover as Popover, index_SOLModal as SOLModal, index_TONModal as TONModal, index_TRONModal as TRONModal, index_UsernameModal as UsernameModal, index_WalletModal as WalletModal };
86
+ export { index_BTCModal as BTCModal, index_Button as Button, index_EmailModal as EmailModal, index_Field as Field, index_Input as Input, index_LoginBox as LoginBox, index_LoginButton as LoginButton, index_LoginModal as LoginModal, index_LoginPanel as LoginPanel, index_Modal as Modal, index_ModalWithHeader as ModalWithHeader, index_PasswordModal as PasswordModal, index_Popover as Popover, index_SOLModal as SOLModal, index_TONModal as TONModal, index_TRONModal as TRONModal, index_UsernameModal as UsernameModal };
107
87
  }
108
88
 
109
- export { Button as B, EmailModal as E, Field as F, Input as I, LoginBox as L, Modal as M, Overlay as O, Popover as P, SOLModal as S, TRONModal as T, UsernameModal as U, WalletModal as W, ModalWithHeader as a, LoginButton as b, LoginPanel as c, LoginModal as d, PasswordModal as e, TONModal as f, BTCModal as g, index as i };
89
+ export { Button as B, EmailModal as E, Field as F, Input as I, LoginBox as L, Modal as M, Popover as P, SOLModal as S, TRONModal as T, UsernameModal as U, ModalWithHeader as a, LoginButton as b, LoginPanel as c, LoginModal as d, PasswordModal as e, TONModal as f, BTCModal as g, index as i };
@@ -1,6 +1,6 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { UseQueryOptions } from '@tanstack/react-query/src/types';
3
- import { v as PohZkpassParams, n as BindItemType, m as BindInfoType, u as PohItemType } from './types-CVwZEgQ0.js';
3
+ import { n as PohZkpassParams, o as BindItemType, p as BindInfoType, q as PohItemType } from './types.d-DwF-Pkvh.mjs';
4
4
 
5
5
  interface MyResponseType<T> {
6
6
  code: number;
@@ -1,6 +1,6 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
2
  import { UseQueryOptions } from '@tanstack/react-query/src/types';
3
- import { v as PohZkpassParams, n as BindItemType, m as BindInfoType, u as PohItemType } from './types-CVwZEgQ0.mjs';
3
+ import { n as PohZkpassParams, o as BindItemType, p as BindInfoType, q as PohItemType } from './types.d-DwF-Pkvh.js';
4
4
 
5
5
  interface MyResponseType<T> {
6
6
  code: number;
@@ -0,0 +1,94 @@
1
+ import { j as ISocialLoginMethod, k as OverviewInfo, C as CEXType, l as LoginMethodType, I as IMatchEvents } from './types.d-DwF-Pkvh.mjs';
2
+ import * as viem from 'viem';
3
+ import { SignableMessage, Hex, TransactionSerializable, Account } from 'viem';
4
+
5
+ declare const LOGIN_METHOD_MAP: {
6
+ email: string;
7
+ evm: string;
8
+ sol: string;
9
+ btc: string;
10
+ ton: string;
11
+ tron: string;
12
+ google: string;
13
+ facebook: string;
14
+ x: string;
15
+ telegram: string;
16
+ github: string;
17
+ discord: string;
18
+ linkedin: string;
19
+ youtube: string;
20
+ };
21
+
22
+ declare function useUserInfo(): {
23
+ loginByMethod: (method: ISocialLoginMethod) => Promise<Window | null>;
24
+ loginByTelegram: () => Promise<Window | null>;
25
+ loginByTwitter: () => Promise<Window | null>;
26
+ loginByGoogle: () => Promise<Window | null>;
27
+ loginByWallet: () => Promise<Window | null>;
28
+ loginByEmail: ({ email, code }: {
29
+ email: string;
30
+ code: string;
31
+ }) => Promise<boolean>;
32
+ bindWallet: () => Promise<Window | null>;
33
+ bindTelegram: () => Promise<void>;
34
+ token: string;
35
+ mid: string;
36
+ did: string;
37
+ address: string;
38
+ isLogin: boolean;
39
+ logout: () => Promise<void>;
40
+ getLoginEmailCode: (email: string) => Promise<string>;
41
+ refreshOverview: () => Promise<void>;
42
+ overview: OverviewInfo | null;
43
+ bindCex: (type: CEXType) => void;
44
+ username: string;
45
+ auth: () => Promise<any>;
46
+ login: (method: LoginMethodType) => Promise<void | Window | null>;
47
+ bind: (method: LoginMethodType) => Promise<void | Window | null>;
48
+ getAuthInfo: (method: keyof typeof LOGIN_METHOD_MAP) => Promise<unknown>;
49
+ };
50
+
51
+ declare function useMatchEvents(handlers: IMatchEvents): void;
52
+
53
+ type ChainType = "ethereum" | "solana";
54
+ type RecoveryType = "base_generated_recovery_key" | "user_passcode_recovery_key"
55
+
56
+ interface UseWalletReturnType {
57
+ initWallet: (params: {
58
+ address: string;
59
+ did: string;
60
+ }) => Promise<void>;
61
+ generateWallet: (params: {
62
+ did: string;
63
+ userPasscode: string;
64
+ recoveryType?: RecoveryType;
65
+ }) => Promise<string>;
66
+ isRecovered: () => Promise<boolean>;
67
+ recoveryWallet: (chainType: ChainType | undefined, recoveryType: RecoveryType, userPasscode?: string) => Promise<void>;
68
+ signMessage: (message: SignableMessage, type?: ChainType) => Promise<Hex>;
69
+ signTransaction: (transaction: TransactionSerializable, type?: ChainType) => Promise<`0x02${string}` | `0x01${string}` | `0x03${string}` | `0x04${string}` | viem.TransactionSerializedLegacy>;
70
+ address: string;
71
+ evmAccount: Account | undefined;
72
+ recoverAfter: (func: (resolve: (value: any) => void, reject: (reason: string) => void) => Promise<any>) => Promise<any>;
73
+ }
74
+ declare function useWallet(): UseWalletReturnType;
75
+
76
+ declare function useCopyClipboard(timeout?: number): [boolean, (toCopy: string) => void];
77
+
78
+ declare function useDownMd(): boolean;
79
+
80
+ declare const useLayout_useDownMd: typeof useDownMd;
81
+ declare namespace useLayout {
82
+ export { useLayout_useDownMd as useDownMd };
83
+ }
84
+
85
+ declare const index_useCopyClipboard: typeof useCopyClipboard;
86
+ declare const index_useLayout: typeof useLayout;
87
+ declare const index_useMatchEvents: typeof useMatchEvents;
88
+ declare const index_useUserInfo: typeof useUserInfo;
89
+ declare const index_useWallet: typeof useWallet;
90
+ declare namespace index {
91
+ export { index_useCopyClipboard as useCopyClipboard, index_useLayout as useLayout, index_useMatchEvents as useMatchEvents, index_useUserInfo as useUserInfo, index_useWallet as useWallet };
92
+ }
93
+
94
+ export { useMatchEvents as a, useWallet as b, useCopyClipboard as c, useLayout as d, index as i, useUserInfo as u };
package/dist/index.css CHANGED
@@ -587,7 +587,6 @@ body {
587
587
  cursor: not-allowed;
588
588
  background: var(--matchid-btn-disabled-bg);
589
589
  color: var(--matchid-btn-disabled-color);
590
- border-width: 0px;
591
590
  }
592
591
 
593
592
  .matchid-btn-loading {
@@ -812,7 +811,6 @@ body {
812
811
  display: none;
813
812
  position: absolute;
814
813
  z-index: 100;
815
-
816
814
  .matchid-popover-content {
817
815
  background: var(--matchid-popover-bg);
818
816
  box-shadow: var(--matchid-shadow-middle);
@@ -828,13 +826,13 @@ body {
828
826
  }
829
827
 
830
828
  &.matchid-popover-click-active {
831
- .matchid-popover-area {
829
+ .matchid-popover-area{
832
830
  display: block;
833
831
  }
834
832
  }
835
833
 
836
834
  &.matchid-popover-hover:hover {
837
- .matchid-popover-area {
835
+ .matchid-popover-area{
838
836
  display: block;
839
837
  }
840
838
  }
@@ -947,87 +945,9 @@ body {
947
945
  padding-right: 0;
948
946
  }
949
947
 
950
- .matchid-cex-modal {
948
+ .matchid-cex-modal{
951
949
  font-size: 14px;
952
950
  display: flex;
953
951
  flex-direction: column;
954
- gap: 12px;
955
- }
956
-
957
- .matchid-drawer {
958
-
959
- width: 416px;
960
- height: 100vh;
961
- padding: 24px 24px 0;
962
- background: #FFFFFF;
963
- display: flex;
964
- gap: 48px;
965
- position: absolute;
966
- top: 0;
967
- right: 0;
968
- transition: all 0.3s;
969
- flex-direction: column;
970
- border-left: 1px solid #D3D3D3;
971
- box-shadow: -20px 0px 20px 0px rgba(22, 17, 46, 0.12);
972
- .matchid-drawer-header{
973
- display: flex;
974
- justify-content: flex-end;
975
- .matchid-drawer-header-close{
976
- cursor: pointer;
977
- }
978
- }
979
- }
980
- .matchid-hashpanel-header{
981
- font-size: 16px;
982
- font-weight: 500;
983
- display: block;
984
- @media screen and (min-width: 768px) {
985
- display: none;
986
- }
987
- }
988
-
989
- .matchid-hashpanel-box{
990
- display: flex;
991
- flex-direction: column;
992
- gap:36px;
993
- align-items: center;
994
- @media screen and (min-width: 768px) {
995
- justify-content: space-between;
996
- flex: 1;
997
- padding-bottom: 120px;
998
- }
999
- .matchid-hashpanel-content{
1000
- display: flex;
1001
- flex-direction: column;
1002
- gap: 24px;
1003
- align-items: center;
1004
- width: 100%;
1005
- @media screen and (min-width: 768px) {
1006
- gap: 48px;
1007
- }
1008
- .matchid-hashpanel-status{
1009
- font-size: 24px;
1010
- font-weight: 500;
1011
- display: none;
1012
- @media screen and (min-width: 768px) {
1013
- display: block;
1014
- }
1015
- }
1016
- .matchid-hashpanel-img{
1017
- width:96px;
1018
- height: 96px;
1019
- }
1020
- .matchid-hashpanel-hash{
1021
- width: 100%;
1022
- font-size: 14px;
1023
- word-break: break-all;
1024
- @media screen and (min-width: 768px){
1025
- font-size: 16px;
1026
- }
1027
- a{
1028
- color: #006FFF;
1029
- text-decoration: none;
1030
- }
1031
- }
1032
- }
952
+ gap:12px;
1033
953
  }
package/dist/index.d.mts CHANGED
@@ -1,15 +1,11 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType, W as WalletConfigType } from './types-CVwZEgQ0.mjs';
3
- export { i as Components } from './index-DlhAHm_s.mjs';
4
- export { i as Hooks } from './index-Bluim2ZP.mjs';
5
- export { i as Api } from './index-DFZpfAfc.mjs';
2
+ import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType, W as WalletConfigType } from './types.d-DwF-Pkvh.mjs';
3
+ export { i as Components } from './index-DCReY5T2.mjs';
4
+ export { i as Hooks } from './index-_k6h9w0P.mjs';
5
+ export { i as Api } from './index-DbjibQ5d.mjs';
6
6
  export { i as Chains } from './index-DXRGMAbv.mjs';
7
- export { i as Types } from './index-q5XDobUF.mjs';
8
7
  import 'react/jsx-runtime';
9
- import './mpc-CTbBWHld.mjs';
10
8
  import 'viem';
11
- import 'viem/types/misc';
12
- import 'abitype';
13
9
  import '@tanstack/react-query';
14
10
  import '@tanstack/react-query/src/types';
15
11
 
@@ -30,7 +26,7 @@ declare const MatchProvider: React.FC<{
30
26
  theme?: "light" | "dark";
31
27
  endpoints?: IEnvConfigType['endpoints'];
32
28
  locale?: LocaleType;
33
- wallet: WalletConfigType;
29
+ wallet?: WalletConfigType;
34
30
  }>;
35
31
  declare const useMatch: () => MatchContextType;
36
32
 
package/dist/index.d.ts CHANGED
@@ -1,15 +1,11 @@
1
1
  import React, { ReactNode } from 'react';
2
- import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType, W as WalletConfigType } from './types-CVwZEgQ0.js';
3
- export { i as Components } from './index-CLvQH5gM.js';
4
- export { i as Hooks } from './index-EqksEEto.js';
5
- export { i as Api } from './index-Ca9nh_8s.js';
2
+ import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType, W as WalletConfigType } from './types.d-DwF-Pkvh.js';
3
+ export { i as Components } from './index-CxY3u9Rv.js';
4
+ export { i as Hooks } from './index-B4YpKSY3.js';
5
+ export { i as Api } from './index-GcpJCj6O.js';
6
6
  export { i as Chains } from './index-DXRGMAbv.js';
7
- export { i as Types } from './index-BxS06a5O.js';
8
7
  import 'react/jsx-runtime';
9
- import './mpc-CTbBWHld.js';
10
8
  import 'viem';
11
- import 'viem/types/misc';
12
- import 'abitype';
13
9
  import '@tanstack/react-query';
14
10
  import '@tanstack/react-query/src/types';
15
11
 
@@ -30,7 +26,7 @@ declare const MatchProvider: React.FC<{
30
26
  theme?: "light" | "dark";
31
27
  endpoints?: IEnvConfigType['endpoints'];
32
28
  locale?: LocaleType;
33
- wallet: WalletConfigType;
29
+ wallet?: WalletConfigType;
34
30
  }>;
35
31
  declare const useMatch: () => MatchContextType;
36
32