@matchain/matchid-sdk-react 0.1.53-alpha.9 → 0.1.55-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.
Files changed (66) hide show
  1. package/dist/assets/icon/index.d.mts +5 -0
  2. package/dist/assets/icon/index.d.ts +5 -0
  3. package/dist/{chunk-X5HGL3ZX.mjs → chunk-36M5ROJI.mjs} +7238 -241
  4. package/dist/chunk-36M5ROJI.mjs.map +1 -0
  5. package/dist/chunk-N7NX7Q7M.mjs +97 -0
  6. package/dist/chunk-N7NX7Q7M.mjs.map +1 -0
  7. package/dist/components/index.d.mts +6 -0
  8. package/dist/components/index.d.ts +6 -0
  9. package/dist/components/index.js +324 -658
  10. package/dist/components/index.js.map +1 -1
  11. package/dist/components/index.mjs +9 -15
  12. package/dist/config/chains/index.d.mts +2 -0
  13. package/dist/config/chains/index.d.ts +2 -0
  14. package/dist/hooks/api/index.d.mts +6 -0
  15. package/dist/hooks/api/index.d.ts +6 -0
  16. package/dist/hooks/api/index.js +443 -598
  17. package/dist/hooks/api/index.js.map +1 -1
  18. package/dist/hooks/api/index.mjs +6 -7
  19. package/dist/hooks/index.d.mts +11 -0
  20. package/dist/hooks/index.d.ts +11 -0
  21. package/dist/hooks/index.js +350 -357
  22. package/dist/hooks/index.js.map +1 -1
  23. package/dist/hooks/index.mjs +3 -5
  24. package/dist/index-6-oVBXRP.d.mts +66 -0
  25. package/dist/index-CBQXIlWu.d.mts +38 -0
  26. package/dist/index-CMH6Jesl.d.ts +66 -0
  27. package/dist/index-CNH7a3bx.d.ts +111 -0
  28. package/dist/index-CPPDmmz8.d.ts +3327 -0
  29. package/dist/index-CqKohtvj.d.mts +3327 -0
  30. package/dist/index-D0Psl8Ue.d.mts +203 -0
  31. package/dist/index-DXRGMAbv.d.mts +83 -0
  32. package/dist/index-DXRGMAbv.d.ts +83 -0
  33. package/dist/index-DbQn4z1l.d.ts +203 -0
  34. package/dist/index-Es7yJi7T.d.ts +79 -0
  35. package/dist/index-G15A08DI.d.mts +132 -0
  36. package/dist/index-MsSYZS38.d.mts +79 -0
  37. package/dist/index-Y5WRoqzn.d.ts +132 -0
  38. package/dist/index-a_Qt7NXk.d.mts +111 -0
  39. package/dist/index-agAVLGF5.d.ts +38 -0
  40. package/dist/index.css +44 -57
  41. package/dist/index.d.mts +787 -0
  42. package/dist/index.d.ts +787 -0
  43. package/dist/index.js +3881 -4043
  44. package/dist/index.js.map +1 -1
  45. package/dist/index.mjs +12 -10
  46. package/dist/request-B0CyrGFT.d.mts +15 -0
  47. package/dist/request-B0CyrGFT.d.ts +15 -0
  48. package/dist/types/index.d.mts +3 -0
  49. package/dist/types/index.d.ts +3 -0
  50. package/dist/types-CXzZS0eM.d.mts +424 -0
  51. package/dist/types-CXzZS0eM.d.ts +424 -0
  52. package/dist/ui/index.d.mts +7 -0
  53. package/dist/ui/index.d.ts +7 -0
  54. package/dist/ui/index.js +920 -160
  55. package/dist/ui/index.js.map +1 -1
  56. package/dist/ui/index.mjs +6 -1
  57. package/dist/utils/index.d.mts +28 -0
  58. package/dist/utils/index.d.ts +28 -0
  59. package/example/package.json +1 -0
  60. package/example/src/App.tsx +23 -27
  61. package/example/src/pages/Wallet/index.tsx +1 -1
  62. package/package.json +1 -1
  63. package/dist/chunk-NCVBLRAJ.mjs +0 -7275
  64. package/dist/chunk-NCVBLRAJ.mjs.map +0 -1
  65. package/dist/chunk-X5HGL3ZX.mjs.map +0 -1
  66. package/example/src/pages/Contact/index.tsx +0 -90
