@matchain/matchid-sdk-react 0.1.42-alpha.1 → 0.1.42-alpha.10
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.
- package/dist/assets/icon/index.d.mts +1 -1
- package/dist/assets/icon/index.d.ts +1 -1
- package/dist/{chunk-U5KWO2YJ.mjs → chunk-N53ZMW5C.mjs} +2 -2
- package/dist/chunk-SQIJR7RA.mjs +29 -0
- package/dist/chunk-SQIJR7RA.mjs.map +1 -0
- package/dist/chunk-YG4MNAUD.mjs +4662 -0
- package/dist/chunk-YG4MNAUD.mjs.map +1 -0
- package/dist/components/index.d.mts +3 -2
- package/dist/components/index.d.ts +3 -2
- package/dist/components/index.js +676 -453
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +4 -1
- package/dist/hooks/api/index.d.mts +2 -2
- package/dist/hooks/api/index.d.ts +2 -2
- package/dist/hooks/api/index.js +120 -76
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +3 -2
- package/dist/hooks/index.d.mts +5 -2
- package/dist/hooks/index.d.ts +5 -2
- package/dist/hooks/index.js +328 -145
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +2 -1
- package/dist/index-BxS06a5O.d.ts +50 -0
- package/dist/{index-Dq9Swg8r.d.ts → index-Ca9nh_8s.d.ts} +1 -1
- package/dist/{index-COlsBC-b.d.mts → index-CmH9iRLd.d.mts} +25 -12
- package/dist/{index-C3KZYrtu.d.mts → index-DFZpfAfc.d.mts} +1 -1
- package/dist/index-DKMrpRJC.d.ts +137 -0
- package/dist/{index-fS75Swm8.d.ts → index-DY_ReBra.d.ts} +25 -12
- package/dist/index-q5XDobUF.d.mts +50 -0
- package/dist/index-sOVSnYF4.d.mts +137 -0
- package/dist/index.css +84 -4
- package/dist/index.d.mts +9 -4
- package/dist/index.d.ts +9 -4
- package/dist/index.js +1100 -614
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -2
- package/dist/mpc-CTbBWHld.d.mts +20 -0
- package/dist/mpc-CTbBWHld.d.ts +20 -0
- package/dist/types/index.d.mts +3 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +44 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/index.mjs +10 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/types-CVwZEgQ0.d.mts +244 -0
- package/dist/types-CVwZEgQ0.d.ts +244 -0
- package/example/package.json +1 -0
- package/example/src/App.tsx +56 -27
- package/example/src/components/ButtonGroup/index.tsx +10 -0
- package/example/src/components/Login/index.tsx +2 -2
- package/example/src/components/RoutePrivate/index.tsx +4 -3
- package/example/src/config/chains/index.ts +2 -0
- package/example/src/config/chains/matchMain.ts +27 -0
- package/example/src/config/chains/matchTest.ts +33 -0
- package/example/src/config/index.ts +6 -2
- package/example/src/pages/User/components/BindListModal.tsx +10 -0
- package/example/src/pages/User/components/PohListModal.tsx +10 -0
- package/example/src/pages/User/components/QueryDisplay.tsx +25 -0
- package/example/src/pages/{User.tsx → User/index.tsx} +55 -84
- package/example/src/pages/Wallet.tsx +133 -44
- package/example/src/store/useLocalStore.ts +45 -0
- package/package.json +7 -2
- package/dist/chunk-SBOIXOAW.mjs +0 -4197
- package/dist/chunk-SBOIXOAW.mjs.map +0 -1
- package/dist/index-BrdP6eg5.d.ts +0 -93
- package/dist/index-D7bNSBwl.d.mts +0 -93
- package/dist/types.d-CLO_WLka.d.mts +0 -176
- package/dist/types.d-CLO_WLka.d.ts +0 -176
- /package/dist/{chunk-U5KWO2YJ.mjs.map → chunk-N53ZMW5C.mjs.map} +0 -0
package/dist/index-BrdP6eg5.d.ts
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { i as ISocialLoginMethod, j as OverviewInfo, C as CEXType, k as LoginMethodType, I as IMatchEvents } from './types.d-CLO_WLka.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
|
-
}) => Promise<string>;
|
|
65
|
-
isRecovered: () => Promise<boolean>;
|
|
66
|
-
recoveryWallet: (chainType: ChainType | undefined, recoveryType: RecoveryType, userPasscode?: string) => Promise<void>;
|
|
67
|
-
signMessage: (message: SignableMessage, type?: ChainType) => Promise<Hex>;
|
|
68
|
-
signTransaction: (transaction: TransactionSerializable, type?: ChainType) => Promise<`0x02${string}` | `0x01${string}` | `0x03${string}` | `0x04${string}` | viem.TransactionSerializedLegacy>;
|
|
69
|
-
address: string;
|
|
70
|
-
evmAccount: Account | undefined;
|
|
71
|
-
recoverAfter: (func: (resolve: (value: any) => void, reject: (reason: string) => void) => Promise<any>) => Promise<any>;
|
|
72
|
-
}
|
|
73
|
-
declare function useWallet(): UseWalletReturnType;
|
|
74
|
-
|
|
75
|
-
declare function useCopyClipboard(timeout?: number): [boolean, (toCopy: string) => void];
|
|
76
|
-
|
|
77
|
-
declare function useDownMd(): boolean;
|
|
78
|
-
|
|
79
|
-
declare const useLayout_useDownMd: typeof useDownMd;
|
|
80
|
-
declare namespace useLayout {
|
|
81
|
-
export { useLayout_useDownMd as useDownMd };
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
declare const index_useCopyClipboard: typeof useCopyClipboard;
|
|
85
|
-
declare const index_useLayout: typeof useLayout;
|
|
86
|
-
declare const index_useMatchEvents: typeof useMatchEvents;
|
|
87
|
-
declare const index_useUserInfo: typeof useUserInfo;
|
|
88
|
-
declare const index_useWallet: typeof useWallet;
|
|
89
|
-
declare namespace index {
|
|
90
|
-
export { index_useCopyClipboard as useCopyClipboard, index_useLayout as useLayout, index_useMatchEvents as useMatchEvents, index_useUserInfo as useUserInfo, index_useWallet as useWallet };
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export { useMatchEvents as a, useWallet as b, useCopyClipboard as c, useLayout as d, index as i, useUserInfo as u };
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { i as ISocialLoginMethod, j as OverviewInfo, C as CEXType, k as LoginMethodType, I as IMatchEvents } from './types.d-CLO_WLka.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
|
-
}) => Promise<string>;
|
|
65
|
-
isRecovered: () => Promise<boolean>;
|
|
66
|
-
recoveryWallet: (chainType: ChainType | undefined, recoveryType: RecoveryType, userPasscode?: string) => Promise<void>;
|
|
67
|
-
signMessage: (message: SignableMessage, type?: ChainType) => Promise<Hex>;
|
|
68
|
-
signTransaction: (transaction: TransactionSerializable, type?: ChainType) => Promise<`0x02${string}` | `0x01${string}` | `0x03${string}` | `0x04${string}` | viem.TransactionSerializedLegacy>;
|
|
69
|
-
address: string;
|
|
70
|
-
evmAccount: Account | undefined;
|
|
71
|
-
recoverAfter: (func: (resolve: (value: any) => void, reject: (reason: string) => void) => Promise<any>) => Promise<any>;
|
|
72
|
-
}
|
|
73
|
-
declare function useWallet(): UseWalletReturnType;
|
|
74
|
-
|
|
75
|
-
declare function useCopyClipboard(timeout?: number): [boolean, (toCopy: string) => void];
|
|
76
|
-
|
|
77
|
-
declare function useDownMd(): boolean;
|
|
78
|
-
|
|
79
|
-
declare const useLayout_useDownMd: typeof useDownMd;
|
|
80
|
-
declare namespace useLayout {
|
|
81
|
-
export { useLayout_useDownMd as useDownMd };
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
declare const index_useCopyClipboard: typeof useCopyClipboard;
|
|
85
|
-
declare const index_useLayout: typeof useLayout;
|
|
86
|
-
declare const index_useMatchEvents: typeof useMatchEvents;
|
|
87
|
-
declare const index_useUserInfo: typeof useUserInfo;
|
|
88
|
-
declare const index_useWallet: typeof useWallet;
|
|
89
|
-
declare namespace index {
|
|
90
|
-
export { index_useCopyClipboard as useCopyClipboard, index_useLayout as useLayout, index_useMatchEvents as useMatchEvents, index_useUserInfo as useUserInfo, index_useWallet as useWallet };
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export { useMatchEvents as a, useWallet as b, useCopyClipboard as c, useLayout as d, index as i, useUserInfo as u };
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
type ISocialLoginMethod =
|
|
4
|
-
'google'
|
|
5
|
-
| 'twitter'
|
|
6
|
-
| 'discord'
|
|
7
|
-
| 'github'
|
|
8
|
-
| 'telegram'
|
|
9
|
-
| 'linkedin'
|
|
10
|
-
| 'facebook'
|
|
11
|
-
| 'youtube'
|
|
12
|
-
type WalletType = 'evm' | 'sol' | 'tron' | 'btc' | 'ton'
|
|
13
|
-
type LoginMethodType = WalletType | 'email' | ISocialLoginMethod
|
|
14
|
-
type CEXType = "Gate" | "Coinbase" | "Kucoin" | 'Bitget' | 'OKX' | 'Bybit' | 'Binance'
|
|
15
|
-
type OtherLoginMethodType = 'email' | ISocialLoginMethod
|
|
16
|
-
type RecommendLoginMethodType = 'wallet' | 'email' | ISocialLoginMethod
|
|
17
|
-
type IEnvConfigType = {
|
|
18
|
-
endpoints: {
|
|
19
|
-
back: string;
|
|
20
|
-
auth: string;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
type IMatchEvents = {
|
|
24
|
-
onLogin?: (data: {
|
|
25
|
-
mid?: string;
|
|
26
|
-
token: string;
|
|
27
|
-
did: string
|
|
28
|
-
}) => void
|
|
29
|
-
onLogout?: () => void,
|
|
30
|
-
onBind?: (data: {
|
|
31
|
-
type: string
|
|
32
|
-
}) => void
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
type OverviewInfo = {
|
|
36
|
-
score: number,
|
|
37
|
-
total_assets: number,
|
|
38
|
-
wallets: number,
|
|
39
|
-
followers: number,
|
|
40
|
-
sbt: number,
|
|
41
|
-
is_kyc: boolean,
|
|
42
|
-
is_poh: boolean,
|
|
43
|
-
mid: string
|
|
44
|
-
user_identity: string
|
|
45
|
-
identities: { [key: string]: string }
|
|
46
|
-
did: string
|
|
47
|
-
address: string
|
|
48
|
-
username?: string
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
type IconProps = {
|
|
52
|
-
color?: string,
|
|
53
|
-
size?: number | string,
|
|
54
|
-
width?: number | string,
|
|
55
|
-
height?: number | string,
|
|
56
|
-
style?: CSSProperties
|
|
57
|
-
className?: string
|
|
58
|
-
onClick?: (e?: any) => void
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
type ModalProps = PropsWithChildren & {
|
|
62
|
-
isOpen: boolean,
|
|
63
|
-
width?: number
|
|
64
|
-
className?: string
|
|
65
|
-
zIndex?: number
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
type ModalWithHeaderProps = ModalProps & {
|
|
69
|
-
onBack?: () => void,
|
|
70
|
-
onClose?: () => void,
|
|
71
|
-
title?: string
|
|
72
|
-
showClose?: boolean
|
|
73
|
-
showBorder?: boolean
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
type InputProps = {
|
|
77
|
-
placeholder?: string,
|
|
78
|
-
value?: string,
|
|
79
|
-
onChange?: (e?: any) => void,
|
|
80
|
-
disabled?: boolean,
|
|
81
|
-
readonly?: boolean
|
|
82
|
-
type?: string
|
|
83
|
-
maxLength?: number
|
|
84
|
-
className?: string
|
|
85
|
-
after?: React.ReactNode
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
type LoginBoxProps = {
|
|
89
|
-
methods?: OtherLoginMethodType[],
|
|
90
|
-
inModal?: boolean
|
|
91
|
-
recommendMethods?: RecommendLoginMethodType[]
|
|
92
|
-
walletMethods?: WalletType[]
|
|
93
|
-
}
|
|
94
|
-
type LoginPanelProps = {
|
|
95
|
-
header?: React.ReactNode
|
|
96
|
-
onClose?: () => void
|
|
97
|
-
} & LoginBoxProps
|
|
98
|
-
type LoginModalProps = LoginPanelProps & ModalProps
|
|
99
|
-
type EmailModalProps = ModalProps & {
|
|
100
|
-
onClose?: () => void,
|
|
101
|
-
onBack?: () => void,
|
|
102
|
-
onLogin?: () => void
|
|
103
|
-
}
|
|
104
|
-
type ButtonProps = {
|
|
105
|
-
size?: 'sm' | 'df' | 'lg',
|
|
106
|
-
type?: "button" | "submit" | "reset",
|
|
107
|
-
rounded?: boolean,
|
|
108
|
-
block?: boolean,
|
|
109
|
-
disabled?: boolean,
|
|
110
|
-
loading?: boolean,
|
|
111
|
-
children?: React.ReactNode,
|
|
112
|
-
onClick?: () => void,
|
|
113
|
-
highlight?: boolean,
|
|
114
|
-
style?: CSSProperties
|
|
115
|
-
className?: string
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
type BindItemType = {
|
|
119
|
-
type: string,
|
|
120
|
-
type_sort: string,
|
|
121
|
-
platform_name: string,
|
|
122
|
-
platform_id: number,
|
|
123
|
-
platform_uid: string,
|
|
124
|
-
platform_nickname: string,
|
|
125
|
-
platform_status: number
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
type PohItemType = {
|
|
129
|
-
user_id: number,
|
|
130
|
-
poh_market_id: number,
|
|
131
|
-
image_type: string,
|
|
132
|
-
category: string,
|
|
133
|
-
name: string,
|
|
134
|
-
app_id: string,
|
|
135
|
-
schema_id: string,
|
|
136
|
-
active: boolean,
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
type BindInfoType = {
|
|
140
|
-
progress_count: number,
|
|
141
|
-
progress_current: number,
|
|
142
|
-
total_assets: number,
|
|
143
|
-
wallet_count: number,
|
|
144
|
-
wallet_current: number,
|
|
145
|
-
cex_count: number,
|
|
146
|
-
cex_current: number,
|
|
147
|
-
social_count: number,
|
|
148
|
-
social_current: number,
|
|
149
|
-
others_count: number,
|
|
150
|
-
others_current: number,
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
type PohZkpassParams = {
|
|
154
|
-
taskId: string,
|
|
155
|
-
schemaId: string,
|
|
156
|
-
publicFields: any,
|
|
157
|
-
allocatorAddress: string,
|
|
158
|
-
publicFieldsHash: string,
|
|
159
|
-
allocatorSignature: string,
|
|
160
|
-
uHash: string,
|
|
161
|
-
validatorAddress: string,
|
|
162
|
-
validatorSignature: string,
|
|
163
|
-
}
|
|
164
|
-
type PopoverPositionType = "center" | "left" | "right"
|
|
165
|
-
type PopoverTypeType = "hover" | "click"
|
|
166
|
-
type PopoverProps = PropsWithChildren & {
|
|
167
|
-
position?: PopoverPositionType
|
|
168
|
-
type?: PopoverTypeType
|
|
169
|
-
content: ReactNode,
|
|
170
|
-
className?: string,
|
|
171
|
-
gap?: number | string
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
type LocaleType = "en" | "zh" | "tw" | "fr" | "ja" | "ko" | "vi" | "es" | "pt"
|
|
175
|
-
|
|
176
|
-
export type { ButtonProps as B, CEXType as C, EmailModalProps as E, IMatchEvents as I, LocaleType as L, ModalProps as M, OtherLoginMethodType as O, PopoverProps as P, RecommendLoginMethodType as R, WalletType as W, IEnvConfigType as a, InputProps as b, ModalWithHeaderProps as c, LoginBoxProps as d, PopoverPositionType as e, PopoverTypeType as f, LoginPanelProps as g, LoginModalProps as h, ISocialLoginMethod as i, OverviewInfo as j, LoginMethodType as k, IconProps as l, PohZkpassParams as m, BindItemType as n, BindInfoType as o, PohItemType as p };
|
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import { CSSProperties, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
|
|
3
|
-
type ISocialLoginMethod =
|
|
4
|
-
'google'
|
|
5
|
-
| 'twitter'
|
|
6
|
-
| 'discord'
|
|
7
|
-
| 'github'
|
|
8
|
-
| 'telegram'
|
|
9
|
-
| 'linkedin'
|
|
10
|
-
| 'facebook'
|
|
11
|
-
| 'youtube'
|
|
12
|
-
type WalletType = 'evm' | 'sol' | 'tron' | 'btc' | 'ton'
|
|
13
|
-
type LoginMethodType = WalletType | 'email' | ISocialLoginMethod
|
|
14
|
-
type CEXType = "Gate" | "Coinbase" | "Kucoin" | 'Bitget' | 'OKX' | 'Bybit' | 'Binance'
|
|
15
|
-
type OtherLoginMethodType = 'email' | ISocialLoginMethod
|
|
16
|
-
type RecommendLoginMethodType = 'wallet' | 'email' | ISocialLoginMethod
|
|
17
|
-
type IEnvConfigType = {
|
|
18
|
-
endpoints: {
|
|
19
|
-
back: string;
|
|
20
|
-
auth: string;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
type IMatchEvents = {
|
|
24
|
-
onLogin?: (data: {
|
|
25
|
-
mid?: string;
|
|
26
|
-
token: string;
|
|
27
|
-
did: string
|
|
28
|
-
}) => void
|
|
29
|
-
onLogout?: () => void,
|
|
30
|
-
onBind?: (data: {
|
|
31
|
-
type: string
|
|
32
|
-
}) => void
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
type OverviewInfo = {
|
|
36
|
-
score: number,
|
|
37
|
-
total_assets: number,
|
|
38
|
-
wallets: number,
|
|
39
|
-
followers: number,
|
|
40
|
-
sbt: number,
|
|
41
|
-
is_kyc: boolean,
|
|
42
|
-
is_poh: boolean,
|
|
43
|
-
mid: string
|
|
44
|
-
user_identity: string
|
|
45
|
-
identities: { [key: string]: string }
|
|
46
|
-
did: string
|
|
47
|
-
address: string
|
|
48
|
-
username?: string
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
type IconProps = {
|
|
52
|
-
color?: string,
|
|
53
|
-
size?: number | string,
|
|
54
|
-
width?: number | string,
|
|
55
|
-
height?: number | string,
|
|
56
|
-
style?: CSSProperties
|
|
57
|
-
className?: string
|
|
58
|
-
onClick?: (e?: any) => void
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
type ModalProps = PropsWithChildren & {
|
|
62
|
-
isOpen: boolean,
|
|
63
|
-
width?: number
|
|
64
|
-
className?: string
|
|
65
|
-
zIndex?: number
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
type ModalWithHeaderProps = ModalProps & {
|
|
69
|
-
onBack?: () => void,
|
|
70
|
-
onClose?: () => void,
|
|
71
|
-
title?: string
|
|
72
|
-
showClose?: boolean
|
|
73
|
-
showBorder?: boolean
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
type InputProps = {
|
|
77
|
-
placeholder?: string,
|
|
78
|
-
value?: string,
|
|
79
|
-
onChange?: (e?: any) => void,
|
|
80
|
-
disabled?: boolean,
|
|
81
|
-
readonly?: boolean
|
|
82
|
-
type?: string
|
|
83
|
-
maxLength?: number
|
|
84
|
-
className?: string
|
|
85
|
-
after?: React.ReactNode
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
type LoginBoxProps = {
|
|
89
|
-
methods?: OtherLoginMethodType[],
|
|
90
|
-
inModal?: boolean
|
|
91
|
-
recommendMethods?: RecommendLoginMethodType[]
|
|
92
|
-
walletMethods?: WalletType[]
|
|
93
|
-
}
|
|
94
|
-
type LoginPanelProps = {
|
|
95
|
-
header?: React.ReactNode
|
|
96
|
-
onClose?: () => void
|
|
97
|
-
} & LoginBoxProps
|
|
98
|
-
type LoginModalProps = LoginPanelProps & ModalProps
|
|
99
|
-
type EmailModalProps = ModalProps & {
|
|
100
|
-
onClose?: () => void,
|
|
101
|
-
onBack?: () => void,
|
|
102
|
-
onLogin?: () => void
|
|
103
|
-
}
|
|
104
|
-
type ButtonProps = {
|
|
105
|
-
size?: 'sm' | 'df' | 'lg',
|
|
106
|
-
type?: "button" | "submit" | "reset",
|
|
107
|
-
rounded?: boolean,
|
|
108
|
-
block?: boolean,
|
|
109
|
-
disabled?: boolean,
|
|
110
|
-
loading?: boolean,
|
|
111
|
-
children?: React.ReactNode,
|
|
112
|
-
onClick?: () => void,
|
|
113
|
-
highlight?: boolean,
|
|
114
|
-
style?: CSSProperties
|
|
115
|
-
className?: string
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
type BindItemType = {
|
|
119
|
-
type: string,
|
|
120
|
-
type_sort: string,
|
|
121
|
-
platform_name: string,
|
|
122
|
-
platform_id: number,
|
|
123
|
-
platform_uid: string,
|
|
124
|
-
platform_nickname: string,
|
|
125
|
-
platform_status: number
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
type PohItemType = {
|
|
129
|
-
user_id: number,
|
|
130
|
-
poh_market_id: number,
|
|
131
|
-
image_type: string,
|
|
132
|
-
category: string,
|
|
133
|
-
name: string,
|
|
134
|
-
app_id: string,
|
|
135
|
-
schema_id: string,
|
|
136
|
-
active: boolean,
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
type BindInfoType = {
|
|
140
|
-
progress_count: number,
|
|
141
|
-
progress_current: number,
|
|
142
|
-
total_assets: number,
|
|
143
|
-
wallet_count: number,
|
|
144
|
-
wallet_current: number,
|
|
145
|
-
cex_count: number,
|
|
146
|
-
cex_current: number,
|
|
147
|
-
social_count: number,
|
|
148
|
-
social_current: number,
|
|
149
|
-
others_count: number,
|
|
150
|
-
others_current: number,
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
type PohZkpassParams = {
|
|
154
|
-
taskId: string,
|
|
155
|
-
schemaId: string,
|
|
156
|
-
publicFields: any,
|
|
157
|
-
allocatorAddress: string,
|
|
158
|
-
publicFieldsHash: string,
|
|
159
|
-
allocatorSignature: string,
|
|
160
|
-
uHash: string,
|
|
161
|
-
validatorAddress: string,
|
|
162
|
-
validatorSignature: string,
|
|
163
|
-
}
|
|
164
|
-
type PopoverPositionType = "center" | "left" | "right"
|
|
165
|
-
type PopoverTypeType = "hover" | "click"
|
|
166
|
-
type PopoverProps = PropsWithChildren & {
|
|
167
|
-
position?: PopoverPositionType
|
|
168
|
-
type?: PopoverTypeType
|
|
169
|
-
content: ReactNode,
|
|
170
|
-
className?: string,
|
|
171
|
-
gap?: number | string
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
type LocaleType = "en" | "zh" | "tw" | "fr" | "ja" | "ko" | "vi" | "es" | "pt"
|
|
175
|
-
|
|
176
|
-
export type { ButtonProps as B, CEXType as C, EmailModalProps as E, IMatchEvents as I, LocaleType as L, ModalProps as M, OtherLoginMethodType as O, PopoverProps as P, RecommendLoginMethodType as R, WalletType as W, IEnvConfigType as a, InputProps as b, ModalWithHeaderProps as c, LoginBoxProps as d, PopoverPositionType as e, PopoverTypeType as f, LoginPanelProps as g, LoginModalProps as h, ISocialLoginMethod as i, OverviewInfo as j, LoginMethodType as k, IconProps as l, PohZkpassParams as m, BindItemType as n, BindInfoType as o, PohItemType as p };
|
|
File without changes
|