@matchain/matchid-sdk-react 0.1.37-alpha.1 → 0.1.37-alpha.11

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.
Files changed (61) hide show
  1. package/dist/assets/icon/index.d.mts +129 -0
  2. package/dist/assets/icon/index.d.ts +129 -0
  3. package/dist/assets/icon/index.js +1133 -0
  4. package/dist/assets/icon/index.js.map +1 -0
  5. package/dist/assets/icon/index.mjs +88 -0
  6. package/dist/assets/icon/index.mjs.map +1 -0
  7. package/dist/chunk-6PWH7WZI.mjs +1067 -0
  8. package/dist/chunk-6PWH7WZI.mjs.map +1 -0
  9. package/dist/chunk-HTYFFIQV.mjs +3885 -0
  10. package/dist/chunk-HTYFFIQV.mjs.map +1 -0
  11. package/dist/chunk-HYQ3T6WW.mjs +79 -0
  12. package/dist/chunk-HYQ3T6WW.mjs.map +1 -0
  13. package/dist/chunk-J5LGTIGS.mjs +10 -0
  14. package/dist/chunk-J5LGTIGS.mjs.map +1 -0
  15. package/dist/chunk-WIU5CDQ6.mjs +93 -0
  16. package/dist/chunk-WIU5CDQ6.mjs.map +1 -0
  17. package/dist/components/index.d.mts +4 -0
  18. package/dist/components/index.d.ts +4 -0
  19. package/dist/components/index.js +3715 -0
  20. package/dist/components/index.js.map +1 -0
  21. package/dist/components/index.mjs +39 -0
  22. package/dist/components/index.mjs.map +1 -0
  23. package/dist/config/chains/index.d.mts +2 -0
  24. package/dist/config/chains/index.d.ts +2 -0
  25. package/dist/config/chains/index.js +94 -0
  26. package/dist/config/chains/index.js.map +1 -0
  27. package/dist/config/chains/index.mjs +10 -0
  28. package/dist/config/chains/index.mjs.map +1 -0
  29. package/dist/hooks/api/index.d.mts +5 -0
  30. package/dist/hooks/api/index.d.ts +5 -0
  31. package/dist/hooks/api/index.js +1024 -0
  32. package/dist/hooks/api/index.js.map +1 -0
  33. package/dist/hooks/api/index.mjs +14 -0
  34. package/dist/hooks/api/index.mjs.map +1 -0
  35. package/dist/hooks/index.d.mts +4 -0
  36. package/dist/hooks/index.d.ts +4 -0
  37. package/dist/hooks/index.js +1069 -0
  38. package/dist/hooks/index.js.map +1 -0
  39. package/dist/hooks/index.mjs +17 -0
  40. package/dist/hooks/index.mjs.map +1 -0
  41. package/dist/index-B89X65ox.d.ts +83 -0
  42. package/dist/index-BICt0DjJ.d.ts +64 -0
  43. package/dist/index-BTTka3Uo.d.mts +75 -0
  44. package/dist/index-CAvsdgJw.d.mts +83 -0
  45. package/dist/index-CzAaZV-2.d.mts +64 -0
  46. package/dist/index-DUCRzr-P.d.ts +75 -0
  47. package/dist/index-DXRGMAbv.d.mts +83 -0
  48. package/dist/index-DXRGMAbv.d.ts +83 -0
  49. package/dist/index.css +12 -12
  50. package/dist/index.d.mts +12 -436
  51. package/dist/index.d.ts +12 -436
  52. package/dist/index.js +1569 -315
  53. package/dist/index.js.map +1 -1
  54. package/dist/index.mjs +13 -3682
  55. package/dist/index.mjs.map +1 -1
  56. package/dist/types.d-Cqt8ifXa.d.mts +176 -0
  57. package/dist/types.d-Cqt8ifXa.d.ts +176 -0
  58. package/example/src/components/Login/index.tsx +1 -1
  59. package/example/src/config/index.ts +6 -1
  60. package/example/src/pages/User.tsx +13 -4
  61. package/package.json +23 -2
