@matchain/matchid-sdk-react 0.1.46 → 0.1.48-alpha.0
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 +4 -2
- package/dist/assets/icon/index.d.ts +4 -2
- package/dist/assets/icon/index.js +27 -0
- package/dist/assets/icon/index.js.map +1 -1
- package/dist/assets/icon/index.mjs +3 -1
- package/dist/{chunk-DPXMCLYK.mjs → chunk-A5D3NKTK.mjs} +29 -3
- package/dist/chunk-A5D3NKTK.mjs.map +1 -0
- package/dist/chunk-FFTS42UP.mjs +112 -0
- package/dist/chunk-FFTS42UP.mjs.map +1 -0
- package/dist/chunk-HBOS3RBL.mjs +19 -0
- package/dist/chunk-HBOS3RBL.mjs.map +1 -0
- package/dist/{chunk-TOUC33US.mjs → chunk-OBHKOOCD.mjs} +142 -4618
- package/dist/chunk-OBHKOOCD.mjs.map +1 -0
- package/dist/chunk-OXTHXA3J.mjs +185 -0
- package/dist/chunk-OXTHXA3J.mjs.map +1 -0
- package/dist/{chunk-SQIJR7RA.mjs → chunk-UA6XHZHX.mjs} +2 -14
- package/dist/chunk-UA6XHZHX.mjs.map +1 -0
- package/dist/chunk-YRJZXWBW.mjs +4248 -0
- package/dist/chunk-YRJZXWBW.mjs.map +1 -0
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js +387 -812
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +12 -12
- package/dist/hooks/api/index.d.mts +2 -2
- package/dist/hooks/api/index.d.ts +2 -2
- package/dist/hooks/api/index.js +364 -239
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +12 -6
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +398 -498
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +6 -4
- package/dist/index-BLcEwhPI.d.mts +122 -0
- package/dist/{index-DVlCrOjr.d.ts → index-C0QPml_k.d.ts} +5 -33
- package/dist/{index-B0VpxAI2.d.mts → index-CQToKVAQ.d.mts} +5 -33
- package/dist/index-CbJKurxU.d.ts +26 -0
- package/dist/{index-DR2JTaoi.d.mts → index-CiRN11YD.d.mts} +10 -2
- package/dist/{index-CFWR1boZ.d.ts → index-CiwqFA66.d.ts} +2 -24
- package/dist/{index-CTSg5TRS.d.ts → index-D05U8UxY.d.ts} +10 -2
- package/dist/index-D9iJVzyV.d.ts +122 -0
- package/dist/index-DcixbsMC.d.mts +26 -0
- package/dist/index-DuO7iVGF.d.ts +57 -0
- package/dist/{index-D2pNP7Bz.d.mts → index-fHiAdQp6.d.mts} +2 -24
- package/dist/index-raxyfmqr.d.mts +57 -0
- package/dist/index.css +106 -1
- package/dist/index.d.mts +8 -6
- package/dist/index.d.ts +8 -6
- package/dist/index.js +2346 -2449
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -6
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.mjs +2 -1
- package/dist/{types-CRumDe2M.d.mts → types-yhXvLAPt.d.mts} +116 -1
- package/dist/{types-CRumDe2M.d.ts → types-yhXvLAPt.d.ts} +116 -1
- package/dist/ui/index.d.mts +6 -0
- package/dist/ui/index.d.ts +6 -0
- package/dist/ui/index.js +724 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/index.mjs +35 -0
- package/dist/ui/index.mjs.map +1 -0
- package/example/src/App.tsx +7 -0
- package/example/src/config/chains/matchMain.ts +2 -3
- package/example/src/pages/UI/components/AlphaAvatar.tsx +11 -0
- package/example/src/pages/UI/components/Radio.tsx +15 -0
- package/example/src/pages/UI/components/Switch.tsx +13 -0
- package/example/src/pages/UI/index.tsx +11 -0
- package/example/src/pages/User/components/BindListModal.tsx +1 -1
- package/example/src/pages/User/components/PohListModal.tsx +1 -1
- package/example/src/pages/User/index.tsx +1 -13
- package/example/src/pages/Wallet/components/AssetListModal.tsx +15 -0
- package/example/src/pages/Wallet/components/ChainListModal.tsx +11 -0
- package/example/src/pages/Wallet/components/ImportTokenListModal.tsx +15 -0
- package/example/src/pages/Wallet/components/WalletChainListModal.tsx +11 -0
- package/example/src/pages/{Wallet.tsx → Wallet/index.tsx} +31 -1
- package/package.json +5 -1
- package/dist/chunk-A3XSTHEE.mjs +0 -93
- package/dist/chunk-A3XSTHEE.mjs.map +0 -1
- package/dist/chunk-DPXMCLYK.mjs.map +0 -1
- package/dist/chunk-SQIJR7RA.mjs.map +0 -1
- package/dist/chunk-TOUC33US.mjs.map +0 -1
- package/dist/index-CWYElOA2.d.mts +0 -65
- package/dist/index-CoTirILQ.d.ts +0 -65
- /package/example/src/{pages/User/components → components}/QueryDisplay.tsx +0 -0
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useCopyClipboard,
|
|
3
|
-
useLayout_exports,
|
|
4
3
|
useMatchEvents,
|
|
5
4
|
useUserInfo,
|
|
6
5
|
useWallet
|
|
7
|
-
} from "../chunk-
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import
|
|
6
|
+
} from "../chunk-YRJZXWBW.mjs";
|
|
7
|
+
import "../chunk-UA6XHZHX.mjs";
|
|
8
|
+
import {
|
|
9
|
+
useLayout_exports
|
|
10
|
+
} from "../chunk-OBHKOOCD.mjs";
|
|
11
|
+
import "../chunk-A5D3NKTK.mjs";
|
|
10
12
|
import "../chunk-J5LGTIGS.mjs";
|
|
11
13
|
export {
|
|
12
14
|
useCopyClipboard,
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
+
import { UseQueryOptions } from '@tanstack/react-query/src/types';
|
|
3
|
+
import { w as PohZkpassParams, H as UserTransactionType, J as WalletAssetType, t as MetaPageType, l as BindItemType, k as BindInfoType, v as PohItemType, z as UserChainType, y as UserAssetToken, F as UserImportTokenType, K as WalletChainType } from './types-yhXvLAPt.mjs';
|
|
4
|
+
|
|
5
|
+
declare const isSuccess: (res: {
|
|
6
|
+
code: number;
|
|
7
|
+
message: string;
|
|
8
|
+
data?: any;
|
|
9
|
+
}) => boolean;
|
|
10
|
+
interface MyResponseType<T> {
|
|
11
|
+
code: number;
|
|
12
|
+
data: T;
|
|
13
|
+
message: string;
|
|
14
|
+
success: boolean;
|
|
15
|
+
fail: boolean;
|
|
16
|
+
result: T;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare const bindCexApi: (data: {
|
|
20
|
+
cex: string;
|
|
21
|
+
api_key: string;
|
|
22
|
+
api_secret: string;
|
|
23
|
+
api_passphrase?: string;
|
|
24
|
+
}) => Promise<MyResponseType<any>>;
|
|
25
|
+
declare const unBindApi: ({ type }: {
|
|
26
|
+
type: string;
|
|
27
|
+
}) => Promise<MyResponseType<any>>;
|
|
28
|
+
declare const unBindWalletApi: ({ address }: {
|
|
29
|
+
address: string;
|
|
30
|
+
}) => Promise<MyResponseType<any>>;
|
|
31
|
+
declare const verifyPohApi: ({ taskId, schemaId, publicFields, allocatorAddress, publicFieldsHash, allocatorSignature, uHash, validatorAddress, validatorSignature }: PohZkpassParams) => Promise<MyResponseType<any>>;
|
|
32
|
+
declare const chooseIdentityApi: ({ identity }: {
|
|
33
|
+
identity: string;
|
|
34
|
+
}) => Promise<MyResponseType<any>>;
|
|
35
|
+
declare const mintPassportNftApi: () => Promise<MyResponseType<any>>;
|
|
36
|
+
declare const userImportTokenApi: (data: {
|
|
37
|
+
chain_id: string;
|
|
38
|
+
symbol: string;
|
|
39
|
+
address: string;
|
|
40
|
+
decimals: number;
|
|
41
|
+
}) => Promise<MyResponseType<any>>;
|
|
42
|
+
declare const getUserWalletTransactionsApi: (data: {
|
|
43
|
+
chain_id: string;
|
|
44
|
+
limit: number;
|
|
45
|
+
offset: number;
|
|
46
|
+
}) => Promise<MyResponseType<{
|
|
47
|
+
transactions: UserTransactionType[];
|
|
48
|
+
limit: number;
|
|
49
|
+
offset: number;
|
|
50
|
+
}>>;
|
|
51
|
+
declare const getWalletAssetListApi: (data: {
|
|
52
|
+
chain_id: string;
|
|
53
|
+
address: string;
|
|
54
|
+
}) => Promise<MyResponseType<WalletAssetType[]>>;
|
|
55
|
+
declare const getWalletListApi: (data: {
|
|
56
|
+
page: number;
|
|
57
|
+
page_size: number;
|
|
58
|
+
}) => Promise<MyResponseType<MetaPageType<{
|
|
59
|
+
wallet_list: {
|
|
60
|
+
address: string;
|
|
61
|
+
chain_network: string;
|
|
62
|
+
}[];
|
|
63
|
+
mpc_address: string;
|
|
64
|
+
}>>>;
|
|
65
|
+
|
|
66
|
+
declare function useBindList(options?: Partial<Omit<UseQueryOptions<BindItemType[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<BindItemType[], Error>;
|
|
67
|
+
declare function useBindInfo(options?: Partial<Omit<UseQueryOptions<BindInfoType>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<BindInfoType, Error>;
|
|
68
|
+
|
|
69
|
+
declare const bind_bindCexApi: typeof bindCexApi;
|
|
70
|
+
declare const bind_unBindApi: typeof unBindApi;
|
|
71
|
+
declare const bind_unBindWalletApi: typeof unBindWalletApi;
|
|
72
|
+
declare const bind_useBindInfo: typeof useBindInfo;
|
|
73
|
+
declare const bind_useBindList: typeof useBindList;
|
|
74
|
+
declare namespace bind {
|
|
75
|
+
export { bind_bindCexApi as bindCexApi, bind_unBindApi as unBindApi, bind_unBindWalletApi as unBindWalletApi, bind_useBindInfo as useBindInfo, bind_useBindList as useBindList };
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare function usePohList(options?: Partial<Omit<UseQueryOptions<PohItemType[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<PohItemType[], Error>;
|
|
79
|
+
|
|
80
|
+
declare const poh_usePohList: typeof usePohList;
|
|
81
|
+
declare const poh_verifyPohApi: typeof verifyPohApi;
|
|
82
|
+
declare namespace poh {
|
|
83
|
+
export { poh_usePohList as usePohList, poh_verifyPohApi as verifyPohApi };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
declare const user_chooseIdentityApi: typeof chooseIdentityApi;
|
|
87
|
+
declare const user_mintPassportNftApi: typeof mintPassportNftApi;
|
|
88
|
+
declare namespace user {
|
|
89
|
+
export { user_chooseIdentityApi as chooseIdentityApi, user_mintPassportNftApi as mintPassportNftApi };
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
declare function useChainListQuery(options?: Partial<Omit<UseQueryOptions<UserChainType[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<UserChainType[], Error>;
|
|
93
|
+
declare function useAssetListQuery({ chainId, ...options }: {
|
|
94
|
+
chainId: number;
|
|
95
|
+
} & Partial<Omit<UseQueryOptions<UserAssetToken[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<UserAssetToken[], Error>;
|
|
96
|
+
declare function useImportTokenListQuery({ chainId, ...options }: {
|
|
97
|
+
chainId: number;
|
|
98
|
+
} & Partial<Omit<UseQueryOptions<UserImportTokenType[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<UserImportTokenType[], Error>;
|
|
99
|
+
declare function useWalletChainListQuery(options?: Partial<Omit<UseQueryOptions<WalletChainType[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<WalletChainType[], Error>;
|
|
100
|
+
|
|
101
|
+
declare const wallet_getUserWalletTransactionsApi: typeof getUserWalletTransactionsApi;
|
|
102
|
+
declare const wallet_getWalletAssetListApi: typeof getWalletAssetListApi;
|
|
103
|
+
declare const wallet_getWalletListApi: typeof getWalletListApi;
|
|
104
|
+
declare const wallet_useAssetListQuery: typeof useAssetListQuery;
|
|
105
|
+
declare const wallet_useChainListQuery: typeof useChainListQuery;
|
|
106
|
+
declare const wallet_useImportTokenListQuery: typeof useImportTokenListQuery;
|
|
107
|
+
declare const wallet_useWalletChainListQuery: typeof useWalletChainListQuery;
|
|
108
|
+
declare const wallet_userImportTokenApi: typeof userImportTokenApi;
|
|
109
|
+
declare namespace wallet {
|
|
110
|
+
export { wallet_getUserWalletTransactionsApi as getUserWalletTransactionsApi, wallet_getWalletAssetListApi as getWalletAssetListApi, wallet_getWalletListApi as getWalletListApi, wallet_useAssetListQuery as useAssetListQuery, wallet_useChainListQuery as useChainListQuery, wallet_useImportTokenListQuery as useImportTokenListQuery, wallet_useWalletChainListQuery as useWalletChainListQuery, wallet_userImportTokenApi as userImportTokenApi };
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
declare const index_bind: typeof bind;
|
|
114
|
+
declare const index_isSuccess: typeof isSuccess;
|
|
115
|
+
declare const index_poh: typeof poh;
|
|
116
|
+
declare const index_user: typeof user;
|
|
117
|
+
declare const index_wallet: typeof wallet;
|
|
118
|
+
declare namespace index {
|
|
119
|
+
export { index_bind as bind, index_isSuccess as isSuccess, index_poh as poh, index_user as user, index_wallet as wallet };
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export { isSuccess as a, bind as b, index as i, poh as p, user as u, wallet as w };
|
|
@@ -1,26 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { E as EmailModalProps,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { E as EmailModalProps, d as LoginBoxProps, B as ButtonProps, e as OtherLoginMethodType, R as RecommendLoginMethodType, f as WalletType, P as PopoverPositionType, g as PopoverTypeType, h as LoginPanelProps, i as LoginModalProps, M as ModalWithHeaderProps } from './types-yhXvLAPt.js';
|
|
3
|
+
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-CbJKurxU.js';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
5
|
|
|
6
6
|
declare function EmailModal({ isOpen, width, onClose, onBack, onLogin }: EmailModalProps): react_jsx_runtime.JSX.Element;
|
|
7
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
8
|
declare function LoginBox({ recommendMethods, methods, walletMethods, inModal }: LoginBoxProps): react_jsx_runtime.JSX.Element;
|
|
25
9
|
|
|
26
10
|
declare function LoginButton({ loginRender, methods, recommendMethods, onLoginClick, popoverPosition, popoverType, popoverGap, walletMethods, ...props }: Omit<ButtonProps, 'onClick' | 'highlight'> & {
|
|
@@ -42,12 +26,6 @@ declare function UsernameModal({ title, isOpen, onSuccess, ...props }: ModalWith
|
|
|
42
26
|
onSuccess?: () => void;
|
|
43
27
|
}): react_jsx_runtime.JSX.Element;
|
|
44
28
|
|
|
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
29
|
type SOLModalProps = ModalWithHeaderProps & {
|
|
52
30
|
type?: 'login' | 'bind' | '';
|
|
53
31
|
onSuccess?: () => void;
|
|
@@ -72,11 +50,6 @@ type BTCConnectModalProps = ModalWithHeaderProps & {
|
|
|
72
50
|
};
|
|
73
51
|
declare function BTCModal(props: BTCConnectModalProps): false | react_jsx_runtime.JSX.Element;
|
|
74
52
|
|
|
75
|
-
declare function Overlay({ isOpen, children, zIndex, }: {
|
|
76
|
-
isOpen?: boolean;
|
|
77
|
-
zIndex?: number;
|
|
78
|
-
} & PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
79
|
-
|
|
80
53
|
type WalletModalProps = ModalWithHeaderProps & {
|
|
81
54
|
type?: 'login' | 'bind' | '';
|
|
82
55
|
methods?: WalletType[];
|
|
@@ -95,7 +68,6 @@ declare const index_LoginPanel: typeof LoginPanel;
|
|
|
95
68
|
declare const index_Modal: typeof Modal;
|
|
96
69
|
declare const index_ModalWithHeader: typeof ModalWithHeader;
|
|
97
70
|
declare const index_Overlay: typeof Overlay;
|
|
98
|
-
declare const index_PasswordModal: typeof PasswordModal;
|
|
99
71
|
declare const index_Popover: typeof Popover;
|
|
100
72
|
declare const index_SOLModal: typeof SOLModal;
|
|
101
73
|
declare const index_TONModal: typeof TONModal;
|
|
@@ -103,7 +75,7 @@ declare const index_TRONModal: typeof TRONModal;
|
|
|
103
75
|
declare const index_UsernameModal: typeof UsernameModal;
|
|
104
76
|
declare const index_WalletModal: typeof WalletModal;
|
|
105
77
|
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,
|
|
78
|
+
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_Popover as Popover, index_SOLModal as SOLModal, index_TONModal as TONModal, index_TRONModal as TRONModal, index_UsernameModal as UsernameModal, index_WalletModal as WalletModal };
|
|
107
79
|
}
|
|
108
80
|
|
|
109
|
-
export {
|
|
81
|
+
export { BTCModal as B, EmailModal as E, LoginBox as L, SOLModal as S, TRONModal as T, UsernameModal as U, WalletModal as W, LoginButton as a, LoginPanel as b, LoginModal as c, TONModal as d, index as i };
|
|
@@ -1,26 +1,10 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { E as EmailModalProps,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { E as EmailModalProps, d as LoginBoxProps, B as ButtonProps, e as OtherLoginMethodType, R as RecommendLoginMethodType, f as WalletType, P as PopoverPositionType, g as PopoverTypeType, h as LoginPanelProps, i as LoginModalProps, M as ModalWithHeaderProps } from './types-yhXvLAPt.mjs';
|
|
3
|
+
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-DcixbsMC.mjs';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
5
|
|
|
6
6
|
declare function EmailModal({ isOpen, width, onClose, onBack, onLogin }: EmailModalProps): react_jsx_runtime.JSX.Element;
|
|
7
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
8
|
declare function LoginBox({ recommendMethods, methods, walletMethods, inModal }: LoginBoxProps): react_jsx_runtime.JSX.Element;
|
|
25
9
|
|
|
26
10
|
declare function LoginButton({ loginRender, methods, recommendMethods, onLoginClick, popoverPosition, popoverType, popoverGap, walletMethods, ...props }: Omit<ButtonProps, 'onClick' | 'highlight'> & {
|
|
@@ -42,12 +26,6 @@ declare function UsernameModal({ title, isOpen, onSuccess, ...props }: ModalWith
|
|
|
42
26
|
onSuccess?: () => void;
|
|
43
27
|
}): react_jsx_runtime.JSX.Element;
|
|
44
28
|
|
|
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
29
|
type SOLModalProps = ModalWithHeaderProps & {
|
|
52
30
|
type?: 'login' | 'bind' | '';
|
|
53
31
|
onSuccess?: () => void;
|
|
@@ -72,11 +50,6 @@ type BTCConnectModalProps = ModalWithHeaderProps & {
|
|
|
72
50
|
};
|
|
73
51
|
declare function BTCModal(props: BTCConnectModalProps): false | react_jsx_runtime.JSX.Element;
|
|
74
52
|
|
|
75
|
-
declare function Overlay({ isOpen, children, zIndex, }: {
|
|
76
|
-
isOpen?: boolean;
|
|
77
|
-
zIndex?: number;
|
|
78
|
-
} & PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
79
|
-
|
|
80
53
|
type WalletModalProps = ModalWithHeaderProps & {
|
|
81
54
|
type?: 'login' | 'bind' | '';
|
|
82
55
|
methods?: WalletType[];
|
|
@@ -95,7 +68,6 @@ declare const index_LoginPanel: typeof LoginPanel;
|
|
|
95
68
|
declare const index_Modal: typeof Modal;
|
|
96
69
|
declare const index_ModalWithHeader: typeof ModalWithHeader;
|
|
97
70
|
declare const index_Overlay: typeof Overlay;
|
|
98
|
-
declare const index_PasswordModal: typeof PasswordModal;
|
|
99
71
|
declare const index_Popover: typeof Popover;
|
|
100
72
|
declare const index_SOLModal: typeof SOLModal;
|
|
101
73
|
declare const index_TONModal: typeof TONModal;
|
|
@@ -103,7 +75,7 @@ declare const index_TRONModal: typeof TRONModal;
|
|
|
103
75
|
declare const index_UsernameModal: typeof UsernameModal;
|
|
104
76
|
declare const index_WalletModal: typeof WalletModal;
|
|
105
77
|
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,
|
|
78
|
+
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_Popover as Popover, index_SOLModal as SOLModal, index_TONModal as TONModal, index_TRONModal as TRONModal, index_UsernameModal as UsernameModal, index_WalletModal as WalletModal };
|
|
107
79
|
}
|
|
108
80
|
|
|
109
|
-
export {
|
|
81
|
+
export { BTCModal as B, EmailModal as E, LoginBox as L, SOLModal as S, TRONModal as T, UsernameModal as U, WalletModal as W, LoginButton as a, LoginPanel as b, LoginModal as c, TONModal as d, index as i };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode, PropsWithChildren } from 'react';
|
|
3
|
+
import { r as InputProps, B as ButtonProps, u as ModalProps, M as ModalWithHeaderProps, x as PopoverProps } from './types-yhXvLAPt.js';
|
|
4
|
+
|
|
5
|
+
declare function Field({ label, children, error, required, className }: {
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
error?: ReactNode;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
} & PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
declare function Input({ onChange, type, after, className, ...props }: InputProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
declare function Button({ size, disabled, loading, children, onClick, highlight, block, type, rounded, className, style }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
declare function Modal({ children, isOpen, width, zIndex, className }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function ModalWithHeader({ children, onBack, onClose, title, showBorder, showClose, ...props }: ModalWithHeaderProps): react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
19
|
+
declare function Popover({ children, content, position, type, className, gap }: PopoverProps): false | "" | 0 | react_jsx_runtime.JSX.Element | null | undefined;
|
|
20
|
+
|
|
21
|
+
declare function Overlay({ isOpen, children, zIndex, }: {
|
|
22
|
+
isOpen?: boolean;
|
|
23
|
+
zIndex?: number;
|
|
24
|
+
} & PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
25
|
+
|
|
26
|
+
export { Button as B, Field as F, Input as I, Modal as M, Overlay as O, Popover as P, ModalWithHeader as a };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as AuthParams, C as ChainType, E as EmbeddedWalletsParams, R as RecoveryType } from './mpc-CTbBWHld.mjs';
|
|
2
|
-
import { A as AnyObject,
|
|
2
|
+
import { A as AnyObject, j as AppConfigType, k as BindInfoType, l as BindItemType, m as BindWalletParam, B as ButtonProps, C as CEXType, D as DeepPartial, n as DrawerProps, E as EmailModalProps, a as IEnvConfigType, o as IEnvName, p as ILoginWalletReq, I as IMatchEvents, b as ISocialLoginMethod, q as IconProps, r as InputProps, L as LocaleType, d as LoginBoxProps, c as LoginMethodType, i as LoginModalProps, h as LoginPanelProps, s as MessageType, t as MetaPageType, u as ModalProps, M as ModalWithHeaderProps, e as OtherLoginMethodType, O as OverviewInfo, v as PohItemType, w as PohZkpassParams, P as PopoverPositionType, x as PopoverProps, g as PopoverTypeType, R as RecommendLoginMethodType, T as ThemeType, U as UIProps, y as UserAssetToken, z as UserChainType, F as UserImportTokenType, G as UserPopoverProps, H as UserTransactionType, J as WalletAssetType, K as WalletChainType, W as WalletConfigType, N as WalletPanelProps, Q as WalletReceiveMessageType, f as WalletType } from './types-yhXvLAPt.mjs';
|
|
3
3
|
|
|
4
4
|
declare const index_AnyObject: typeof AnyObject;
|
|
5
5
|
declare const index_AppConfigType: typeof AppConfigType;
|
|
@@ -27,6 +27,7 @@ declare const index_LoginMethodType: typeof LoginMethodType;
|
|
|
27
27
|
declare const index_LoginModalProps: typeof LoginModalProps;
|
|
28
28
|
declare const index_LoginPanelProps: typeof LoginPanelProps;
|
|
29
29
|
declare const index_MessageType: typeof MessageType;
|
|
30
|
+
declare const index_MetaPageType: typeof MetaPageType;
|
|
30
31
|
declare const index_ModalProps: typeof ModalProps;
|
|
31
32
|
declare const index_ModalWithHeaderProps: typeof ModalWithHeaderProps;
|
|
32
33
|
declare const index_OtherLoginMethodType: typeof OtherLoginMethodType;
|
|
@@ -39,13 +40,20 @@ declare const index_PopoverTypeType: typeof PopoverTypeType;
|
|
|
39
40
|
declare const index_RecommendLoginMethodType: typeof RecommendLoginMethodType;
|
|
40
41
|
declare const index_RecoveryType: typeof RecoveryType;
|
|
41
42
|
declare const index_ThemeType: typeof ThemeType;
|
|
43
|
+
declare const index_UIProps: typeof UIProps;
|
|
44
|
+
declare const index_UserAssetToken: typeof UserAssetToken;
|
|
45
|
+
declare const index_UserChainType: typeof UserChainType;
|
|
46
|
+
declare const index_UserImportTokenType: typeof UserImportTokenType;
|
|
42
47
|
declare const index_UserPopoverProps: typeof UserPopoverProps;
|
|
48
|
+
declare const index_UserTransactionType: typeof UserTransactionType;
|
|
49
|
+
declare const index_WalletAssetType: typeof WalletAssetType;
|
|
50
|
+
declare const index_WalletChainType: typeof WalletChainType;
|
|
43
51
|
declare const index_WalletConfigType: typeof WalletConfigType;
|
|
44
52
|
declare const index_WalletPanelProps: typeof WalletPanelProps;
|
|
45
53
|
declare const index_WalletReceiveMessageType: typeof WalletReceiveMessageType;
|
|
46
54
|
declare const index_WalletType: typeof WalletType;
|
|
47
55
|
declare namespace index {
|
|
48
|
-
export { index_AnyObject as AnyObject, index_AppConfigType as AppConfigType, 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 };
|
|
56
|
+
export { index_AnyObject as AnyObject, index_AppConfigType as AppConfigType, 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_MetaPageType as MetaPageType, 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_UIProps as UIProps, index_UserAssetToken as UserAssetToken, index_UserChainType as UserChainType, index_UserImportTokenType as UserImportTokenType, index_UserPopoverProps as UserPopoverProps, index_UserTransactionType as UserTransactionType, index_WalletAssetType as WalletAssetType, index_WalletChainType as WalletChainType, index_WalletConfigType as WalletConfigType, index_WalletPanelProps as WalletPanelProps, index_WalletReceiveMessageType as WalletReceiveMessageType, index_WalletType as WalletType };
|
|
49
57
|
}
|
|
50
58
|
|
|
51
59
|
export { index as i };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b as ISocialLoginMethod, O as OverviewInfo, C as CEXType, c as LoginMethodType, I as IMatchEvents } from './types-yhXvLAPt.js';
|
|
2
2
|
import * as viem from 'viem';
|
|
3
3
|
import { Account, WalletClientConfig, createWalletClient, SignableMessage, Hex, TransactionSerializable, DeployContractParameters, SendTransactionParameters, WriteContractParameters, Chain } from 'viem';
|
|
4
|
-
import { C as ChainType
|
|
4
|
+
import { C as ChainType } from './mpc-CTbBWHld.js';
|
|
5
5
|
import { Hash } from 'viem/types/misc';
|
|
6
6
|
import { Abi } from 'abitype';
|
|
7
7
|
|
|
@@ -57,20 +57,6 @@ declare function useUserInfo(): {
|
|
|
57
57
|
|
|
58
58
|
declare function useMatchEvents(handlers: IMatchEvents): void;
|
|
59
59
|
|
|
60
|
-
type initCoreType = (params: {
|
|
61
|
-
address: string;
|
|
62
|
-
did: string;
|
|
63
|
-
}) => Promise<void>;
|
|
64
|
-
type generateEmbeddedWalletsType = (params: {
|
|
65
|
-
chainType?: `${ChainType}`;
|
|
66
|
-
recoveryType?: `${RecoveryType}`;
|
|
67
|
-
userPasscode?: string;
|
|
68
|
-
}) => Promise<string>;
|
|
69
|
-
type recoveryEmbeddedWalletsType = (params: {
|
|
70
|
-
chainType?: `${ChainType}`;
|
|
71
|
-
recoveryType?: `${RecoveryType}`;
|
|
72
|
-
userPasscode?: string;
|
|
73
|
-
}) => Promise<void>;
|
|
74
60
|
type isRecoveredType = () => Promise<boolean>;
|
|
75
61
|
type signMessageType = (params: {
|
|
76
62
|
message: SignableMessage;
|
|
@@ -92,10 +78,6 @@ type signTransactionType = (params: {
|
|
|
92
78
|
};
|
|
93
79
|
};
|
|
94
80
|
}) => Promise<`0x02${string}` | `0x01${string}` | `0x03${string}` | `0x04${string}` | viem.TransactionSerializedLegacy>;
|
|
95
|
-
type recoverAfterType = (params: {
|
|
96
|
-
chainType: `${ChainType}`;
|
|
97
|
-
handle: (resolve: (value: any) => void, reject: (reason: string) => void) => Promise<any>;
|
|
98
|
-
}) => Promise<any>;
|
|
99
81
|
type SendTransactionReturnType = Hash;
|
|
100
82
|
type SendTransactionParametersType = Omit<SendTransactionParameters, 'account'>;
|
|
101
83
|
type SendTransactionType = (transaction: SendTransactionParametersType) => Promise<SendTransactionReturnType>;
|
|
@@ -108,15 +90,11 @@ type WriteContractReturnType = SendTransactionReturnType;
|
|
|
108
90
|
type WriteContractType = (params: WriteContractParametersType) => Promise<WriteContractReturnType>;
|
|
109
91
|
interface UseWalletReturnType {
|
|
110
92
|
walletReady: boolean;
|
|
111
|
-
initCore: initCoreType;
|
|
112
93
|
isRecovered: isRecoveredType;
|
|
113
94
|
signMessage: signMessageType;
|
|
114
95
|
signTransaction: signTransactionType;
|
|
115
96
|
address: string;
|
|
116
97
|
evmAccount: Account | undefined;
|
|
117
|
-
recoverAfter: recoverAfterType;
|
|
118
|
-
recoveryEmbeddedWallets: recoveryEmbeddedWalletsType;
|
|
119
|
-
generateEmbeddedWallets: generateEmbeddedWalletsType;
|
|
120
98
|
createWalletClient: (parameters: Omit<WalletClientConfig, 'account'>) => Omit<ReturnType<typeof createWalletClient>, 'sendTransaction' | 'deployContract' | 'writeContract'> & {
|
|
121
99
|
sendTransaction: SendTransactionType;
|
|
122
100
|
deployContract: DeployContractType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as AuthParams, C as ChainType, E as EmbeddedWalletsParams, R as RecoveryType } from './mpc-CTbBWHld.js';
|
|
2
|
-
import { A as AnyObject,
|
|
2
|
+
import { A as AnyObject, j as AppConfigType, k as BindInfoType, l as BindItemType, m as BindWalletParam, B as ButtonProps, C as CEXType, D as DeepPartial, n as DrawerProps, E as EmailModalProps, a as IEnvConfigType, o as IEnvName, p as ILoginWalletReq, I as IMatchEvents, b as ISocialLoginMethod, q as IconProps, r as InputProps, L as LocaleType, d as LoginBoxProps, c as LoginMethodType, i as LoginModalProps, h as LoginPanelProps, s as MessageType, t as MetaPageType, u as ModalProps, M as ModalWithHeaderProps, e as OtherLoginMethodType, O as OverviewInfo, v as PohItemType, w as PohZkpassParams, P as PopoverPositionType, x as PopoverProps, g as PopoverTypeType, R as RecommendLoginMethodType, T as ThemeType, U as UIProps, y as UserAssetToken, z as UserChainType, F as UserImportTokenType, G as UserPopoverProps, H as UserTransactionType, J as WalletAssetType, K as WalletChainType, W as WalletConfigType, N as WalletPanelProps, Q as WalletReceiveMessageType, f as WalletType } from './types-yhXvLAPt.js';
|
|
3
3
|
|
|
4
4
|
declare const index_AnyObject: typeof AnyObject;
|
|
5
5
|
declare const index_AppConfigType: typeof AppConfigType;
|
|
@@ -27,6 +27,7 @@ declare const index_LoginMethodType: typeof LoginMethodType;
|
|
|
27
27
|
declare const index_LoginModalProps: typeof LoginModalProps;
|
|
28
28
|
declare const index_LoginPanelProps: typeof LoginPanelProps;
|
|
29
29
|
declare const index_MessageType: typeof MessageType;
|
|
30
|
+
declare const index_MetaPageType: typeof MetaPageType;
|
|
30
31
|
declare const index_ModalProps: typeof ModalProps;
|
|
31
32
|
declare const index_ModalWithHeaderProps: typeof ModalWithHeaderProps;
|
|
32
33
|
declare const index_OtherLoginMethodType: typeof OtherLoginMethodType;
|
|
@@ -39,13 +40,20 @@ declare const index_PopoverTypeType: typeof PopoverTypeType;
|
|
|
39
40
|
declare const index_RecommendLoginMethodType: typeof RecommendLoginMethodType;
|
|
40
41
|
declare const index_RecoveryType: typeof RecoveryType;
|
|
41
42
|
declare const index_ThemeType: typeof ThemeType;
|
|
43
|
+
declare const index_UIProps: typeof UIProps;
|
|
44
|
+
declare const index_UserAssetToken: typeof UserAssetToken;
|
|
45
|
+
declare const index_UserChainType: typeof UserChainType;
|
|
46
|
+
declare const index_UserImportTokenType: typeof UserImportTokenType;
|
|
42
47
|
declare const index_UserPopoverProps: typeof UserPopoverProps;
|
|
48
|
+
declare const index_UserTransactionType: typeof UserTransactionType;
|
|
49
|
+
declare const index_WalletAssetType: typeof WalletAssetType;
|
|
50
|
+
declare const index_WalletChainType: typeof WalletChainType;
|
|
43
51
|
declare const index_WalletConfigType: typeof WalletConfigType;
|
|
44
52
|
declare const index_WalletPanelProps: typeof WalletPanelProps;
|
|
45
53
|
declare const index_WalletReceiveMessageType: typeof WalletReceiveMessageType;
|
|
46
54
|
declare const index_WalletType: typeof WalletType;
|
|
47
55
|
declare namespace index {
|
|
48
|
-
export { index_AnyObject as AnyObject, index_AppConfigType as AppConfigType, 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 };
|
|
56
|
+
export { index_AnyObject as AnyObject, index_AppConfigType as AppConfigType, 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_MetaPageType as MetaPageType, 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_UIProps as UIProps, index_UserAssetToken as UserAssetToken, index_UserChainType as UserChainType, index_UserImportTokenType as UserImportTokenType, index_UserPopoverProps as UserPopoverProps, index_UserTransactionType as UserTransactionType, index_WalletAssetType as WalletAssetType, index_WalletChainType as WalletChainType, index_WalletConfigType as WalletConfigType, index_WalletPanelProps as WalletPanelProps, index_WalletReceiveMessageType as WalletReceiveMessageType, index_WalletType as WalletType };
|
|
49
57
|
}
|
|
50
58
|
|
|
51
59
|
export { index as i };
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
+
import { UseQueryOptions } from '@tanstack/react-query/src/types';
|
|
3
|
+
import { w as PohZkpassParams, H as UserTransactionType, J as WalletAssetType, t as MetaPageType, l as BindItemType, k as BindInfoType, v as PohItemType, z as UserChainType, y as UserAssetToken, F as UserImportTokenType, K as WalletChainType } from './types-yhXvLAPt.js';
|
|
4
|
+
|
|
5
|
+
declare const isSuccess: (res: {
|
|
6
|
+
code: number;
|
|
7
|
+
message: string;
|
|
8
|
+
data?: any;
|
|
9
|
+
}) => boolean;
|
|
10
|
+
interface MyResponseType<T> {
|
|
11
|
+
code: number;
|
|
12
|
+
data: T;
|
|
13
|
+
message: string;
|
|
14
|
+
success: boolean;
|
|
15
|
+
fail: boolean;
|
|
16
|
+
result: T;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
declare const bindCexApi: (data: {
|
|
20
|
+
cex: string;
|
|
21
|
+
api_key: string;
|
|
22
|
+
api_secret: string;
|
|
23
|
+
api_passphrase?: string;
|
|
24
|
+
}) => Promise<MyResponseType<any>>;
|
|
25
|
+
declare const unBindApi: ({ type }: {
|
|
26
|
+
type: string;
|
|
27
|
+
}) => Promise<MyResponseType<any>>;
|
|
28
|
+
declare const unBindWalletApi: ({ address }: {
|
|
29
|
+
address: string;
|
|
30
|
+
}) => Promise<MyResponseType<any>>;
|
|
31
|
+
declare const verifyPohApi: ({ taskId, schemaId, publicFields, allocatorAddress, publicFieldsHash, allocatorSignature, uHash, validatorAddress, validatorSignature }: PohZkpassParams) => Promise<MyResponseType<any>>;
|
|
32
|
+
declare const chooseIdentityApi: ({ identity }: {
|
|
33
|
+
identity: string;
|
|
34
|
+
}) => Promise<MyResponseType<any>>;
|
|
35
|
+
declare const mintPassportNftApi: () => Promise<MyResponseType<any>>;
|
|
36
|
+
declare const userImportTokenApi: (data: {
|
|
37
|
+
chain_id: string;
|
|
38
|
+
symbol: string;
|
|
39
|
+
address: string;
|
|
40
|
+
decimals: number;
|
|
41
|
+
}) => Promise<MyResponseType<any>>;
|
|
42
|
+
declare const getUserWalletTransactionsApi: (data: {
|
|
43
|
+
chain_id: string;
|
|
44
|
+
limit: number;
|
|
45
|
+
offset: number;
|
|
46
|
+
}) => Promise<MyResponseType<{
|
|
47
|
+
transactions: UserTransactionType[];
|
|
48
|
+
limit: number;
|
|
49
|
+
offset: number;
|
|
50
|
+
}>>;
|
|
51
|
+
declare const getWalletAssetListApi: (data: {
|
|
52
|
+
chain_id: string;
|
|
53
|
+
address: string;
|
|
54
|
+
}) => Promise<MyResponseType<WalletAssetType[]>>;
|
|
55
|
+
declare const getWalletListApi: (data: {
|
|
56
|
+
page: number;
|
|
57
|
+
page_size: number;
|
|
58
|
+
}) => Promise<MyResponseType<MetaPageType<{
|
|
59
|
+
wallet_list: {
|
|
60
|
+
address: string;
|
|
61
|
+
chain_network: string;
|
|
62
|
+
}[];
|
|
63
|
+
mpc_address: string;
|
|
64
|
+
}>>>;
|
|
65
|
+
|
|
66
|
+
declare function useBindList(options?: Partial<Omit<UseQueryOptions<BindItemType[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<BindItemType[], Error>;
|
|
67
|
+
declare function useBindInfo(options?: Partial<Omit<UseQueryOptions<BindInfoType>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<BindInfoType, Error>;
|
|
68
|
+
|
|
69
|
+
declare const bind_bindCexApi: typeof bindCexApi;
|
|
70
|
+
declare const bind_unBindApi: typeof unBindApi;
|
|
71
|
+
declare const bind_unBindWalletApi: typeof unBindWalletApi;
|
|
72
|
+
declare const bind_useBindInfo: typeof useBindInfo;
|
|
73
|
+
declare const bind_useBindList: typeof useBindList;
|
|
74
|
+
declare namespace bind {
|
|
75
|
+
export { bind_bindCexApi as bindCexApi, bind_unBindApi as unBindApi, bind_unBindWalletApi as unBindWalletApi, bind_useBindInfo as useBindInfo, bind_useBindList as useBindList };
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
declare function usePohList(options?: Partial<Omit<UseQueryOptions<PohItemType[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<PohItemType[], Error>;
|
|
79
|
+
|
|
80
|
+
declare const poh_usePohList: typeof usePohList;
|
|
81
|
+
declare const poh_verifyPohApi: typeof verifyPohApi;
|
|
82
|
+
declare namespace poh {
|
|
83
|
+
export { poh_usePohList as usePohList, poh_verifyPohApi as verifyPohApi };
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
declare const user_chooseIdentityApi: typeof chooseIdentityApi;
|
|
87
|
+
declare const user_mintPassportNftApi: typeof mintPassportNftApi;
|
|
88
|
+
declare namespace user {
|
|
89
|
+
export { user_chooseIdentityApi as chooseIdentityApi, user_mintPassportNftApi as mintPassportNftApi };
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
declare function useChainListQuery(options?: Partial<Omit<UseQueryOptions<UserChainType[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<UserChainType[], Error>;
|
|
93
|
+
declare function useAssetListQuery({ chainId, ...options }: {
|
|
94
|
+
chainId: number;
|
|
95
|
+
} & Partial<Omit<UseQueryOptions<UserAssetToken[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<UserAssetToken[], Error>;
|
|
96
|
+
declare function useImportTokenListQuery({ chainId, ...options }: {
|
|
97
|
+
chainId: number;
|
|
98
|
+
} & Partial<Omit<UseQueryOptions<UserImportTokenType[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<UserImportTokenType[], Error>;
|
|
99
|
+
declare function useWalletChainListQuery(options?: Partial<Omit<UseQueryOptions<WalletChainType[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<WalletChainType[], Error>;
|
|
100
|
+
|
|
101
|
+
declare const wallet_getUserWalletTransactionsApi: typeof getUserWalletTransactionsApi;
|
|
102
|
+
declare const wallet_getWalletAssetListApi: typeof getWalletAssetListApi;
|
|
103
|
+
declare const wallet_getWalletListApi: typeof getWalletListApi;
|
|
104
|
+
declare const wallet_useAssetListQuery: typeof useAssetListQuery;
|
|
105
|
+
declare const wallet_useChainListQuery: typeof useChainListQuery;
|
|
106
|
+
declare const wallet_useImportTokenListQuery: typeof useImportTokenListQuery;
|
|
107
|
+
declare const wallet_useWalletChainListQuery: typeof useWalletChainListQuery;
|
|
108
|
+
declare const wallet_userImportTokenApi: typeof userImportTokenApi;
|
|
109
|
+
declare namespace wallet {
|
|
110
|
+
export { wallet_getUserWalletTransactionsApi as getUserWalletTransactionsApi, wallet_getWalletAssetListApi as getWalletAssetListApi, wallet_getWalletListApi as getWalletListApi, wallet_useAssetListQuery as useAssetListQuery, wallet_useChainListQuery as useChainListQuery, wallet_useImportTokenListQuery as useImportTokenListQuery, wallet_useWalletChainListQuery as useWalletChainListQuery, wallet_userImportTokenApi as userImportTokenApi };
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
declare const index_bind: typeof bind;
|
|
114
|
+
declare const index_isSuccess: typeof isSuccess;
|
|
115
|
+
declare const index_poh: typeof poh;
|
|
116
|
+
declare const index_user: typeof user;
|
|
117
|
+
declare const index_wallet: typeof wallet;
|
|
118
|
+
declare namespace index {
|
|
119
|
+
export { index_bind as bind, index_isSuccess as isSuccess, index_poh as poh, index_user as user, index_wallet as wallet };
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export { isSuccess as a, bind as b, index as i, poh as p, user as u, wallet as w };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode, PropsWithChildren } from 'react';
|
|
3
|
+
import { r as InputProps, B as ButtonProps, u as ModalProps, M as ModalWithHeaderProps, x as PopoverProps } from './types-yhXvLAPt.mjs';
|
|
4
|
+
|
|
5
|
+
declare function Field({ label, children, error, required, className }: {
|
|
6
|
+
label: ReactNode;
|
|
7
|
+
error?: ReactNode;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
className?: string;
|
|
10
|
+
} & PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
declare function Input({ onChange, type, after, className, ...props }: InputProps): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
declare function Button({ size, disabled, loading, children, onClick, highlight, block, type, rounded, className, style }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
declare function Modal({ children, isOpen, width, zIndex, className }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare function ModalWithHeader({ children, onBack, onClose, title, showBorder, showClose, ...props }: ModalWithHeaderProps): react_jsx_runtime.JSX.Element;
|
|
18
|
+
|
|
19
|
+
declare function Popover({ children, content, position, type, className, gap }: PopoverProps): false | "" | 0 | react_jsx_runtime.JSX.Element | null | undefined;
|
|
20
|
+
|
|
21
|
+
declare function Overlay({ isOpen, children, zIndex, }: {
|
|
22
|
+
isOpen?: boolean;
|
|
23
|
+
zIndex?: number;
|
|
24
|
+
} & PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
25
|
+
|
|
26
|
+
export { Button as B, Field as F, Input as I, Modal as M, Overlay as O, Popover as P, ModalWithHeader as a };
|