@matchain/matchid-sdk-react 0.1.42-alpha.4 → 0.1.42-alpha.6

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 (44) hide show
  1. package/dist/assets/icon/index.d.mts +133 -0
  2. package/dist/assets/icon/index.d.ts +133 -0
  3. package/dist/{chunk-GEM2V3W6.mjs → chunk-MRGV6YS3.mjs} +21 -6
  4. package/dist/chunk-MRGV6YS3.mjs.map +1 -0
  5. package/dist/{chunk-FZUZ63FZ.mjs → chunk-XPTMBR7D.mjs} +2 -2
  6. package/dist/components/index.d.mts +5 -0
  7. package/dist/components/index.d.ts +5 -0
  8. package/dist/components/index.js +20 -5
  9. package/dist/components/index.js.map +1 -1
  10. package/dist/components/index.mjs +1 -1
  11. package/dist/config/chains/index.d.mts +2 -0
  12. package/dist/config/chains/index.d.ts +2 -0
  13. package/dist/hooks/api/index.d.mts +5 -0
  14. package/dist/hooks/api/index.d.ts +5 -0
  15. package/dist/hooks/api/index.js.map +1 -1
  16. package/dist/hooks/api/index.mjs +2 -2
  17. package/dist/hooks/index.d.mts +7 -0
  18. package/dist/hooks/index.d.ts +7 -0
  19. package/dist/hooks/index.js.map +1 -1
  20. package/dist/hooks/index.mjs +1 -1
  21. package/dist/index-BxS06a5O.d.ts +50 -0
  22. package/dist/index-Ca9nh_8s.d.ts +65 -0
  23. package/dist/index-CmH9iRLd.d.mts +102 -0
  24. package/dist/index-DFZpfAfc.d.mts +65 -0
  25. package/dist/index-DKMrpRJC.d.ts +137 -0
  26. package/dist/index-DXRGMAbv.d.mts +83 -0
  27. package/dist/index-DXRGMAbv.d.ts +83 -0
  28. package/dist/index-DY_ReBra.d.ts +102 -0
  29. package/dist/index-q5XDobUF.d.mts +50 -0
  30. package/dist/index-sOVSnYF4.d.mts +137 -0
  31. package/dist/index.d.mts +37 -0
  32. package/dist/index.d.ts +37 -0
  33. package/dist/index.js +20 -5
  34. package/dist/index.js.map +1 -1
  35. package/dist/index.mjs +2 -2
  36. package/dist/mpc-CTbBWHld.d.mts +20 -0
  37. package/dist/mpc-CTbBWHld.d.ts +20 -0
  38. package/dist/types/index.d.mts +3 -0
  39. package/dist/types/index.d.ts +3 -0
  40. package/dist/types-CVwZEgQ0.d.mts +244 -0
  41. package/dist/types-CVwZEgQ0.d.ts +244 -0
  42. package/package.json +1 -1
  43. package/dist/chunk-GEM2V3W6.mjs.map +0 -1
  44. /package/dist/{chunk-FZUZ63FZ.mjs.map → chunk-XPTMBR7D.mjs.map} +0 -0
