@matchain/matchid-sdk-react 0.1.37-alpha.1 → 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 +12 -12
- 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,93 @@
|
|
|
1
|
+
import {
|
|
2
|
+
bindCexApi,
|
|
3
|
+
chooseIdentityApi,
|
|
4
|
+
getBindInfoApi,
|
|
5
|
+
getBindListApi,
|
|
6
|
+
getPohListApi,
|
|
7
|
+
mintPassportNftApi,
|
|
8
|
+
unBindApi,
|
|
9
|
+
unBindWalletApi,
|
|
10
|
+
useUserInfo,
|
|
11
|
+
verifyPohApi
|
|
12
|
+
} from "./chunk-35YNZM5K.mjs";
|
|
13
|
+
import {
|
|
14
|
+
__export
|
|
15
|
+
} from "./chunk-J5LGTIGS.mjs";
|
|
16
|
+
|
|
17
|
+
// src/hooks/api/index.ts
|
|
18
|
+
var api_exports = {};
|
|
19
|
+
__export(api_exports, {
|
|
20
|
+
bind: () => bind_exports,
|
|
21
|
+
poh: () => poh_exports,
|
|
22
|
+
user: () => user_exports
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
// src/hooks/api/bind.ts
|
|
26
|
+
var bind_exports = {};
|
|
27
|
+
__export(bind_exports, {
|
|
28
|
+
bindCexApi: () => bindCexApi,
|
|
29
|
+
unBindApi: () => unBindApi,
|
|
30
|
+
unBindWalletApi: () => unBindWalletApi,
|
|
31
|
+
useBindInfo: () => useBindInfo,
|
|
32
|
+
useBindList: () => useBindList
|
|
33
|
+
});
|
|
34
|
+
import { useQuery } from "@tanstack/react-query";
|
|
35
|
+
function useBindList(options) {
|
|
36
|
+
const { isLogin } = useUserInfo();
|
|
37
|
+
return useQuery({
|
|
38
|
+
queryKey: ["bindList"],
|
|
39
|
+
enabled: isLogin,
|
|
40
|
+
queryFn: async () => {
|
|
41
|
+
let res = await getBindListApi();
|
|
42
|
+
return res.data;
|
|
43
|
+
},
|
|
44
|
+
...options
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function useBindInfo(options) {
|
|
48
|
+
const { isLogin } = useUserInfo();
|
|
49
|
+
return useQuery({
|
|
50
|
+
queryKey: ["bindInfo"],
|
|
51
|
+
enabled: isLogin,
|
|
52
|
+
queryFn: async () => {
|
|
53
|
+
let res = await getBindInfoApi();
|
|
54
|
+
return res.data;
|
|
55
|
+
},
|
|
56
|
+
...options
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// src/hooks/api/poh.ts
|
|
61
|
+
var poh_exports = {};
|
|
62
|
+
__export(poh_exports, {
|
|
63
|
+
usePohList: () => usePohList,
|
|
64
|
+
verifyPohApi: () => verifyPohApi
|
|
65
|
+
});
|
|
66
|
+
import { useQuery as useQuery2 } from "@tanstack/react-query";
|
|
67
|
+
function usePohList(options) {
|
|
68
|
+
const { isLogin } = useUserInfo();
|
|
69
|
+
return useQuery2({
|
|
70
|
+
queryKey: ["pohList"],
|
|
71
|
+
enabled: isLogin,
|
|
72
|
+
queryFn: async () => {
|
|
73
|
+
let res = await getPohListApi();
|
|
74
|
+
return res.data;
|
|
75
|
+
},
|
|
76
|
+
...options
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// src/hooks/api/user.ts
|
|
81
|
+
var user_exports = {};
|
|
82
|
+
__export(user_exports, {
|
|
83
|
+
chooseIdentityApi: () => chooseIdentityApi,
|
|
84
|
+
mintPassportNftApi: () => mintPassportNftApi
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
export {
|
|
88
|
+
bind_exports,
|
|
89
|
+
poh_exports,
|
|
90
|
+
user_exports,
|
|
91
|
+
api_exports
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=chunk-336EDRZH.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/api/index.ts","../src/hooks/api/bind.ts","../src/hooks/api/poh.ts","../src/hooks/api/user.ts"],"sourcesContent":["export * as bind from \"./bind\";\nexport * as poh from \"./poh\";\nexport * as user from \"./user\";","import {useQuery} from \"@tanstack/react-query\";\nimport useUserInfo from \"../useUserInfo\";\nimport type {UseQueryOptions} from \"@tanstack/react-query/src/types\";\nimport {BindInfoType, BindItemType} from \"../../types/types\";\nimport {getBindInfoApi, getBindListApi} from \"../../api\";\n\nexport {bindCexApi, unBindApi, unBindWalletApi} from \"../../api\";\n\nexport function useBindList(options?: Partial<Omit<UseQueryOptions<BindItemType[]>, 'queryKey' | 'queryFn'>>) {\n const {isLogin} = useUserInfo()\n return useQuery<BindItemType[]>({\n queryKey: ['bindList'],\n enabled: isLogin,\n queryFn: async () => {\n let res = await getBindListApi()\n return res.data\n },\n ...options\n })\n}\n\nexport function useBindInfo(options?: Partial<Omit<UseQueryOptions<BindInfoType>, 'queryKey' | 'queryFn'>>) {\n const {isLogin} = useUserInfo()\n return useQuery<BindInfoType>({\n queryKey: ['bindInfo'],\n enabled: isLogin,\n queryFn: async () => {\n let res = await getBindInfoApi()\n return res.data\n },\n ...options\n })\n}\n","import {useQuery} from \"@tanstack/react-query\";\nimport useUserInfo from \"../useUserInfo\";\nimport type {UseQueryOptions} from \"@tanstack/react-query/src/types\";\nimport {PohItemType} from \"types/types\";\nimport {getPohListApi} from \"api\";\nexport {verifyPohApi} from \"api\";\n\nexport function usePohList(options?: Partial<Omit<UseQueryOptions<PohItemType[]>, 'queryKey' | 'queryFn'>>) {\n const {isLogin} = useUserInfo()\n return useQuery<PohItemType[]>({\n queryKey: ['pohList'],\n enabled: isLogin,\n queryFn: async () => {\n let res = await getPohListApi()\n return res.data\n },\n ...options\n })\n}","export {mintPassportNftApi,chooseIdentityApi} from \"api\""],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAQ,gBAAe;AAQhB,SAAS,YAAY,SAAkF;AAC1G,QAAM,EAAC,QAAO,IAAI,YAAY;AAC9B,SAAO,SAAyB;AAAA,IAC5B,UAAU,CAAC,UAAU;AAAA,IACrB,SAAS;AAAA,IACT,SAAS,YAAY;AACjB,UAAI,MAAM,MAAM,eAAe;AAC/B,aAAO,IAAI;AAAA,IACf;AAAA,IACA,GAAG;AAAA,EACP,CAAC;AACL;AAEO,SAAS,YAAY,SAAgF;AACxG,QAAM,EAAC,QAAO,IAAI,YAAY;AAC9B,SAAO,SAAuB;AAAA,IAC1B,UAAU,CAAC,UAAU;AAAA,IACrB,SAAS;AAAA,IACT,SAAS,YAAY;AACjB,UAAI,MAAM,MAAM,eAAe;AAC/B,aAAO,IAAI;AAAA,IACf;AAAA,IACA,GAAG;AAAA,EACP,CAAC;AACL;;;AChCA;AAAA;AAAA;AAAA;AAAA;AAAA,SAAQ,YAAAA,iBAAe;AAOhB,SAAS,WAAW,SAAiF;AACxG,QAAM,EAAC,QAAO,IAAI,YAAY;AAC9B,SAAOC,UAAwB;AAAA,IAC3B,UAAU,CAAC,SAAS;AAAA,IACpB,SAAS;AAAA,IACT,SAAS,YAAY;AACjB,UAAI,MAAM,MAAM,cAAc;AAC9B,aAAO,IAAI;AAAA,IACf;AAAA,IACA,GAAG;AAAA,EACP,CAAC;AACL;;;AClBA;AAAA;AAAA;AAAA;AAAA;","names":["useQuery","useQuery"]}
|