package/dist/ui/index.mjs CHANGED
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  AlphaAvatar,
3
3
  Button,
4
+ ConfirmModal,
4
5
  Drawer,
5
6
  Field,
6
7
  HashPanel_default,
@@ -14,12 +15,16 @@ import {
14
15
  Skeleton_default,
15
16
  Switch,
16
17
  Tabs
17
- } from "../chunk-X5HGL3ZX.mjs";
18
+ } from "../chunk-36M5ROJI.mjs";
19
+ import "../chunk-UA6XHZHX.mjs";
20
+ import "../chunk-IZOOVZAD.mjs";
18
21
  import "../chunk-FKXS2XRG.mjs";
22
+ import "../chunk-JX73EY6V.mjs";
19
23
  import "../chunk-J5LGTIGS.mjs";
20
24
  export {
21
25
  AlphaAvatar,
22
26
  Button,
27
+ ConfirmModal,
23
28
  Drawer,
24
29
  Field,
25
30
  HashPanel_default as HashPanel,
@@ -0,0 +1,28 @@
1
+ declare const getVersion: () => string;
2
+ declare function encodeBase64(input: string): string;
3
+ declare function decodeBase64(input: string): string;
4
+ declare const isValidEmail: (email: string) => boolean;
5
+ declare const isValidUsername: (username: string) => boolean;
6
+ declare const deepMerge: (target: any, source: any) => any;
7
+ declare function truncateAddress(address: string, startLen?: number, endLen?: number): string;
8
+ declare function firstUpperCase(str: string): string;
9
+ declare function getAppClientId(): string;
10
+ interface NumberFormatterProps {
11
+ value: number | string | undefined;
12
+ prefix?: string;
13
+ suffix?: string;
14
+ separator?: boolean;
15
+ fixNum?: number;
16
+ tFixNum?: number;
17
+ intClassName?: string;
18
+ decimalClassName?: string;
19
+ prefixClassName?: string;
20
+ className?: string;
21
+ }
22
+ declare const NumberFormatter: React.FC<NumberFormatterProps>;
23
+ declare function formatAddress(address: string, pre?: number, after?: number): string;
24
+ declare const formatDate: (value: any, formatString?: string) => string;
25
+ declare const isInTgApp: () => boolean;
26
+ declare function bytesToBase64(bytes: Uint8Array): string;
27
+
28
+ export { NumberFormatter, bytesToBase64, decodeBase64, deepMerge, encodeBase64, firstUpperCase, formatAddress, formatDate, getAppClientId, getVersion, isInTgApp, isValidEmail, isValidUsername, truncateAddress };
@@ -0,0 +1,28 @@
1
+ declare const getVersion: () => string;
2
+ declare function encodeBase64(input: string): string;
3
+ declare function decodeBase64(input: string): string;
4
+ declare const isValidEmail: (email: string) => boolean;
5
+ declare const isValidUsername: (username: string) => boolean;
6
+ declare const deepMerge: (target: any, source: any) => any;
7
+ declare function truncateAddress(address: string, startLen?: number, endLen?: number): string;
8
+ declare function firstUpperCase(str: string): string;
9
+ declare function getAppClientId(): string;
10
+ interface NumberFormatterProps {
11
+ value: number | string | undefined;
12
+ prefix?: string;
13
+ suffix?: string;
14
+ separator?: boolean;
15
+ fixNum?: number;
16
+ tFixNum?: number;
17
+ intClassName?: string;
18
+ decimalClassName?: string;
19
+ prefixClassName?: string;
20
+ className?: string;
21
+ }
22
+ declare const NumberFormatter: React.FC<NumberFormatterProps>;
23
+ declare function formatAddress(address: string, pre?: number, after?: number): string;
24
+ declare const formatDate: (value: any, formatString?: string) => string;
25
+ declare const isInTgApp: () => boolean;
26
+ declare function bytesToBase64(bytes: Uint8Array): string;
27
+
28
+ export { NumberFormatter, bytesToBase64, decodeBase64, deepMerge, encodeBase64, firstUpperCase, formatAddress, formatDate, getAppClientId, getVersion, isInTgApp, isValidEmail, isValidUsername, truncateAddress };
@@ -16,6 +16,7 @@
16
16
  "alias": {
17
17
  "viem": "../node_modules/viem",
18
18
  "react": "../node_modules/react",
19
+ "wagmi": "../node_modules/wagmi",
19
20
  "react-dom": "../node_modules/react-dom/profiling",
20
21
  "lodash": "../node_modules/lodash",
21
22
  "axios": "../node_modules/axios",
@@ -1,5 +1,5 @@
1
1
  import React, {useEffect, useMemo, useState} from "react";
2
- import {MatchProvider} from "@matchain/matchid-sdk-react";
2
+ import {MatchProvider, wagmiConfig} from "@matchain/matchid-sdk-react";
3
3
  import {BrowserRouter as Router, Routes, Route, Link, useLocation} from 'react-router-dom';
4
4
  import Home from "./pages/Home";
5
5
  import './app.css'
@@ -14,7 +14,7 @@ import useLocalStore from "@/store/useLocalStore";
14
14
  import {LoginButton} from "@matchain/matchid-sdk-react/components";
15
15
  import UI from "@/pages/UI";
16
16
  import TgApp from "@/pages/TgApp";
17
- import Contact from "./pages/Contact";
17
+ import {WagmiProvider} from "wagmi";
18
18
 
19
19
 
20
20
  function Nav() {
@@ -53,12 +53,6 @@ function Nav() {
53
53
  onActive: location.pathname === '/wallet',
54
54
  hidden: !isLogin
55
55
  },
56
- {
57
- name: 'Contact',
58
- url: '/contact',
59
- onActive: location.pathname === '/contact',
60
- hidden: !isLogin
61
- }
62
56
  ]
63
57
  return list
64
58
  }, [location.pathname, isLogin])