@@ -0,0 +1,102 @@
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';
3
+ import { ReactNode, PropsWithChildren } from 'react';
4
+ import { C as ChainType, R as RecoveryType } from './mpc-CTbBWHld.js';
5
+
6
+ declare function EmailModal({ isOpen, width, onClose, onBack, onLogin }: EmailModalProps): react_jsx_runtime.JSX.Element;
7
+
8
+ declare function Field({ label, children, error, required, className }: {
9
+ label: ReactNode;
10
+ error?: ReactNode;
11
+ required?: boolean;
12
+ className?: string;
13
+ } & PropsWithChildren): react_jsx_runtime.JSX.Element;
14
+
15
+ declare function Input({ onChange, type, after, className, ...props }: InputProps): react_jsx_runtime.JSX.Element;
16
+
17
+ declare function Button({ size, disabled, loading, children, onClick, highlight, block, type, rounded, className, style }: ButtonProps): react_jsx_runtime.JSX.Element;
18
+
19
+ declare function Modal({ children, isOpen, width, zIndex, className }: ModalProps): react_jsx_runtime.JSX.Element;
20
+ declare function ModalWithHeader({ children, onBack, onClose, title, showBorder, showClose, ...props }: ModalWithHeaderProps): react_jsx_runtime.JSX.Element;
21
+
22
+ declare function Popover({ children, content, position, type, className, gap }: PopoverProps): false | "" | 0 | react_jsx_runtime.JSX.Element | null | undefined;
23
+
24
+ declare function LoginBox({ recommendMethods, methods, walletMethods, inModal }: LoginBoxProps): react_jsx_runtime.JSX.Element;
25
+
26
+ declare function LoginButton({ loginRender, methods, recommendMethods, onLoginClick, popoverPosition, popoverType, popoverGap, walletMethods, ...props }: Omit<ButtonProps, 'onClick' | 'highlight'> & {
27
+ loginRender?: ReactNode;
28
+ methods?: OtherLoginMethodType[];
29
+ recommendMethods?: RecommendLoginMethodType[];
30
+ walletMethods?: WalletType[];
31
+ onLoginClick?: () => void;
32
+ popoverPosition?: PopoverPositionType;
33
+ popoverType?: PopoverTypeType;
34
+ popoverGap?: number | string;
35
+ }): react_jsx_runtime.JSX.Element;
36
+
37
+ declare function LoginPanel({ header, onClose, ...props }: LoginPanelProps): react_jsx_runtime.JSX.Element;
38
+
39
+ declare function LoginModal({ isOpen, width, ...props }: LoginModalProps): react_jsx_runtime.JSX.Element;
40
+
41
+ declare function UsernameModal({ title, isOpen, onSuccess, ...props }: ModalWithHeaderProps & {
42
+ onSuccess?: () => void;
43
+ }): react_jsx_runtime.JSX.Element;
44
+
45
+ declare function PasswordModal({ title, isOpen, onSuccess, chainType, recoveryType, ...props }: ModalWithHeaderProps & {
46
+ onSuccess?: () => void;
47
+ chainType?: `${ChainType}`;
48
+ recoveryType?: `${RecoveryType}`;
49
+ }): react_jsx_runtime.JSX.Element;
50
+
51
+ type SOLModalProps = ModalWithHeaderProps & {
52
+ type?: 'login' | 'bind' | '';
53
+ onSuccess?: () => void;
54
+ };
55
+ declare function SOLModal(props: SOLModalProps): false | react_jsx_runtime.JSX.Element;
56
+
57
+ type TRONConnectModalProps = ModalWithHeaderProps & {
58
+ type?: 'login' | 'bind' | '';
59
+ onSuccess?: () => void;
60
+ };
61
+ declare function TRONModal(props: TRONConnectModalProps): false | react_jsx_runtime.JSX.Element;
62
+
63
+ type TonModalProps = ModalWithHeaderProps & {
64
+ type?: 'login' | 'bind' | '';
65
+ onSuccess?: () => void;
66
+ };
67
+ declare function TONModal(props: TonModalProps): false | react_jsx_runtime.JSX.Element;
68
+
69
+ type BTCConnectModalProps = ModalWithHeaderProps & {
70
+ type?: 'login' | 'bind' | '';
71
+ 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
+ declare const index_BTCModal: typeof BTCModal;
81
+ declare const index_Button: typeof Button;
82
+ declare const index_EmailModal: typeof EmailModal;
83
+ declare const index_Field: typeof Field;
84
+ declare const index_Input: typeof Input;
85
+ declare const index_LoginBox: typeof LoginBox;
86
+ declare const index_LoginButton: typeof LoginButton;
87
+ declare const index_LoginModal: typeof LoginModal;
88
+ declare const index_LoginPanel: typeof LoginPanel;
89
+ declare const index_Modal: typeof Modal;
90
+ declare const index_ModalWithHeader: typeof ModalWithHeader;
91
+ declare const index_Overlay: typeof Overlay;
92
+ declare const index_PasswordModal: typeof PasswordModal;
93
+ declare const index_Popover: typeof Popover;
94
+ declare const index_SOLModal: typeof SOLModal;
95
+ declare const index_TONModal: typeof TONModal;
96
+ declare const index_TRONModal: typeof TRONModal;
97
+ declare const index_UsernameModal: typeof UsernameModal;
98
+ declare namespace index {
99
+ 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 };
100
+ }
101
+
102
+ 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, ModalWithHeader as a, LoginButton as b, LoginPanel as c, LoginModal as d, PasswordModal as e, TONModal as f, BTCModal as g, index as i };
@@ -0,0 +1,50 @@
1
+ import { A as AuthParams, C as ChainType, E as EmbeddedWalletsParams, R as RecoveryType } from './mpc-CTbBWHld.mjs';
2
+ import { A as AnyObject, m as BindInfoType, n as BindItemType, o as BindWalletParam, B as ButtonProps, C as CEXType, D as DeepPartial, p as DrawerProps, E as EmailModalProps, a as IEnvConfigType, q as IEnvName, r as ILoginWalletReq, I as IMatchEvents, j as ISocialLoginMethod, s as IconProps, b as InputProps, L as LocaleType, d as LoginBoxProps, l as LoginMethodType, i as LoginModalProps, h as LoginPanelProps, t as MessageType, M as ModalProps, c as ModalWithHeaderProps, O as OtherLoginMethodType, k as OverviewInfo, u as PohItemType, v as PohZkpassParams, f as PopoverPositionType, P as PopoverProps, g as PopoverTypeType, R as RecommendLoginMethodType, T as ThemeType, U as UserPopoverProps, W as WalletConfigType, w as WalletPanelProps, x as WalletReceiveMessageType, e as WalletType } from './types-CVwZEgQ0.mjs';
3
+
4
+ declare const index_AnyObject: typeof AnyObject;
5
+ declare const index_AuthParams: typeof AuthParams;
6
+ declare const index_BindInfoType: typeof BindInfoType;
7
+ declare const index_BindItemType: typeof BindItemType;
8
+ declare const index_BindWalletParam: typeof BindWalletParam;
9
+ declare const index_ButtonProps: typeof ButtonProps;
10
+ declare const index_CEXType: typeof CEXType;
11
+ declare const index_ChainType: typeof ChainType;
12
+ declare const index_DeepPartial: typeof DeepPartial;
13
+ declare const index_DrawerProps: typeof DrawerProps;
14
+ declare const index_EmailModalProps: typeof EmailModalProps;
15
+ declare const index_EmbeddedWalletsParams: typeof EmbeddedWalletsParams;
16
+ declare const index_IEnvConfigType: typeof IEnvConfigType;
17
+ declare const index_IEnvName: typeof IEnvName;
18
+ declare const index_ILoginWalletReq: typeof ILoginWalletReq;
19
+ declare const index_IMatchEvents: typeof IMatchEvents;
20
+ declare const index_ISocialLoginMethod: typeof ISocialLoginMethod;
21
+ declare const index_IconProps: typeof IconProps;
22
+ declare const index_InputProps: typeof InputProps;
23
+ declare const index_LocaleType: typeof LocaleType;
24
+ declare const index_LoginBoxProps: typeof LoginBoxProps;
25
+ declare const index_LoginMethodType: typeof LoginMethodType;
26
+ declare const index_LoginModalProps: typeof LoginModalProps;
27
+ declare const index_LoginPanelProps: typeof LoginPanelProps;
28
+ declare const index_MessageType: typeof MessageType;
29
+ declare const index_ModalProps: typeof ModalProps;
30
+ declare const index_ModalWithHeaderProps: typeof ModalWithHeaderProps;
31
+ declare const index_OtherLoginMethodType: typeof OtherLoginMethodType;
32
+ declare const index_OverviewInfo: typeof OverviewInfo;
33
+ declare const index_PohItemType: typeof PohItemType;
34
+ declare const index_PohZkpassParams: typeof PohZkpassParams;
35
+ declare const index_PopoverPositionType: typeof PopoverPositionType;
36
+ declare const index_PopoverProps: typeof PopoverProps;
37
+ declare const index_PopoverTypeType: typeof PopoverTypeType;
38
+ declare const index_RecommendLoginMethodType: typeof RecommendLoginMethodType;
39
+ declare const index_RecoveryType: typeof RecoveryType;
40
+ declare const index_ThemeType: typeof ThemeType;
41
+ declare const index_UserPopoverProps: typeof UserPopoverProps;
42
+ declare const index_WalletConfigType: typeof WalletConfigType;
43
+ declare const index_WalletPanelProps: typeof WalletPanelProps;
44
+ declare const index_WalletReceiveMessageType: typeof WalletReceiveMessageType;
45
+ declare const index_WalletType: typeof WalletType;
46
+ declare namespace index {
47
+ export { index_AnyObject as AnyObject, index_AuthParams as AuthParams, index_BindInfoType as BindInfoType, index_BindItemType as BindItemType, index_BindWalletParam as BindWalletParam, index_ButtonProps as ButtonProps, index_CEXType as CEXType, index_ChainType as ChainType, index_DeepPartial as DeepPartial, index_DrawerProps as DrawerProps, index_EmailModalProps as EmailModalProps, index_EmbeddedWalletsParams as EmbeddedWalletsParams, index_IEnvConfigType as IEnvConfigType, index_IEnvName as IEnvName, index_ILoginWalletReq as ILoginWalletReq, index_IMatchEvents as IMatchEvents, index_ISocialLoginMethod as ISocialLoginMethod, index_IconProps as IconProps, index_InputProps as InputProps, index_LocaleType as LocaleType, index_LoginBoxProps as LoginBoxProps, index_LoginMethodType as LoginMethodType, index_LoginModalProps as LoginModalProps, index_LoginPanelProps as LoginPanelProps, index_MessageType as MessageType, index_ModalProps as ModalProps, index_ModalWithHeaderProps as ModalWithHeaderProps, index_OtherLoginMethodType as OtherLoginMethodType, index_OverviewInfo as OverviewInfo, index_PohItemType as PohItemType, index_PohZkpassParams as PohZkpassParams, index_PopoverPositionType as PopoverPositionType, index_PopoverProps as PopoverProps, index_PopoverTypeType as PopoverTypeType, index_RecommendLoginMethodType as RecommendLoginMethodType, index_RecoveryType as RecoveryType, index_ThemeType as ThemeType, index_UserPopoverProps as UserPopoverProps, index_WalletConfigType as WalletConfigType, index_WalletPanelProps as WalletPanelProps, index_WalletReceiveMessageType as WalletReceiveMessageType, index_WalletType as WalletType };
48
+ }
49
+
50
+ export { index as i };
@@ -0,0 +1,137 @@
1
+ import { j as ISocialLoginMethod, k as OverviewInfo, C as CEXType, l as LoginMethodType, I as IMatchEvents } from './types-CVwZEgQ0.mjs';
2
+ import * as viem from 'viem';
3
+ import { Account, WalletClientConfig, createWalletClient, SignableMessage, Hex, TransactionSerializable, DeployContractParameters, SendTransactionParameters, WriteContractParameters } from 'viem';
4
+ import { C as ChainType, R as RecoveryType } from './mpc-CTbBWHld.mjs';
5
+ import { Hash } from 'viem/types/misc';
6
+ import { Abi } from 'abitype';
7
+
8
+ declare const LOGIN_METHOD_MAP: {
9
+ email: string;
10
+ evm: string;
11
+ sol: string;
12
+ btc: string;
13
+ ton: string;
14
+ tron: string;
15
+ google: string;
16
+ facebook: string;
17
+ x: string;
18
+ telegram: string;
19
+ github: string;
20
+ discord: string;
21
+ linkedin: string;
22
+ youtube: string;
23
+ };
24
+
25
+ declare function useUserInfo(): {
26
+ loginByMethod: (method: ISocialLoginMethod) => Promise<Window | null>;
27
+ loginByTelegram: () => Promise<Window | null>;
28
+ loginByTwitter: () => Promise<Window | null>;
29
+ loginByGoogle: () => Promise<Window | null>;
30
+ loginByWallet: () => Promise<Window | null>;
31
+ loginByEmail: ({ email, code }: {
32
+ email: string;
33
+ code: string;
34
+ }) => Promise<boolean>;
35
+ bindWallet: () => Promise<Window | null>;
36
+ bindTelegram: () => Promise<void>;
37
+ token: string;
38
+ mid: string;
39
+ did: string;
40
+ address: string;
41
+ isLogin: boolean;
42
+ logout: () => Promise<void>;
43
+ getLoginEmailCode: (email: string) => Promise<string>;
44
+ refreshOverview: () => Promise<void>;
45
+ overview: OverviewInfo | null;
46
+ bindCex: (type: CEXType) => void;
47
+ username: string;
48
+ auth: () => Promise<any>;
49
+ login: (method: LoginMethodType) => Promise<void | Window | null>;
50
+ bind: (method: LoginMethodType) => Promise<void | Window | null>;
51
+ getAuthInfo: (method: keyof typeof LOGIN_METHOD_MAP) => Promise<unknown>;
52
+ };
53
+
54
+ declare function useMatchEvents(handlers: IMatchEvents): void;
55
+
56
+ type initCoreType = (params: {
57
+ address: string;
58
+ did: string;
59
+ }) => Promise<void>;
60
+ type generateEmbeddedWalletsType = (params: {
61
+ chainType?: `${ChainType}`;
62
+ recoveryType?: `${RecoveryType}`;
63
+ userPasscode?: string;
64
+ }) => Promise<string>;
65
+ type recoveryEmbeddedWalletsType = (params: {
66
+ chainType?: `${ChainType}`;
67
+ recoveryType?: `${RecoveryType}`;
68
+ userPasscode?: string;
69
+ }) => Promise<void>;
70
+ type isRecoveredType = () => Promise<boolean>;
71
+ type signMessageType = (params: {
72
+ message: SignableMessage;
73
+ chainType?: ChainType;
74
+ }) => Promise<Hex>;
75
+ type signTransactionType = (params: {
76
+ transaction: TransactionSerializable;
77
+ chainType?: ChainType;
78
+ chain: {
79
+ id: number;
80
+ name: string;
81
+ nativeCurrency: {
82
+ name: string;
83
+ symbol: string;
84
+ decimals: number;
85
+ };
86
+ };
87
+ }) => Promise<`0x02${string}` | `0x01${string}` | `0x03${string}` | `0x04${string}` | viem.TransactionSerializedLegacy>;
88
+ type recoverAfterType = (params: {
89
+ chainType: `${ChainType}`;
90
+ handle: (resolve: (value: any) => void, reject: (reason: string) => void) => Promise<any>;
91
+ }) => Promise<any>;
92
+ type SendTransactionReturnType = Hash;
93
+ type SendTransactionParametersType = Omit<SendTransactionParameters, 'account'>;
94
+ type SendTransactionType = (transaction: SendTransactionParametersType) => Promise<SendTransactionReturnType>;
95
+ type DeployContractReturnType = SendTransactionReturnType;
96
+ type DeployContractType = <const abi extends Abi | readonly unknown[]>(parameters: DeployContractParameters<abi>) => Promise<DeployContractReturnType>;
97
+ type WriteContractParametersType = Omit<WriteContractParameters, 'account'>;
98
+ type WriteContractReturnType = SendTransactionReturnType;
99
+ type WriteContractType = (params: WriteContractParametersType) => Promise<WriteContractReturnType>;
100
+ interface UseWalletReturnType {
101
+ walletReady: boolean;
102
+ initCore: initCoreType;
103
+ isRecovered: isRecoveredType;
104
+ signMessage: signMessageType;
105
+ signTransaction: signTransactionType;
106
+ address: string;
107
+ evmAccount: Account | undefined;
108
+ recoverAfter: recoverAfterType;
109
+ recoveryEmbeddedWallets: recoveryEmbeddedWalletsType;
110
+ generateEmbeddedWallets: generateEmbeddedWalletsType;
111
+ createWalletClient: (parameters: Omit<WalletClientConfig, 'account'>) => Omit<ReturnType<typeof createWalletClient>, 'sendTransaction' | 'deployContract' | 'writeContract'> & {
112
+ sendTransaction: SendTransactionType;
113
+ deployContract: DeployContractType;
114
+ writeContract: WriteContractType;
115
+ } | undefined;
116
+ }
117
+ declare function useWallet(): UseWalletReturnType;
118
+
119
+ declare function useCopyClipboard(timeout?: number): [boolean, (toCopy: string) => void];
120
+
121
+ declare function useDownMd(): boolean;
122
+
123
+ declare const useLayout_useDownMd: typeof useDownMd;
124
+ declare namespace useLayout {
125
+ export { useLayout_useDownMd as useDownMd };
126
+ }
127
+
128
+ declare const index_useCopyClipboard: typeof useCopyClipboard;
129
+ declare const index_useLayout: typeof useLayout;
130
+ declare const index_useMatchEvents: typeof useMatchEvents;
131
+ declare const index_useUserInfo: typeof useUserInfo;
132
+ declare const index_useWallet: typeof useWallet;
133
+ declare namespace index {
134
+ export { index_useCopyClipboard as useCopyClipboard, index_useLayout as useLayout, index_useMatchEvents as useMatchEvents, index_useUserInfo as useUserInfo, index_useWallet as useWallet };
135
+ }
136
+
137
+ export { useMatchEvents as a, useWallet as b, useCopyClipboard as c, useLayout as d, index as i, useUserInfo as u };
@@ -0,0 +1,37 @@
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-CmH9iRLd.mjs';
4
+ export { i as Hooks } from './index-sOVSnYF4.mjs';
5
+ export { i as Api } from './index-DFZpfAfc.mjs';
6
+ export { i as Chains } from './index-DXRGMAbv.mjs';
7
+ export { i as Types } from './index-q5XDobUF.mjs';
8
+ import 'react/jsx-runtime';
9
+ import './mpc-CTbBWHld.mjs';
10
+ import 'viem';
11
+ import 'viem/types/misc';
12
+ import 'abitype';
13
+ import '@tanstack/react-query';
14
+ import '@tanstack/react-query/src/types';
15
+
16
+ type MatchContextType = {
17
+ appid: string;
18
+ events?: IMatchEvents;
19
+ login: (data: {
20
+ mid: string;
21
+ token: string;
22
+ }) => Promise<void>;
23
+ theme: "light" | "dark";
24
+ locale?: LocaleType;
25
+ } & Partial<IEnvConfigType>;
26
+ declare const MatchProvider: React.FC<{
27
+ children: ReactNode;
28
+ appid: string;
29
+ events?: IMatchEvents;
30
+ theme?: "light" | "dark";
31
+ endpoints?: IEnvConfigType['endpoints'];
32
+ locale?: LocaleType;
33
+ wallet?: WalletConfigType;
34
+ }>;
35
+ declare const useMatch: () => MatchContextType;
36
+
37
+ export { MatchProvider, useMatch };
@@ -0,0 +1,37 @@
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-DY_ReBra.js';
4
+ export { i as Hooks } from './index-DKMrpRJC.js';
5
+ export { i as Api } from './index-Ca9nh_8s.js';
6
+ export { i as Chains } from './index-DXRGMAbv.js';
7
+ export { i as Types } from './index-BxS06a5O.js';
8
+ import 'react/jsx-runtime';
9
+ import './mpc-CTbBWHld.js';
10
+ import 'viem';
11
+ import 'viem/types/misc';
12
+ import 'abitype';
13
+ import '@tanstack/react-query';
14
+ import '@tanstack/react-query/src/types';
15
+
16
+ type MatchContextType = {
17
+ appid: string;
18
+ events?: IMatchEvents;
19
+ login: (data: {
20
+ mid: string;
21
+ token: string;
22
+ }) => Promise<void>;
23
+ theme: "light" | "dark";
24
+ locale?: LocaleType;
25
+ } & Partial<IEnvConfigType>;
26
+ declare const MatchProvider: React.FC<{
27
+ children: ReactNode;
28
+ appid: string;
29
+ events?: IMatchEvents;
30
+ theme?: "light" | "dark";
31
+ endpoints?: IEnvConfigType['endpoints'];
32
+ locale?: LocaleType;
33
+ wallet?: WalletConfigType;
34
+ }>;
35
+ declare const useMatch: () => MatchContextType;
36
+
37
+ export { MatchProvider, useMatch };
package/dist/index.js CHANGED
@@ -3484,7 +3484,10 @@ function WalletContent({
3484
3484
  try {
3485
3485
  setStatus("nonce");
3486
3486
  statusRef.current = "nonce";
3487
- const res = type == "bind" ? await getWalletInitApi({ address, type: "SOL" }) : await getWalletNonceApi({ address, type: "SOL" });
3487
+ const res = type == "bind" ? await getWalletInitApi({
3488
+ address,
3489
+ type: "SOL"
3490
+ }) : await getWalletNonceApi({ address, type: "SOL" });
3488
3491
  if (!isSuccess(res)) {
3489
3492
  throw new Error(res.message);
3490
3493
  }
@@ -3588,7 +3591,7 @@ var wallets = [
3588
3591
  new import_wallet_adapter_wallets.TrustWalletAdapter(),
3589
3592
  new import_wallet_adapter_wallets.XDEFIWalletAdapter()
3590
3593
  ];
3591
- function SOLModal({
3594
+ function SOLConnectModal({
3592
3595
  type = "login",
3593
3596
  onSuccess,
3594
3597
  ...props
@@ -3600,6 +3603,9 @@ function SOLModal({
3600
3603
  name: "SOL"
3601
3604
  }), children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_wallet_adapter_react.ConnectionProvider, { endpoint: (0, import_web3.clusterApiUrl)("devnet"), children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_wallet_adapter_react.WalletProvider, { wallets, autoConnect: true, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_wallet_adapter_react_ui.WalletModalProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(WalletContent, { onSuccess, type }) }) }) }) });
3602
3605
  }