@@ -0,0 +1,79 @@
1
+ import {
2
+ __export
3
+ } from "./chunk-J5LGTIGS.mjs";
4
+
5
+ // src/config/chains/index.ts
6
+ var chains_exports = {};
7
+ __export(chains_exports, {
8
+ MatchMain: () => matchMain,
9
+ MatchTest: () => matchTest
10
+ });
11
+
12
+ // src/config/chains/MatchMain.ts
13
+ import { defineChain } from "viem";
14
+ var matchMain = /* @__PURE__ */ defineChain({
15
+ //定义match链
16
+ id: 698,
17
+ name: "Matchain",
18
+ nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
19
+ rpcUrls: {
20
+ default: {
21
+ http: ["https://rpc.matchain.io"]
22
+ }
23
+ },
24
+ blockExplorers: {
25
+ default: {
26
+ name: "Matchscan",
27
+ url: "https://matchscan.io/",
28
+ apiUrl: "https://matchscan.io/api"
29
+ }
30
+ },
31
+ iconUrl: "https://matchscan.io/static/identicon_logos/blockies.png",
32
+ contracts: {
33
+ multicall3: {
34
+ address: "0xca11bde05977b3631167028862be2a173976ca11"
35
+ }
36
+ }
37
+ // testnet: true,
38
+ });
39
+
40
+ // src/config/chains/MatchTest.ts
41
+ import { defineChain as defineChain2 } from "viem";
42
+ var matchTest = /* @__PURE__ */ defineChain2({
43
+ //定义matchTest链
44
+ id: 699,
45
+ name: "MatchTest",
46
+ nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
47
+ rpcUrls: {
48
+ default: {
49
+ http: ["https://testnet-rpc.matchain.io"]
50
+ }
51
+ },
52
+ blockExplorers: {
53
+ default: {
54
+ name: "Matchscan",
55
+ url: "https://testnet.matchscan.io/",
56
+ apiUrl: "https://testnet.matchscan.io/api"
57
+ }
58
+ },
59
+ iconUrl: "https://testnet.matchscan.io/static/identicon_logos/blockies.png",
60
+ contracts: {
61
+ multicall3: {
62
+ address: "0xca11bde05977b3631167028862be2a173976ca11",
63
+ blockCreated: 751532
64
+ },
65
+ ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
66
+ ensUniversalResolver: {
67
+ address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",
68
+ blockCreated: 5317080
69
+ }
70
+ }
71
+ // testnet: true,
72
+ });
73
+
74
+ export {
75
+ matchMain,
76
+ matchTest,
77
+ chains_exports
78
+ };
79
+ //# sourceMappingURL=chunk-HYQ3T6WW.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/config/chains/index.ts","../src/config/chains/MatchMain.ts","../src/config/chains/MatchTest.ts"],"sourcesContent":["export { matchMain as MatchMain} from \"./MatchMain\"\nexport { matchTest as MatchTest} from \"./MatchTest\"","import {defineChain} from \"viem\";\n\nexport const matchMain = /*#__PURE__*/ defineChain({\n //定义match链\n id: 698,\n name: \"Matchain\",\n nativeCurrency: { name: \"Match Coin\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://rpc.matchain.io\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Matchscan\",\n url: \"https://matchscan.io/\",\n apiUrl: \"https://matchscan.io/api\",\n },\n },\n iconUrl: \"https://matchscan.io/static/identicon_logos/blockies.png\",\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n }\n },\n // testnet: true,\n});","\nimport { defineChain } from \"viem\"\n\nexport const matchTest = /*#__PURE__*/ defineChain({\n //定义matchTest链\n id: 699,\n name: \"MatchTest\",\n nativeCurrency: { name: \"Match Coin\", symbol: \"BNB\", decimals: 18 },\n rpcUrls: {\n default: {\n http: [\"https://testnet-rpc.matchain.io\"],\n },\n },\n blockExplorers: {\n default: {\n name: \"Matchscan\",\n url: \"https://testnet.matchscan.io/\",\n apiUrl: \"https://testnet.matchscan.io/api\",\n },\n },\n iconUrl: \"https://testnet.matchscan.io/static/identicon_logos/blockies.png\",\n contracts: {\n multicall3: {\n address: \"0xca11bde05977b3631167028862be2a173976ca11\",\n blockCreated: 751532,\n },\n ensRegistry: { address: \"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e\" },\n ensUniversalResolver: {\n address: \"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC\",\n blockCreated: 5_317_080,\n },\n },\n // testnet: true,\n});\n"],"mappings":";;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,SAAQ,mBAAkB;AAEnB,IAAM,YAA0B,4BAAY;AAAA;AAAA,EAE/C,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB,EAAE,MAAM,cAAc,QAAQ,OAAO,UAAU,GAAG;AAAA,EAClE,SAAS;AAAA,IACL,SAAS;AAAA,MACL,MAAM,CAAC,yBAAyB;AAAA,IACpC;AAAA,EACJ;AAAA,EACA,gBAAgB;AAAA,IACZ,SAAS;AAAA,MACL,MAAM;AAAA,MACN,KAAK;AAAA,MACL,QAAQ;AAAA,IACZ;AAAA,EACJ;AAAA,EACA,SAAS;AAAA,EACT,WAAW;AAAA,IACP,YAAY;AAAA,MACR,SAAS;AAAA,IACb;AAAA,EACJ;AAAA;AAEJ,CAAC;;;ACzBD,SAAS,eAAAA,oBAAmB;AAErB,IAAM,YAA0B,gBAAAA,aAAY;AAAA;AAAA,EAEjD,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,gBAAgB,EAAE,MAAM,cAAc,QAAQ,OAAO,UAAU,GAAG;AAAA,EAClE,SAAS;AAAA,IACP,SAAS;AAAA,MACP,MAAM,CAAC,iCAAiC;AAAA,IAC1C;AAAA,EACF;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,MACP,MAAM;AAAA,MACN,KAAK;AAAA,MACL,QAAQ;AAAA,IACV;AAAA,EACF;AAAA,EACA,SAAS;AAAA,EACT,WAAW;AAAA,IACT,YAAY;AAAA,MACV,SAAS;AAAA,MACT,cAAc;AAAA,IAChB;AAAA,IACA,aAAa,EAAE,SAAS,6CAA6C;AAAA,IACrE,sBAAsB;AAAA,MACpB,SAAS;AAAA,MACT,cAAc;AAAA,IAChB;AAAA,EACF;AAAA;AAEF,CAAC;","names":["defineChain"]}
@@ -0,0 +1,10 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __export = (target, all) => {
3
+ for (var name in all)
4
+ __defProp(target, name, { get: all[name], enumerable: true });
5
+ };
6
+
7
+ export {
8
+ __export
9
+ };
10
+ //# sourceMappingURL=chunk-J5LGTIGS.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -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-HTYFFIQV.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-WIU5CDQ6.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"]}
@@ -0,0 +1,4 @@
1
+ export { f as BTCModal, B as Button, E as EmailModal, F as Field, I as Input, L as LoginBox, b as LoginButton, d as LoginModal, c as LoginPanel, M as Modal, a as ModalWithHeader, e as PasswordModal, P as Popover, S as SOLModal, T as TRONModal, U as UsernameModal } from '../index-CAvsdgJw.mjs';
2
+ import 'react/jsx-runtime';
3
+ import '../types.d-Cqt8ifXa.mjs';
4
+ import 'react';
@@ -0,0 +1,4 @@
1
+ export { f as BTCModal, B as Button, E as EmailModal, F as Field, I as Input, L as LoginBox, b as LoginButton, d as LoginModal, c as LoginPanel, M as Modal, a as ModalWithHeader, e as PasswordModal, P as Popover, S as SOLModal, T as TRONModal, U as UsernameModal } from '../index-B89X65ox.js';
2
+ import 'react/jsx-runtime';
3
+ import '../types.d-Cqt8ifXa.js';
4
+ import 'react';