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

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.
@@ -0,0 +1,65 @@
1
+ import * as _tanstack_react_query from '@tanstack/react-query';
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';
4
+
5
+ interface MyResponseType<T> {
6
+ code: number;
7
+ data: T;
8
+ message: string;
9
+ success: boolean;
10
+ fail: boolean;
11
+ result: T;
12
+ }
13
+
14
+ declare const bindCexApi: (data: {
15
+ cex: string;
16
+ api_key: string;
17
+ api_secret: string;
18
+ api_passphrase?: string;
19
+ }) => Promise<MyResponseType<any>>;
20
+ declare const unBindApi: ({ type }: {
21
+ type: string;
22
+ }) => Promise<MyResponseType<any>>;
23
+ declare const unBindWalletApi: ({ address }: {
24
+ address: string;
25
+ }) => Promise<MyResponseType<any>>;
26
+ declare const verifyPohApi: ({ taskId, schemaId, publicFields, allocatorAddress, publicFieldsHash, allocatorSignature, uHash, validatorAddress, validatorSignature }: PohZkpassParams) => Promise<MyResponseType<any>>;
27
+ declare const chooseIdentityApi: ({ identity }: {
28
+ identity: string;
29
+ }) => Promise<MyResponseType<any>>;
30
+ declare const mintPassportNftApi: () => Promise<MyResponseType<any>>;
31
+
32
+ declare function useBindList(options?: Partial<Omit<UseQueryOptions<BindItemType[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<BindItemType[], Error>;
33
+ declare function useBindInfo(options?: Partial<Omit<UseQueryOptions<BindInfoType>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<BindInfoType, Error>;
34
+
35
+ declare const bind_bindCexApi: typeof bindCexApi;
36
+ declare const bind_unBindApi: typeof unBindApi;
37
+ declare const bind_unBindWalletApi: typeof unBindWalletApi;
38
+ declare const bind_useBindInfo: typeof useBindInfo;
39
+ declare const bind_useBindList: typeof useBindList;
40
+ declare namespace bind {
41
+ export { bind_bindCexApi as bindCexApi, bind_unBindApi as unBindApi, bind_unBindWalletApi as unBindWalletApi, bind_useBindInfo as useBindInfo, bind_useBindList as useBindList };
42
+ }
43
+
44
+ declare function usePohList(options?: Partial<Omit<UseQueryOptions<PohItemType[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<PohItemType[], Error>;
45
+
46
+ declare const poh_usePohList: typeof usePohList;
47
+ declare const poh_verifyPohApi: typeof verifyPohApi;
48
+ declare namespace poh {
49
+ export { poh_usePohList as usePohList, poh_verifyPohApi as verifyPohApi };
50
+ }
51
+
52
+ declare const user_chooseIdentityApi: typeof chooseIdentityApi;
53
+ declare const user_mintPassportNftApi: typeof mintPassportNftApi;
54
+ declare namespace user {
55
+ export { user_chooseIdentityApi as chooseIdentityApi, user_mintPassportNftApi as mintPassportNftApi };
56
+ }
57
+
58
+ declare const index_bind: typeof bind;
59
+ declare const index_poh: typeof poh;
60
+ declare const index_user: typeof user;
61
+ declare namespace index {
62
+ export { index_bind as bind, index_poh as poh, index_user as user };
63
+ }
64
+
65
+ export { bind as b, index as i, poh as p, user as u };
@@ -0,0 +1,137 @@
1
+ import { j as ISocialLoginMethod, k as OverviewInfo, C as CEXType, l as LoginMethodType, I as IMatchEvents } from './types-CVwZEgQ0.js';
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.js';
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,83 @@
1
+ import * as viem from 'viem';
2
+
3
+ declare const matchMain: {
4
+ blockExplorers: {
5
+ readonly default: {
6
+ readonly name: "Matchscan";
7
+ readonly url: "https://matchscan.io/";
8
+ readonly apiUrl: "https://matchscan.io/api";
9
+ };
10
+ };
11
+ contracts: {
12
+ readonly multicall3: {
13
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
14
+ };
15
+ };
16
+ id: 698;
17
+ name: "Matchain";
18
+ nativeCurrency: {
19
+ readonly name: "Match Coin";
20
+ readonly symbol: "BNB";
21
+ readonly decimals: 18;
22
+ };
23
+ rpcUrls: {
24
+ readonly default: {
25
+ readonly http: readonly ["https://rpc.matchain.io"];
26
+ };
27
+ };
28
+ sourceId?: number | undefined;
29
+ testnet?: boolean | undefined;
30
+ custom?: Record<string, unknown> | undefined;
31
+ fees?: viem.ChainFees<undefined> | undefined;
32
+ formatters?: undefined;
33
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
34
+ readonly iconUrl: "https://matchscan.io/static/identicon_logos/blockies.png";
35
+ };
36
+
37
+ declare const matchTest: {
38
+ blockExplorers: {
39
+ readonly default: {
40
+ readonly name: "Matchscan";
41
+ readonly url: "https://testnet.matchscan.io/";
42
+ readonly apiUrl: "https://testnet.matchscan.io/api";
43
+ };
44
+ };
45
+ contracts: {
46
+ readonly multicall3: {
47
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
48
+ readonly blockCreated: 751532;
49
+ };
50
+ readonly ensRegistry: {
51
+ readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
52
+ };
53
+ readonly ensUniversalResolver: {
54
+ readonly address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC";
55
+ readonly blockCreated: 5317080;
56
+ };
57
+ };
58
+ id: 699;
59
+ name: "MatchTest";
60
+ nativeCurrency: {
61
+ readonly name: "Match Coin";
62
+ readonly symbol: "BNB";
63
+ readonly decimals: 18;
64
+ };
65
+ rpcUrls: {
66
+ readonly default: {
67
+ readonly http: readonly ["https://testnet-rpc.matchain.io"];
68
+ };
69
+ };
70
+ sourceId?: number | undefined;
71
+ testnet?: boolean | undefined;
72
+ custom?: Record<string, unknown> | undefined;
73
+ fees?: viem.ChainFees<undefined> | undefined;
74
+ formatters?: undefined;
75
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
76
+ readonly iconUrl: "https://testnet.matchscan.io/static/identicon_logos/blockies.png";
77
+ };
78
+
79
+ declare namespace index {
80
+ export { matchMain as MatchMain, matchTest as MatchTest };
81
+ }
82
+
83
+ export { matchTest as a, index as i, matchMain as m };
@@ -0,0 +1,83 @@
1
+ import * as viem from 'viem';
2
+
3
+ declare const matchMain: {
4
+ blockExplorers: {
5
+ readonly default: {
6
+ readonly name: "Matchscan";
7
+ readonly url: "https://matchscan.io/";
8
+ readonly apiUrl: "https://matchscan.io/api";
9
+ };
10
+ };
11
+ contracts: {
12
+ readonly multicall3: {
13
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
14
+ };
15
+ };
16
+ id: 698;
17
+ name: "Matchain";
18
+ nativeCurrency: {
19
+ readonly name: "Match Coin";
20
+ readonly symbol: "BNB";
21
+ readonly decimals: 18;
22
+ };
23
+ rpcUrls: {
24
+ readonly default: {
25
+ readonly http: readonly ["https://rpc.matchain.io"];
26
+ };
27
+ };
28
+ sourceId?: number | undefined;
29
+ testnet?: boolean | undefined;
30
+ custom?: Record<string, unknown> | undefined;
31
+ fees?: viem.ChainFees<undefined> | undefined;
32
+ formatters?: undefined;
33
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
34
+ readonly iconUrl: "https://matchscan.io/static/identicon_logos/blockies.png";
35
+ };
36
+
37
+ declare const matchTest: {
38
+ blockExplorers: {
39
+ readonly default: {
40
+ readonly name: "Matchscan";
41
+ readonly url: "https://testnet.matchscan.io/";
42
+ readonly apiUrl: "https://testnet.matchscan.io/api";
43
+ };
44
+ };
45
+ contracts: {
46
+ readonly multicall3: {
47
+ readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
48
+ readonly blockCreated: 751532;
49
+ };
50
+ readonly ensRegistry: {
51
+ readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
52
+ };
53
+ readonly ensUniversalResolver: {
54
+ readonly address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC";
55
+ readonly blockCreated: 5317080;
56
+ };
57
+ };
58
+ id: 699;
59
+ name: "MatchTest";
60
+ nativeCurrency: {
61
+ readonly name: "Match Coin";
62
+ readonly symbol: "BNB";
63
+ readonly decimals: 18;
64
+ };
65
+ rpcUrls: {
66
+ readonly default: {
67
+ readonly http: readonly ["https://testnet-rpc.matchain.io"];
68
+ };
69
+ };
70
+ sourceId?: number | undefined;
71
+ testnet?: boolean | undefined;
72
+ custom?: Record<string, unknown> | undefined;
73
+ fees?: viem.ChainFees<undefined> | undefined;
74
+ formatters?: undefined;
75
+ serializers?: viem.ChainSerializers<undefined, viem.TransactionSerializable> | undefined;
76
+ readonly iconUrl: "https://testnet.matchscan.io/static/identicon_logos/blockies.png";
77
+ };
78
+
79
+ declare namespace index {
80
+ export { matchMain as MatchMain, matchTest as MatchTest };
81
+ }
82
+
83
+ export { matchTest as a, index as i, matchMain as m };
@@ -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-CGpyQlbI.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--yBVwkf9.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 };
@@ -0,0 +1,20 @@
1
+ interface AuthParams {
2
+ AppId: string;
3
+ AppClientId: string;
4
+ UserId: string;
5
+ AccessToken: string;
6
+ Address?: string;
7
+ }
8
+ interface EmbeddedWalletsParams {
9
+ Url: string;
10
+ }
11
+ declare enum ChainType {
12
+ Ethereum = "ethereum",
13
+ Solana = "solana"
14
+ }
15
+ declare enum RecoveryType {
16
+ Base = "base_generated_recovery_key",
17
+ UserPasscode = "user_passcode_recovery_key"
18
+ }
19
+
20
+ export { type AuthParams as A, ChainType as C, type EmbeddedWalletsParams as E, RecoveryType as R };
@@ -0,0 +1,20 @@
1
+ interface AuthParams {
2
+ AppId: string;
3
+ AppClientId: string;
4
+ UserId: string;
5
+ AccessToken: string;
6
+ Address?: string;
7
+ }
8
+ interface EmbeddedWalletsParams {
9
+ Url: string;
10
+ }
11
+ declare enum ChainType {
12
+ Ethereum = "ethereum",
13
+ Solana = "solana"
14
+ }
15
+ declare enum RecoveryType {
16
+ Base = "base_generated_recovery_key",
17
+ UserPasscode = "user_passcode_recovery_key"
18
+ }
19
+
20
+ export { type AuthParams as A, ChainType as C, type EmbeddedWalletsParams as E, RecoveryType as R };