3606
+ function SOLModal(props) {
3607
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(SOLConnectModal, { ...props });
3608
+ }
3603
3609
 
3604
3610
  // src/components/TRONModal/index.tsx
3605
3611
  var import_react21 = __toESM(require("react"));
@@ -3714,7 +3720,7 @@ var useTRONWallet = () => {
3714
3720
 
3715
3721
  // src/components/TRONModal/index.tsx
3716
3722
  var import_jsx_runtime65 = require("react/jsx-runtime");
3717
- function TRONModal({
3723
+ function TRONConnectModal({
3718
3724
  type = "login",
3719
3725
  onSuccess,
3720
3726
  ...props
@@ -3865,6 +3871,9 @@ function TRONModal({
3865
3871
  })
3866
3872
  ] }) }) });
3867
3873
  }
3874
+ function TRONModal(props) {
3875
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(TRONConnectModal, { ...props, type: "" });
3876
+ }
3868
3877
 
3869
3878
  // src/components/TONModal/index.tsx
3870
3879
  var import_react22 = __toESM(require("react"));
@@ -4023,7 +4032,7 @@ function WalletContent2({
4023
4032
  }
4024
4033
  );
4025
4034
  }
4026
- function TONModal({
4035
+ function TONConnectModal({
4027
4036
  type = "login",
4028
4037
  onSuccess,
4029
4038
  ...props
@@ -4043,6 +4052,9 @@ function TONModal({
4043
4052
  }
4044
4053
  ) });
4045
4054
  }
4055
+ function TONModal(props) {
4056
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(TONConnectModal, { ...props });
4057
+ }
4046
4058
 
4047
4059
  // src/components/BTCModal/index.tsx
4048
4060
  var import_react24 = __toESM(require("react"));
@@ -4230,7 +4242,7 @@ var useBTCWallet = () => {
4230
4242
 
4231
4243
  // src/components/BTCModal/index.tsx
4232
4244
  var import_jsx_runtime67 = require("react/jsx-runtime");
4233
- function BTCModal({
4245
+ function BTCConnectModal({
4234
4246
  type = "login",
4235
4247
  onSuccess,
4236
4248
  ...props
@@ -4389,6 +4401,9 @@ function BTCModal({
4389
4401
  })
4390
4402
  ] }) }) });
4391
4403
  }
4404
+ function BTCModal(props) {
4405
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(BTCConnectModal, { ...props });
4406
+ }
4392
4407
 
4393
4408
  // src/components/CEXBindModal/index.tsx
4394
4409
  var import_react25 = require("react");