@matchain/matchid-sdk-react 0.1.56-alpha.16 → 0.1.56-alpha.17

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 (71) hide show
  1. package/dist/api.d.mts +2 -2
  2. package/dist/api.d.ts +2 -2
  3. package/dist/api.js +152 -87
  4. package/dist/api.js.map +1 -1
  5. package/dist/api.mjs +4 -3
  6. package/dist/chains.mjs +2 -1
  7. package/dist/chunk-3CR66BEX.mjs +19 -0
  8. package/dist/chunk-3CR66BEX.mjs.map +1 -0
  9. package/dist/{chunk-FQ6PYZPD.mjs → chunk-7SUDHG7S.mjs} +1 -1
  10. package/dist/chunk-7SUDHG7S.mjs.map +1 -0
  11. package/dist/{chunk-HYQ3T6WW.mjs → chunk-JX73EY6V.mjs} +2 -14
  12. package/dist/chunk-JX73EY6V.mjs.map +1 -0
  13. package/dist/{chunk-LADAY3IL.mjs → chunk-ZLTIMO57.mjs} +374 -352
  14. package/dist/chunk-ZLTIMO57.mjs.map +1 -0
  15. package/dist/{chunk-O2D3TKRD.mjs → chunk-ZY7EVYXA.mjs} +2 -2
  16. package/dist/components.d.mts +3 -3
  17. package/dist/components.d.ts +3 -3
  18. package/dist/components.js +473 -401
  19. package/dist/components.js.map +1 -1
  20. package/dist/components.mjs +3 -2
  21. package/dist/hooks.d.mts +2 -2
  22. package/dist/hooks.d.ts +2 -2
  23. package/dist/hooks.js +172 -109
  24. package/dist/hooks.js.map +1 -1
  25. package/dist/hooks.mjs +3 -2
  26. package/dist/icon.d.mts +2 -2
  27. package/dist/icon.d.ts +2 -2
  28. package/dist/icon.js.map +1 -1
  29. package/dist/icon.mjs +1 -1
  30. package/dist/{index-DCyE39bg.d.mts → index-84CqVi2I.d.mts} +1 -1
  31. package/dist/{index-BINNnZNA.d.ts → index-B70k4Jpk.d.ts} +1 -2
  32. package/dist/{index-BIVGhRja.d.mts → index-BJJ0Gb6v.d.mts} +1 -2
  33. package/dist/{index-BXhXRggh.d.ts → index-BNqdFiOo.d.ts} +1 -1
  34. package/dist/{index-DGsB7f2H.d.ts → index-BctnHnJp.d.ts} +1 -1
  35. package/dist/{index-DuCefmJ0.d.mts → index-BqI0PEIi.d.mts} +1 -1
  36. package/dist/{index-DZpXCByF.d.ts → index-C2hr7zlN.d.ts} +5 -3
  37. package/dist/{index-CqHlL6ue.d.mts → index-CTHpnEoB.d.mts} +5 -3
  38. package/dist/{index-De8efmdb.d.mts → index-Car1jFyN.d.mts} +1 -1
  39. package/dist/{index-CpJtux-G.d.ts → index-CcVHENNv.d.ts} +1 -1
  40. package/dist/{index-DQYg6bEA.d.ts → index-Cqdz_5bE.d.ts} +2 -2
  41. package/dist/{index-m2bn_W3Y.d.ts → index-CvzpMw3N.d.ts} +1 -1
  42. package/dist/{index-CzCkxwOm.d.mts → index-DkijpM5Q.d.mts} +1 -1
  43. package/dist/{index-BLjGmf9p.d.mts → index-DxHhOW24.d.mts} +2 -2
  44. package/dist/index.css +1 -1
  45. package/dist/index.d.mts +42 -38
  46. package/dist/index.d.ts +42 -38
  47. package/dist/index.js +255 -235
  48. package/dist/index.js.map +1 -1
  49. package/dist/index.mjs +5 -4
  50. package/dist/{types-C8FLH1yn.d.mts → types-BrVeC0c8.d.mts} +0 -1
  51. package/dist/{types-C8FLH1yn.d.ts → types-BrVeC0c8.d.ts} +0 -1
  52. package/dist/types.d.mts +1 -1
  53. package/dist/types.d.ts +1 -1
  54. package/dist/ui.d.mts +3 -3
  55. package/dist/ui.d.ts +3 -3
  56. package/dist/ui.js +144 -75
  57. package/dist/ui.js.map +1 -1
  58. package/dist/ui.mjs +3 -2
  59. package/example/package-lock.json +2965 -0
  60. package/example/package.json +2 -1
  61. package/example/src/App.tsx +2 -2
  62. package/example/src/config/index.ts +2 -2
  63. package/example/src/pages/Home.tsx +15 -15
  64. package/example/src/pages/Wallet/index.tsx +2 -4
  65. package/example/src/store/useLocalStore.ts +19 -19
  66. package/example/yarn.lock +559 -548
  67. package/package.json +4 -9
  68. package/dist/chunk-FQ6PYZPD.mjs.map +0 -1
  69. package/dist/chunk-HYQ3T6WW.mjs.map +0 -1
  70. package/dist/chunk-LADAY3IL.mjs.map +0 -1
  71. /package/dist/{chunk-O2D3TKRD.mjs.map → chunk-ZY7EVYXA.mjs.map} +0 -0