@@ -149,7 +143,6 @@ function RouterApp() {
149
143
  <Route element={<RoutePrivate/>}>
150
144
  <Route path="/user" element={<User/>}/>
151
145
  <Route path="/wallet" element={<Wallet/>}/>
152
- <Route path="/contact" element={<Contact/>}/>
153
146
  </Route>
154
147
  </Routes>
155
148
  </div>
@@ -162,24 +155,27 @@ function App() {
162
155
  return <div style={{
163
156
  backgroundColor: backgroundColor,
164
157
  color: color
165
- }}><MatchProvider
166
- appid={appid}
167
- endpoints={endpoints}
168
- locale={locale}
169
- events={{
170
- onLogin: (data) => {
171
- console.log('events.onLogin', data)
172
- },
173
- onLogout: () => {
174
- console.log('events.onLogout')
175
- }
176
- }}
177
- wallet={{
178
- type: walletType
179
- }}
180
- >
181
- <RouterApp/>
182
- </MatchProvider>
158
+ }}>
159
+ <WagmiProvider config={wagmiConfig}>
160
+ <MatchProvider
161
+ appid={appid}
162
+ endpoints={endpoints}
163
+ locale={locale}
164
+ events={{
165
+ onLogin: (data) => {
166
+ console.log('events.onLogin', data)
167
+ },
168
+ onLogout: () => {
169
+ console.log('events.onLogout')
170
+ }
171
+ }}
172
+ wallet={{
173
+ type: walletType
174
+ }}
175
+ >
176
+ <RouterApp/>
177
+ </MatchProvider>
178
+ </WagmiProvider>
183
179
  </div>;
184
180
  }
185
181
 
@@ -432,7 +432,7 @@ function ERC20() {
432
432
  return <div className="mt-[20px]">
433
433
  <ButtonGroup title={"ERC20"}></ButtonGroup>
434
434
  <ButtonGroup title={"Contract Address"}>
435
- <input className="border px-[8px]" type={'text'} placeholder={'contact'} value={erc20Address}
435
+ <input className="border px-[8px]" type={'text'} placeholder={'contract'} value={erc20Address}
436
436
  onChange={(e) => setErc20Address(e.target.value)}/>
437
437
  </ButtonGroup>
438
438
  <ButtonGroup title={"Info"}>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matchain/matchid-sdk-react",
3
- "version": "0.1.53-alpha.9",
3
+ "version": "0.1.55-alpha.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {