@matchain/matchid-sdk-react 0.1.37-alpha.0 → 0.1.37-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 +129 -0
- package/dist/assets/icon/index.d.ts +129 -0
- package/dist/assets/icon/index.js +1133 -0
- package/dist/assets/icon/index.js.map +1 -0
- package/dist/assets/icon/index.mjs +88 -0
- package/dist/assets/icon/index.mjs.map +1 -0
- package/dist/chunk-336EDRZH.mjs +93 -0
- package/dist/chunk-336EDRZH.mjs.map +1 -0
- package/dist/chunk-35YNZM5K.mjs +3885 -0
- package/dist/chunk-35YNZM5K.mjs.map +1 -0
- package/dist/chunk-6PWH7WZI.mjs +1067 -0
- package/dist/chunk-6PWH7WZI.mjs.map +1 -0
- package/dist/chunk-HYQ3T6WW.mjs +79 -0
- package/dist/chunk-HYQ3T6WW.mjs.map +1 -0
- package/dist/chunk-J5LGTIGS.mjs +10 -0
- package/dist/chunk-J5LGTIGS.mjs.map +1 -0
- package/dist/components/index.d.mts +4 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +3715 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +39 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/config/chains/index.d.mts +2 -0
- package/dist/config/chains/index.d.ts +2 -0
- package/dist/config/chains/index.js +94 -0
- package/dist/config/chains/index.js.map +1 -0
- package/dist/config/chains/index.mjs +10 -0
- package/dist/config/chains/index.mjs.map +1 -0
- package/dist/hooks/api/index.d.mts +5 -0
- package/dist/hooks/api/index.d.ts +5 -0
- package/dist/hooks/api/index.js +1024 -0
- package/dist/hooks/api/index.js.map +1 -0
- package/dist/hooks/api/index.mjs +14 -0
- package/dist/hooks/api/index.mjs.map +1 -0
- package/dist/hooks/index.d.mts +4 -0
- package/dist/hooks/index.d.ts +4 -0
- package/dist/hooks/index.js +1069 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/index.mjs +17 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/index-B89X65ox.d.ts +83 -0
- package/dist/index-BICt0DjJ.d.ts +64 -0
- package/dist/index-BTTka3Uo.d.mts +75 -0
- package/dist/index-CAvsdgJw.d.mts +83 -0
- package/dist/index-CzAaZV-2.d.mts +64 -0
- package/dist/index-DUCRzr-P.d.ts +75 -0
- package/dist/index-DXRGMAbv.d.mts +83 -0
- package/dist/index-DXRGMAbv.d.ts +83 -0
- package/dist/index.css +26 -16
- package/dist/index.d.mts +12 -436
- package/dist/index.d.ts +12 -436
- package/dist/index.js +1563 -309
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -3682
- package/dist/index.mjs.map +1 -1
- package/dist/types.d-Cqt8ifXa.d.mts +176 -0
- package/dist/types.d-Cqt8ifXa.d.ts +176 -0
- package/example/src/components/Login/index.tsx +1 -1
- package/example/src/config/index.ts +6 -1
- package/example/src/pages/User.tsx +13 -4
- package/package.json +23 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useCopyClipboard,
|
|
3
|
+
useLayout_exports,
|
|
4
|
+
useMatchEvents,
|
|
5
|
+
useUserInfo,
|
|
6
|
+
useWallet
|
|
7
|
+
} from "../chunk-35YNZM5K.mjs";
|
|
8
|
+
import "../chunk-6PWH7WZI.mjs";
|
|
9
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
10
|
+
export {
|
|
11
|
+
useCopyClipboard,
|
|
12
|
+
useLayout_exports as useLayout,
|
|
13
|
+
useMatchEvents,
|
|
14
|
+
useUserInfo,
|
|
15
|
+
useWallet
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { E as EmailModalProps, d as InputProps, B as ButtonProps, M as ModalProps, e as ModalWithHeaderProps, P as PopoverProps, f as LoginBoxProps, g as OtherLoginMethodType, R as RecommendLoginMethodType, W as WalletType, h as PopoverPositionType, i as PopoverTypeType, j as LoginPanelProps, k as LoginModalProps } from './types.d-Cqt8ifXa.js';
|
|
3
|
+
import { ReactNode, PropsWithChildren } from 'react';
|
|
4
|
+
|
|
5
|
+
declare function EmailModal({ isOpen, width, onClose, onBack, onLogin }: EmailModalProps): react_jsx_runtime.JSX.Element;
|
|
6
|
+
|
|
7
|
+
declare function Field({ label, children, error, required, className }: {
|
|
8
|
+
label: ReactNode;
|
|
9
|
+
error?: ReactNode;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
} & PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
declare function Input({ onChange, type, after, className, ...props }: InputProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
declare function Button({ size, disabled, loading, children, onClick, highlight, block, type, rounded, className, style }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
|
|
18
|
+
declare function Modal({ children, isOpen, width, zIndex, className }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
declare function ModalWithHeader({ children, onBack, onClose, title, showBorder, showClose, ...props }: ModalWithHeaderProps): react_jsx_runtime.JSX.Element;
|
|
20
|
+
|
|
21
|
+
declare function Popover({ children, content, position, type, className, gap }: PopoverProps): false | "" | 0 | react_jsx_runtime.JSX.Element | null | undefined;
|
|
22
|
+
|
|
23
|
+
declare function LoginBox({ recommendMethods, methods, walletMethods, inModal }: LoginBoxProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
declare function LoginButton({ loginRender, methods, recommendMethods, onLoginClick, popoverPosition, popoverType, popoverGap, walletMethods, ...props }: Omit<ButtonProps, 'onClick' | 'highlight'> & {
|
|
26
|
+
loginRender?: ReactNode;
|
|
27
|
+
methods?: OtherLoginMethodType[];
|
|
28
|
+
recommendMethods?: RecommendLoginMethodType[];
|
|
29
|
+
walletMethods?: WalletType[];
|
|
30
|
+
onLoginClick?: () => void;
|
|
31
|
+
popoverPosition?: PopoverPositionType;
|
|
32
|
+
popoverType?: PopoverTypeType;
|
|
33
|
+
popoverGap?: number | string;
|
|
34
|
+
}): react_jsx_runtime.JSX.Element;
|
|
35
|
+
|
|
36
|
+
declare function LoginPanel({ header, onClose, ...props }: LoginPanelProps): react_jsx_runtime.JSX.Element;
|
|
37
|
+
|
|
38
|
+
declare function LoginModal({ isOpen, width, ...props }: LoginModalProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
|
|
40
|
+
declare function UsernameModal({ title, isOpen, onSuccess, ...props }: ModalWithHeaderProps & {
|
|
41
|
+
onSuccess?: () => void;
|
|
42
|
+
}): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
declare function PasswordModal({ title, isOpen, onSuccess, ...props }: ModalWithHeaderProps & {
|
|
45
|
+
onSuccess?: () => void;
|
|
46
|
+
}): react_jsx_runtime.JSX.Element;
|
|
47
|
+
|
|
48
|
+
declare function SOLModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
|
|
49
|
+
type?: 'login' | 'bind' | '';
|
|
50
|
+
onSuccess?: () => void;
|
|
51
|
+
}): react_jsx_runtime.JSX.Element;
|
|
52
|
+
|
|
53
|
+
declare function TRONModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
|
|
54
|
+
type?: 'login' | 'bind' | '';
|
|
55
|
+
onSuccess?: () => void;
|
|
56
|
+
}): react_jsx_runtime.JSX.Element;
|
|
57
|
+
|
|
58
|
+
declare function BTCModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
|
|
59
|
+
type?: 'login' | 'bind' | '';
|
|
60
|
+
onSuccess?: () => void;
|
|
61
|
+
}): react_jsx_runtime.JSX.Element;
|
|
62
|
+
|
|
63
|
+
declare const index_BTCModal: typeof BTCModal;
|
|
64
|
+
declare const index_Button: typeof Button;
|
|
65
|
+
declare const index_EmailModal: typeof EmailModal;
|
|
66
|
+
declare const index_Field: typeof Field;
|
|
67
|
+
declare const index_Input: typeof Input;
|
|
68
|
+
declare const index_LoginBox: typeof LoginBox;
|
|
69
|
+
declare const index_LoginButton: typeof LoginButton;
|
|
70
|
+
declare const index_LoginModal: typeof LoginModal;
|
|
71
|
+
declare const index_LoginPanel: typeof LoginPanel;
|
|
72
|
+
declare const index_Modal: typeof Modal;
|
|
73
|
+
declare const index_ModalWithHeader: typeof ModalWithHeader;
|
|
74
|
+
declare const index_PasswordModal: typeof PasswordModal;
|
|
75
|
+
declare const index_Popover: typeof Popover;
|
|
76
|
+
declare const index_SOLModal: typeof SOLModal;
|
|
77
|
+
declare const index_TRONModal: typeof TRONModal;
|
|
78
|
+
declare const index_UsernameModal: typeof UsernameModal;
|
|
79
|
+
declare namespace index {
|
|
80
|
+
export { index_BTCModal as BTCModal, index_Button as Button, index_EmailModal as EmailModal, index_Field as Field, index_Input as Input, index_LoginBox as LoginBox, index_LoginButton as LoginButton, index_LoginModal as LoginModal, index_LoginPanel as LoginPanel, index_Modal as Modal, index_ModalWithHeader as ModalWithHeader, index_PasswordModal as PasswordModal, index_Popover as Popover, index_SOLModal as SOLModal, index_TRONModal as TRONModal, index_UsernameModal as UsernameModal };
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export { Button as B, EmailModal as E, Field as F, Input as I, LoginBox as L, Modal as M, Popover as P, SOLModal as S, TRONModal as T, UsernameModal as U, ModalWithHeader as a, LoginButton as b, LoginPanel as c, LoginModal as d, PasswordModal as e, BTCModal as f, index as i };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
+
import { UseQueryOptions } from '@tanstack/react-query/src/types';
|
|
3
|
+
import { m as PohZkpassParams, n as BindItemType, o as BindInfoType, p as PohItemType } from './types.d-Cqt8ifXa.js';
|
|
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: ({ cex, api_key, api_secret }: {
|
|
15
|
+
cex: string;
|
|
16
|
+
api_key: string;
|
|
17
|
+
api_secret: string;
|
|
18
|
+
}) => Promise<MyResponseType<any>>;
|
|
19
|
+
declare const unBindApi: ({ type }: {
|
|
20
|
+
type: string;
|
|
21
|
+
}) => Promise<MyResponseType<any>>;
|
|
22
|
+
declare const unBindWalletApi: ({ address }: {
|
|
23
|
+
address: string;
|
|
24
|
+
}) => Promise<MyResponseType<any>>;
|
|
25
|
+
declare const verifyPohApi: ({ taskId, schemaId, publicFields, allocatorAddress, publicFieldsHash, allocatorSignature, uHash, validatorAddress, validatorSignature }: PohZkpassParams) => Promise<MyResponseType<any>>;
|
|
26
|
+
declare const chooseIdentityApi: ({ identity }: {
|
|
27
|
+
identity: string;
|
|
28
|
+
}) => Promise<MyResponseType<any>>;
|
|
29
|
+
declare const mintPassportNftApi: () => Promise<MyResponseType<any>>;
|
|
30
|
+
|
|
31
|
+
declare function useBindList(options?: Partial<Omit<UseQueryOptions<BindItemType[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<BindItemType[], Error>;
|
|
32
|
+
declare function useBindInfo(options?: Partial<Omit<UseQueryOptions<BindInfoType>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<BindInfoType, Error>;
|
|
33
|
+
|
|
34
|
+
declare const bind_bindCexApi: typeof bindCexApi;
|
|
35
|
+
declare const bind_unBindApi: typeof unBindApi;
|
|
36
|
+
declare const bind_unBindWalletApi: typeof unBindWalletApi;
|
|
37
|
+
declare const bind_useBindInfo: typeof useBindInfo;
|
|
38
|
+
declare const bind_useBindList: typeof useBindList;
|
|
39
|
+
declare namespace bind {
|
|
40
|
+
export { bind_bindCexApi as bindCexApi, bind_unBindApi as unBindApi, bind_unBindWalletApi as unBindWalletApi, bind_useBindInfo as useBindInfo, bind_useBindList as useBindList };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare function usePohList(options?: Partial<Omit<UseQueryOptions<PohItemType[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<PohItemType[], Error>;
|
|
44
|
+
|
|
45
|
+
declare const poh_usePohList: typeof usePohList;
|
|
46
|
+
declare const poh_verifyPohApi: typeof verifyPohApi;
|
|
47
|
+
declare namespace poh {
|
|
48
|
+
export { poh_usePohList as usePohList, poh_verifyPohApi as verifyPohApi };
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare const user_chooseIdentityApi: typeof chooseIdentityApi;
|
|
52
|
+
declare const user_mintPassportNftApi: typeof mintPassportNftApi;
|
|
53
|
+
declare namespace user {
|
|
54
|
+
export { user_chooseIdentityApi as chooseIdentityApi, user_mintPassportNftApi as mintPassportNftApi };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare const index_bind: typeof bind;
|
|
58
|
+
declare const index_poh: typeof poh;
|
|
59
|
+
declare const index_user: typeof user;
|
|
60
|
+
declare namespace index {
|
|
61
|
+
export { index_bind as bind, index_poh as poh, index_user as user };
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { bind as b, index as i, poh as p, user as u };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { b as ISocialLoginMethod, O as OverviewInfo, C as CEXType, c as LoginMethodType, I as IMatchEvents } from './types.d-Cqt8ifXa.mjs';
|
|
2
|
+
import * as viem from 'viem';
|
|
3
|
+
import { SignableMessage, Hex, TransactionSerializable, Account } from 'viem';
|
|
4
|
+
|
|
5
|
+
declare function useUserInfo(): {
|
|
6
|
+
loginByMethod: (method: ISocialLoginMethod) => Promise<Window | null>;
|
|
7
|
+
loginByTelegram: () => Promise<Window | null>;
|
|
8
|
+
loginByTwitter: () => Promise<Window | null>;
|
|
9
|
+
loginByGoogle: () => Promise<Window | null>;
|
|
10
|
+
loginByWallet: () => Promise<Window | null>;
|
|
11
|
+
loginByEmail: ({ email, code }: {
|
|
12
|
+
email: string;
|
|
13
|
+
code: string;
|
|
14
|
+
}) => Promise<boolean>;
|
|
15
|
+
bindWallet: () => Promise<Window | null>;
|
|
16
|
+
bindTelegram: () => Promise<void>;
|
|
17
|
+
token: string;
|
|
18
|
+
mid: string;
|
|
19
|
+
did: string;
|
|
20
|
+
address: string;
|
|
21
|
+
isLogin: boolean;
|
|
22
|
+
logout: () => Promise<void>;
|
|
23
|
+
getLoginEmailCode: (email: string) => Promise<string>;
|
|
24
|
+
refreshOverview: () => Promise<void>;
|
|
25
|
+
overview: OverviewInfo | null;
|
|
26
|
+
bindCex: (type: CEXType) => void;
|
|
27
|
+
username: string;
|
|
28
|
+
auth: () => Promise<any>;
|
|
29
|
+
login: (method: LoginMethodType) => Promise<void | Window | null>;
|
|
30
|
+
bind: (method: LoginMethodType) => Promise<void | Window | null>;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
declare function useMatchEvents(handlers: IMatchEvents): void;
|
|
34
|
+
|
|
35
|
+
type ChainType = "ethereum" | "solana";
|
|
36
|
+
type RecoveryType = "base_generated_recovery_key" | "user_passcode_recovery_key"
|
|
37
|
+
|
|
38
|
+
interface UseWalletReturnType {
|
|
39
|
+
initWallet: (params: {
|
|
40
|
+
address: string;
|
|
41
|
+
did: string;
|
|
42
|
+
}) => Promise<void>;
|
|
43
|
+
generateWallet: (params: {
|
|
44
|
+
did: string;
|
|
45
|
+
userPasscode: string;
|
|
46
|
+
}) => Promise<string>;
|
|
47
|
+
isRecovered: () => Promise<boolean>;
|
|
48
|
+
recoveryWallet: (chainType: ChainType | undefined, recoveryType: RecoveryType, userPasscode?: string) => Promise<void>;
|
|
49
|
+
signMessage: (message: SignableMessage, type?: ChainType) => Promise<Hex>;
|
|
50
|
+
signTransaction: (transaction: TransactionSerializable, type?: ChainType) => Promise<`0x02${string}` | `0x01${string}` | `0x03${string}` | `0x04${string}` | viem.TransactionSerializedLegacy>;
|
|
51
|
+
address: string;
|
|
52
|
+
evmAccount: Account | undefined;
|
|
53
|
+
recoverAfter: (func: (resolve: (value: any) => void, reject: (reason: string) => void) => Promise<any>) => Promise<any>;
|
|
54
|
+
}
|
|
55
|
+
declare function useWallet(): UseWalletReturnType;
|
|
56
|
+
|
|
57
|
+
declare function useCopyClipboard(timeout?: number): [boolean, (toCopy: string) => void];
|
|
58
|
+
|
|
59
|
+
declare function useDownMd(): boolean;
|
|
60
|
+
|
|
61
|
+
declare const useLayout_useDownMd: typeof useDownMd;
|
|
62
|
+
declare namespace useLayout {
|
|
63
|
+
export { useLayout_useDownMd as useDownMd };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare const index_useCopyClipboard: typeof useCopyClipboard;
|
|
67
|
+
declare const index_useLayout: typeof useLayout;
|
|
68
|
+
declare const index_useMatchEvents: typeof useMatchEvents;
|
|
69
|
+
declare const index_useUserInfo: typeof useUserInfo;
|
|
70
|
+
declare const index_useWallet: typeof useWallet;
|
|
71
|
+
declare namespace index {
|
|
72
|
+
export { index_useCopyClipboard as useCopyClipboard, index_useLayout as useLayout, index_useMatchEvents as useMatchEvents, index_useUserInfo as useUserInfo, index_useWallet as useWallet };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
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 react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { E as EmailModalProps, d as InputProps, B as ButtonProps, M as ModalProps, e as ModalWithHeaderProps, P as PopoverProps, f as LoginBoxProps, g as OtherLoginMethodType, R as RecommendLoginMethodType, W as WalletType, h as PopoverPositionType, i as PopoverTypeType, j as LoginPanelProps, k as LoginModalProps } from './types.d-Cqt8ifXa.mjs';
|
|
3
|
+
import { ReactNode, PropsWithChildren } from 'react';
|
|
4
|
+
|
|
5
|
+
declare function EmailModal({ isOpen, width, onClose, onBack, onLogin }: EmailModalProps): react_jsx_runtime.JSX.Element;
|
|
6
|
+
|
|
7
|
+
declare function Field({ label, children, error, required, className }: {
|
|
8
|
+
label: ReactNode;
|
|
9
|
+
error?: ReactNode;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
} & PropsWithChildren): react_jsx_runtime.JSX.Element;
|
|
13
|
+
|
|
14
|
+
declare function Input({ onChange, type, after, className, ...props }: InputProps): react_jsx_runtime.JSX.Element;
|
|
15
|
+
|
|
16
|
+
declare function Button({ size, disabled, loading, children, onClick, highlight, block, type, rounded, className, style }: ButtonProps): react_jsx_runtime.JSX.Element;
|
|
17
|
+
|
|
18
|
+
declare function Modal({ children, isOpen, width, zIndex, className }: ModalProps): react_jsx_runtime.JSX.Element;
|
|
19
|
+
declare function ModalWithHeader({ children, onBack, onClose, title, showBorder, showClose, ...props }: ModalWithHeaderProps): react_jsx_runtime.JSX.Element;
|
|
20
|
+
|
|
21
|
+
declare function Popover({ children, content, position, type, className, gap }: PopoverProps): false | "" | 0 | react_jsx_runtime.JSX.Element | null | undefined;
|
|
22
|
+
|
|
23
|
+
declare function LoginBox({ recommendMethods, methods, walletMethods, inModal }: LoginBoxProps): react_jsx_runtime.JSX.Element;
|
|
24
|
+
|
|
25
|
+
declare function LoginButton({ loginRender, methods, recommendMethods, onLoginClick, popoverPosition, popoverType, popoverGap, walletMethods, ...props }: Omit<ButtonProps, 'onClick' | 'highlight'> & {
|
|
26
|
+
loginRender?: ReactNode;
|
|
27
|
+
methods?: OtherLoginMethodType[];
|
|
28
|
+
recommendMethods?: RecommendLoginMethodType[];
|
|
29
|
+
walletMethods?: WalletType[];
|
|
30
|
+
onLoginClick?: () => void;
|
|
31
|
+
popoverPosition?: PopoverPositionType;
|
|
32
|
+
popoverType?: PopoverTypeType;
|
|
33
|
+
popoverGap?: number | string;
|
|
34
|
+
}): react_jsx_runtime.JSX.Element;
|
|
35
|
+
|
|
36
|
+
declare function LoginPanel({ header, onClose, ...props }: LoginPanelProps): react_jsx_runtime.JSX.Element;
|
|
37
|
+
|
|
38
|
+
declare function LoginModal({ isOpen, width, ...props }: LoginModalProps): react_jsx_runtime.JSX.Element;
|
|
39
|
+
|
|
40
|
+
declare function UsernameModal({ title, isOpen, onSuccess, ...props }: ModalWithHeaderProps & {
|
|
41
|
+
onSuccess?: () => void;
|
|
42
|
+
}): react_jsx_runtime.JSX.Element;
|
|
43
|
+
|
|
44
|
+
declare function PasswordModal({ title, isOpen, onSuccess, ...props }: ModalWithHeaderProps & {
|
|
45
|
+
onSuccess?: () => void;
|
|
46
|
+
}): react_jsx_runtime.JSX.Element;
|
|
47
|
+
|
|
48
|
+
declare function SOLModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
|
|
49
|
+
type?: 'login' | 'bind' | '';
|
|
50
|
+
onSuccess?: () => void;
|
|
51
|
+
}): react_jsx_runtime.JSX.Element;
|
|
52
|
+
|
|
53
|
+
declare function TRONModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
|
|
54
|
+
type?: 'login' | 'bind' | '';
|
|
55
|
+
onSuccess?: () => void;
|
|
56
|
+
}): react_jsx_runtime.JSX.Element;
|
|
57
|
+
|
|
58
|
+
declare function BTCModal({ type, onSuccess, ...props }: ModalWithHeaderProps & {
|
|
59
|
+
type?: 'login' | 'bind' | '';
|
|
60
|
+
onSuccess?: () => void;
|
|
61
|
+
}): react_jsx_runtime.JSX.Element;
|
|
62
|
+
|
|
63
|
+
declare const index_BTCModal: typeof BTCModal;
|
|
64
|
+
declare const index_Button: typeof Button;
|
|
65
|
+
declare const index_EmailModal: typeof EmailModal;
|
|
66
|
+
declare const index_Field: typeof Field;
|
|
67
|
+
declare const index_Input: typeof Input;
|
|
68
|
+
declare const index_LoginBox: typeof LoginBox;
|
|
69
|
+
declare const index_LoginButton: typeof LoginButton;
|
|
70
|
+
declare const index_LoginModal: typeof LoginModal;
|
|
71
|
+
declare const index_LoginPanel: typeof LoginPanel;
|
|
72
|
+
declare const index_Modal: typeof Modal;
|
|
73
|
+
declare const index_ModalWithHeader: typeof ModalWithHeader;
|
|
74
|
+
declare const index_PasswordModal: typeof PasswordModal;
|
|
75
|
+
declare const index_Popover: typeof Popover;
|
|
76
|
+
declare const index_SOLModal: typeof SOLModal;
|
|
77
|
+
declare const index_TRONModal: typeof TRONModal;
|
|
78
|
+
declare const index_UsernameModal: typeof UsernameModal;
|
|
79
|
+
declare namespace index {
|
|
80
|
+
export { index_BTCModal as BTCModal, index_Button as Button, index_EmailModal as EmailModal, index_Field as Field, index_Input as Input, index_LoginBox as LoginBox, index_LoginButton as LoginButton, index_LoginModal as LoginModal, index_LoginPanel as LoginPanel, index_Modal as Modal, index_ModalWithHeader as ModalWithHeader, index_PasswordModal as PasswordModal, index_Popover as Popover, index_SOLModal as SOLModal, index_TRONModal as TRONModal, index_UsernameModal as UsernameModal };
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export { Button as B, EmailModal as E, Field as F, Input as I, LoginBox as L, Modal as M, Popover as P, SOLModal as S, TRONModal as T, UsernameModal as U, ModalWithHeader as a, LoginButton as b, LoginPanel as c, LoginModal as d, PasswordModal as e, BTCModal as f, index as i };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
+
import { UseQueryOptions } from '@tanstack/react-query/src/types';
|
|
3
|
+
import { m as PohZkpassParams, n as BindItemType, o as BindInfoType, p as PohItemType } from './types.d-Cqt8ifXa.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: ({ cex, api_key, api_secret }: {
|
|
15
|
+
cex: string;
|
|
16
|
+
api_key: string;
|
|
17
|
+
api_secret: string;
|
|
18
|
+
}) => Promise<MyResponseType<any>>;
|
|
19
|
+
declare const unBindApi: ({ type }: {
|
|
20
|
+
type: string;
|
|
21
|
+
}) => Promise<MyResponseType<any>>;
|
|
22
|
+
declare const unBindWalletApi: ({ address }: {
|
|
23
|
+
address: string;
|
|
24
|
+
}) => Promise<MyResponseType<any>>;
|
|
25
|
+
declare const verifyPohApi: ({ taskId, schemaId, publicFields, allocatorAddress, publicFieldsHash, allocatorSignature, uHash, validatorAddress, validatorSignature }: PohZkpassParams) => Promise<MyResponseType<any>>;
|
|
26
|
+
declare const chooseIdentityApi: ({ identity }: {
|
|
27
|
+
identity: string;
|
|
28
|
+
}) => Promise<MyResponseType<any>>;
|
|
29
|
+
declare const mintPassportNftApi: () => Promise<MyResponseType<any>>;
|
|
30
|
+
|
|
31
|
+
declare function useBindList(options?: Partial<Omit<UseQueryOptions<BindItemType[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<BindItemType[], Error>;
|
|
32
|
+
declare function useBindInfo(options?: Partial<Omit<UseQueryOptions<BindInfoType>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<BindInfoType, Error>;
|
|
33
|
+
|
|
34
|
+
declare const bind_bindCexApi: typeof bindCexApi;
|
|
35
|
+
declare const bind_unBindApi: typeof unBindApi;
|
|
36
|
+
declare const bind_unBindWalletApi: typeof unBindWalletApi;
|
|
37
|
+
declare const bind_useBindInfo: typeof useBindInfo;
|
|
38
|
+
declare const bind_useBindList: typeof useBindList;
|
|
39
|
+
declare namespace bind {
|
|
40
|
+
export { bind_bindCexApi as bindCexApi, bind_unBindApi as unBindApi, bind_unBindWalletApi as unBindWalletApi, bind_useBindInfo as useBindInfo, bind_useBindList as useBindList };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare function usePohList(options?: Partial<Omit<UseQueryOptions<PohItemType[]>, 'queryKey' | 'queryFn'>>): _tanstack_react_query.UseQueryResult<PohItemType[], Error>;
|
|
44
|
+
|
|
45
|
+
declare const poh_usePohList: typeof usePohList;
|
|
46
|
+
declare const poh_verifyPohApi: typeof verifyPohApi;
|
|
47
|
+
declare namespace poh {
|
|
48
|
+
export { poh_usePohList as usePohList, poh_verifyPohApi as verifyPohApi };
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare const user_chooseIdentityApi: typeof chooseIdentityApi;
|
|
52
|
+
declare const user_mintPassportNftApi: typeof mintPassportNftApi;
|
|
53
|
+
declare namespace user {
|
|
54
|
+
export { user_chooseIdentityApi as chooseIdentityApi, user_mintPassportNftApi as mintPassportNftApi };
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare const index_bind: typeof bind;
|
|
58
|
+
declare const index_poh: typeof poh;
|
|
59
|
+
declare const index_user: typeof user;
|
|
60
|
+
declare namespace index {
|
|
61
|
+
export { index_bind as bind, index_poh as poh, index_user as user };
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export { bind as b, index as i, poh as p, user as u };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { b as ISocialLoginMethod, O as OverviewInfo, C as CEXType, c as LoginMethodType, I as IMatchEvents } from './types.d-Cqt8ifXa.js';
|
|
2
|
+
import * as viem from 'viem';
|
|
3
|
+
import { SignableMessage, Hex, TransactionSerializable, Account } from 'viem';
|
|
4
|
+
|
|
5
|
+
declare function useUserInfo(): {
|
|
6
|
+
loginByMethod: (method: ISocialLoginMethod) => Promise<Window | null>;
|
|
7
|
+
loginByTelegram: () => Promise<Window | null>;
|
|
8
|
+
loginByTwitter: () => Promise<Window | null>;
|
|
9
|
+
loginByGoogle: () => Promise<Window | null>;
|
|
10
|
+
loginByWallet: () => Promise<Window | null>;
|
|
11
|
+
loginByEmail: ({ email, code }: {
|
|
12
|
+
email: string;
|
|
13
|
+
code: string;
|
|
14
|
+
}) => Promise<boolean>;
|
|
15
|
+
bindWallet: () => Promise<Window | null>;
|
|
16
|
+
bindTelegram: () => Promise<void>;
|
|
17
|
+
token: string;
|
|
18
|
+
mid: string;
|
|
19
|
+
did: string;
|
|
20
|
+
address: string;
|
|
21
|
+
isLogin: boolean;
|
|
22
|
+
logout: () => Promise<void>;
|
|
23
|
+
getLoginEmailCode: (email: string) => Promise<string>;
|
|
24
|
+
refreshOverview: () => Promise<void>;
|
|
25
|
+
overview: OverviewInfo | null;
|
|
26
|
+
bindCex: (type: CEXType) => void;
|
|
27
|
+
username: string;
|
|
28
|
+
auth: () => Promise<any>;
|
|
29
|
+
login: (method: LoginMethodType) => Promise<void | Window | null>;
|
|
30
|
+
bind: (method: LoginMethodType) => Promise<void | Window | null>;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
declare function useMatchEvents(handlers: IMatchEvents): void;
|
|
34
|
+
|
|
35
|
+
type ChainType = "ethereum" | "solana";
|
|
36
|
+
type RecoveryType = "base_generated_recovery_key" | "user_passcode_recovery_key"
|
|
37
|
+
|
|
38
|
+
interface UseWalletReturnType {
|
|
39
|
+
initWallet: (params: {
|
|
40
|
+
address: string;
|
|
41
|
+
did: string;
|
|
42
|
+
}) => Promise<void>;
|
|
43
|
+
generateWallet: (params: {
|
|
44
|
+
did: string;
|
|
45
|
+
userPasscode: string;
|
|
46
|
+
}) => Promise<string>;
|
|
47
|
+
isRecovered: () => Promise<boolean>;
|
|
48
|
+
recoveryWallet: (chainType: ChainType | undefined, recoveryType: RecoveryType, userPasscode?: string) => Promise<void>;
|
|
49
|
+
signMessage: (message: SignableMessage, type?: ChainType) => Promise<Hex>;
|
|
50
|
+
signTransaction: (transaction: TransactionSerializable, type?: ChainType) => Promise<`0x02${string}` | `0x01${string}` | `0x03${string}` | `0x04${string}` | viem.TransactionSerializedLegacy>;
|
|
51
|
+
address: string;
|
|
52
|
+
evmAccount: Account | undefined;
|
|
53
|
+
recoverAfter: (func: (resolve: (value: any) => void, reject: (reason: string) => void) => Promise<any>) => Promise<any>;
|
|
54
|
+
}
|
|
55
|
+
declare function useWallet(): UseWalletReturnType;
|
|
56
|
+
|
|
57
|
+
declare function useCopyClipboard(timeout?: number): [boolean, (toCopy: string) => void];
|
|
58
|
+
|
|
59
|
+
declare function useDownMd(): boolean;
|
|
60
|
+
|
|
61
|
+
declare const useLayout_useDownMd: typeof useDownMd;
|
|
62
|
+
declare namespace useLayout {
|
|
63
|
+
export { useLayout_useDownMd as useDownMd };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare const index_useCopyClipboard: typeof useCopyClipboard;
|
|
67
|
+
declare const index_useLayout: typeof useLayout;
|
|
68
|
+
declare const index_useMatchEvents: typeof useMatchEvents;
|
|
69
|
+
declare const index_useUserInfo: typeof useUserInfo;
|
|
70
|
+
declare const index_useWallet: typeof useWallet;
|
|
71
|
+
declare namespace index {
|
|
72
|
+
export { index_useCopyClipboard as useCopyClipboard, index_useLayout as useLayout, index_useMatchEvents as useMatchEvents, index_useUserInfo as useUserInfo, index_useWallet as useWallet };
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
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 };
|