@@ -27,6 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@matchain/matchid-sdk-react": "../dist",
30
+ "@zerodev/webauthn-key": "5.3.3",
30
31
  "crypto": "^1.0.1",
31
32
  "crypto-js": "^4.2.0",
32
33
  "eruda": "^3.4.1"
@@ -40,4 +41,4 @@
40
41
  "tailwindcss": "^3.4.14",
41
42
  "vite": "^5.4.10"
42
43
  }
43
- }
44
+ }
@@ -64,7 +64,7 @@ function Nav() {
64
64
  className={`text-2xl ${menu.onActive ? 'text-red-600' : 'text-gray-400'} ${menu.hidden ? 'hidden' : ''}`}>{menu.name}</Link>
65
65
  })}
66
66
 
67
- <LoginButton methods={['google']} recommendMethods={['wallet', 'github', 'discord']} walletMethods={['evm']} />
67
+ <LoginButton recommendMethods={['wallet', "email"]} walletMethods={['evm']} methods={['google', 'kakao']} />
68
68
  </nav>
69
69
 
70
70
  </>
@@ -165,7 +165,7 @@ function App() {
165
165
  }}>
166
166
  <WagmiProvider config={wagmiConfig}>
167
167
  <MatchProvider
168
- appid="MID-E53wKKWTqNzK7ccC"
168
+ appid={appid}
169
169
  endpoints={endpoints}
170
170
  locale={locale}
171
171
  events={{
@@ -10,13 +10,13 @@ export const LoginMethod = [
10
10
  'twitter',
11
11
  'google',
12
12
  'telegram',
13
- 'email',
14
13
  'github',
15
14
  'discord',
16
15
  'linkedin',
17
16
  'facebook',
18
17
  "youtube",
19
- "kakao"
18
+ "kakao",
19
+ "email"
20
20
  ]
21
21
  export const LocaleList = [
22
22
  "en", "zh", "tw", "fr", "ja", "ko", "vi", "es", "pt"
@@ -1,35 +1,35 @@
1
- import { useMatch } from "@matchain/matchid-sdk-react";
2
- import { useMemo } from "react";
1
+ import {useMatch} from "@matchain/matchid-sdk-react";
2
+ import {useMemo} from "react";
3
3
  function DisplayConfig({
4
- label,
5
- value
6
- }: {
7
- label: string,
8
- value: any
9
- }) {
10
- const RenderValue = useMemo(() => {
4
+ label,
5
+ value
6
+ }:{
7
+ label:string,
8
+ value:any
9
+ }){
10
+ const RenderValue = useMemo(()=>{
11
11
  const type = typeof value;
12
- if (type === "object") {
12
+ if(type === "object"){
13
13
  return JSON.stringify(value);
14
14
  }
15
- if (type === 'function') {
15
+ if(type==='function'){
16
16
  return <span className={`text-green-500`}>function</span>
17
17
  }
18
18
  return value;
19
- }, [value])
19
+ },[value])
20
20
 
21
21
  return <div className={`grid grid-cols-12 gap-4`}>
22
22
  <div className={`col-span-4 px-2`}>{label}</div>
23
23
  <div className={`col-span-8 px-2 text-ellipsis`}>{RenderValue}</div>
24
24
  </div>
25
25
  }
26
- export default function Home() {
26
+ export default function Home(){
27
27
  const config = useMatch();
28
28
  const keyList = Object.keys(config) as Array<keyof typeof config>;
29
29
  return <div className={``}>
30
30
  {
31
- keyList.map((key) => {
32
- return <DisplayConfig key={key} label={key} value={config[key]} />
31
+ keyList.map((key)=>{
32
+ return <DisplayConfig key={key} label={key} value={config[key]}/>
33
33
  })
34
34
  }
35
35
  </div>
@@ -14,8 +14,6 @@ import { useQuery } from "@tanstack/react-query";
14
14
  import {
15
15
  mainnet,
16
16
  arbitrum,
17
- matchain,
18
- matchainTestnet,
19
17
  arbitrumGoerli,
20
18
  arbitrumNova,
21
19
  arbitrumSepolia,
@@ -50,8 +48,8 @@ const chainList = [
50
48
  mainnet,
51
49
  bsc,
52
50
  bscTestnet,
53
- matchain,
54
- matchainTestnet,
51
+ MatchMain,
52
+ MatchTest,
55
53
  arbitrum,
56
54
  arbitrumGoerli,
57
55
  arbitrumNova,
@@ -1,6 +1,6 @@
1
- import { create } from 'zustand';
2
- import { devtools, persist } from 'zustand/middleware';
3
- import { LocaleType } from "@matchain/matchid-sdk-react/types";
1
+ import {create} from 'zustand';
2
+ import {devtools, persist} from 'zustand/middleware';
3
+ import {LocaleType} from "@matchain/matchid-sdk-react/types";
4
4
 
5
5
  interface StoreState {
6
6
  appid: string
@@ -9,10 +9,10 @@ interface StoreState {
9
9
  auth: string;
10
10
  }
11
11
  locale: LocaleType;
12
- walletType: "Base" | "UserPasscode";
12
+ walletType:"Base" | "UserPasscode";
13
13
  setWalletType: (walletType: "Base" | "UserPasscode") => void;
14
- color: string,
15
- backgroundColor: string,
14
+ color:string,
15
+ backgroundColor:string,
16
16
 
17
17
 
18
18
  setAppid: (appid: string) => void;
@@ -32,29 +32,29 @@ interface StoreState {
32
32
 
33
33
  const persistedState = persist<StoreState>(
34
34
  set => ({
35
- appid: 'MID-E53wKKWTqNzK7ccC',
35
+ appid: '',
36
36
  endpoints: {
37
- back: "https://api-test.matchid.ai/",
38
- auth: "https://mid-sso-test.vercel.app/"
37
+ back: "https://api.matchid.ai/",
38
+ auth: "https://auth.matchid.ai/"
39
39
  },
40
40
  locale: 'en',
41
- setAppid: (appid: string) => set({ appid: appid }),
42
- setEndpoints: (endpoints: StoreState['endpoints']) => set({ endpoints }),
43
- setLocale: (locale: LocaleType) => set({ locale }),
41
+ setAppid: (appid: string) => set({appid: appid}),
42
+ setEndpoints: (endpoints: StoreState['endpoints']) => set({endpoints}),
43
+ setLocale: (locale: LocaleType) => set({locale}),
44
44
  walletType: "UserPasscode",
45
- setWalletType: (walletType: "Base" | "UserPasscode") => set({ walletType }),
45
+ setWalletType: (walletType: "Base" | "UserPasscode") => set({walletType}),
46
46
  color: '#000000',
47
- setColor: (color: string) => set({ color }),
47
+ setColor: (color: string) => set({color}),
48
48
  backgroundColor: '#ffffff',
49
- setBackgroundColor: (backgroundColor: string) => set({ backgroundColor }),
49
+ setBackgroundColor: (backgroundColor: string) => set({backgroundColor}),
50
50
 
51
- initChainId: 1,
52
- setInitChainId: (initChainId: number) => set({ initChainId }),
51
+ initChainId:1,
52
+ setInitChainId: (initChainId: number) => set({initChainId}),
53
53
 
54
54
  erc20Address: '',
55
- setErc20Address: (erc20Address: string) => set({ erc20Address })
55
+ setErc20Address: (erc20Address: string) => set({erc20Address})
56
56
  }),
57
- { name: 'match-example-local' }
57
+ {name: 'match-example-local'}
58
58
  );
59
59
 
60
60
  const useLocalStore = create(devtools(persistedState));