@matchain/matchid-sdk-react 0.1.56-alpha.6 → 0.1.56-alpha.8

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 (108) hide show
  1. package/example/package.json +1 -2
  2. package/example/src/pages/Wallet/index.tsx +90 -88
  3. package/example/yarn.lock +2251 -27
  4. package/package.json +7 -4
  5. package/dist/api.d.mts +0 -6
  6. package/dist/api.d.ts +0 -6
  7. package/dist/api.js +0 -1721
  8. package/dist/api.js.map +0 -1
  9. package/dist/api.mjs +0 -23
  10. package/dist/api.mjs.map +0 -1
  11. package/dist/assets/lottie.d.mts +0 -1
  12. package/dist/assets/lottie.d.ts +0 -1
  13. package/dist/assets/lottie.js +0 -68
  14. package/dist/assets/lottie.js.map +0 -1
  15. package/dist/assets/lottie.mjs +0 -22
  16. package/dist/assets/lottie.mjs.map +0 -1
  17. package/dist/chains.d.mts +0 -2
  18. package/dist/chains.d.ts +0 -2
  19. package/dist/chains.js +0 -94
  20. package/dist/chains.js.map +0 -1
  21. package/dist/chains.mjs +0 -11
  22. package/dist/chains.mjs.map +0 -1
  23. package/dist/chunk-3CR66BEX.mjs +0 -19
  24. package/dist/chunk-3CR66BEX.mjs.map +0 -1
  25. package/dist/chunk-GD7URBBZ.mjs +0 -1399
  26. package/dist/chunk-GD7URBBZ.mjs.map +0 -1
  27. package/dist/chunk-HBOS3RBL.mjs +0 -19
  28. package/dist/chunk-HBOS3RBL.mjs.map +0 -1
  29. package/dist/chunk-IZOOVZAD.mjs +0 -145
  30. package/dist/chunk-IZOOVZAD.mjs.map +0 -1
  31. package/dist/chunk-J5LGTIGS.mjs +0 -10
  32. package/dist/chunk-J5LGTIGS.mjs.map +0 -1
  33. package/dist/chunk-JX73EY6V.mjs +0 -67
  34. package/dist/chunk-JX73EY6V.mjs.map +0 -1
  35. package/dist/chunk-KFB23MLQ.mjs +0 -7666
  36. package/dist/chunk-KFB23MLQ.mjs.map +0 -1
  37. package/dist/chunk-NYE6DBEZ.mjs +0 -97
  38. package/dist/chunk-NYE6DBEZ.mjs.map +0 -1
  39. package/dist/chunk-UA6XHZHX.mjs +0 -17
  40. package/dist/chunk-UA6XHZHX.mjs.map +0 -1
  41. package/dist/chunk-XM6CYEXN.mjs +0 -53
  42. package/dist/chunk-XM6CYEXN.mjs.map +0 -1
  43. package/dist/components.d.mts +0 -6
  44. package/dist/components.d.ts +0 -6
  45. package/dist/components.js +0 -6494
  46. package/dist/components.js.map +0 -1
  47. package/dist/components.mjs +0 -57
  48. package/dist/components.mjs.map +0 -1
  49. package/dist/hooks.d.mts +0 -13
  50. package/dist/hooks.d.ts +0 -13
  51. package/dist/hooks.js +0 -3612
  52. package/dist/hooks.js.map +0 -1
  53. package/dist/hooks.mjs +0 -41
  54. package/dist/hooks.mjs.map +0 -1
  55. package/dist/icon.d.mts +0 -5
  56. package/dist/icon.d.ts +0 -5
  57. package/dist/icon.js +0 -1414
  58. package/dist/icon.js.map +0 -1
  59. package/dist/icon.mjs +0 -112
  60. package/dist/icon.mjs.map +0 -1
  61. package/dist/index-B50DU_xT.d.mts +0 -83
  62. package/dist/index-B50DU_xT.d.ts +0 -83
  63. package/dist/index-BcuSCgol.d.ts +0 -111
  64. package/dist/index-BlMLqmS2.d.mts +0 -3341
  65. package/dist/index-C1Nyy5zx.d.ts +0 -3341
  66. package/dist/index-CBcBTQyU.d.mts +0 -66
  67. package/dist/index-CD0dACxf.d.mts +0 -111
  68. package/dist/index-CER00guz.d.mts +0 -132
  69. package/dist/index-CHgaOUiW.d.mts +0 -52590
  70. package/dist/index-CHgaOUiW.d.ts +0 -52590
  71. package/dist/index-CjekOYJl.d.mts +0 -38
  72. package/dist/index-DN-jrh8-.d.ts +0 -213
  73. package/dist/index-DdN22cwf.d.ts +0 -38
  74. package/dist/index-DkIIQLbh.d.ts +0 -92
  75. package/dist/index-DlaCsN95.d.ts +0 -66
  76. package/dist/index-lh6qBAf_.d.mts +0 -92
  77. package/dist/index-o0WW1c5O.d.ts +0 -132
  78. package/dist/index-xThRnNN3.d.mts +0 -213
  79. package/dist/index.css +0 -2131
  80. package/dist/index.d.mts +0 -789
  81. package/dist/index.d.ts +0 -789
  82. package/dist/index.js +0 -9206
  83. package/dist/index.js.map +0 -1
  84. package/dist/index.mjs +0 -45
  85. package/dist/index.mjs.map +0 -1
  86. package/dist/request-B0CyrGFT.d.mts +0 -15
  87. package/dist/request-B0CyrGFT.d.ts +0 -15
  88. package/dist/types-CheN9vHJ.d.mts +0 -428
  89. package/dist/types-CheN9vHJ.d.ts +0 -428
  90. package/dist/types.d.mts +0 -3
  91. package/dist/types.d.ts +0 -3
  92. package/dist/types.js +0 -44
  93. package/dist/types.js.map +0 -1
  94. package/dist/types.mjs +0 -11
  95. package/dist/types.mjs.map +0 -1
  96. package/dist/ui.d.mts +0 -7
  97. package/dist/ui.d.ts +0 -7
  98. package/dist/ui.js +0 -1682
  99. package/dist/ui.js.map +0 -1
  100. package/dist/ui.mjs +0 -47
  101. package/dist/ui.mjs.map +0 -1
  102. package/dist/utils.d.mts +0 -28
  103. package/dist/utils.d.ts +0 -28
  104. package/dist/utils.js +0 -192
  105. package/dist/utils.js.map +0 -1
  106. package/dist/utils.mjs +0 -34
  107. package/dist/utils.mjs.map +0 -1
  108. package/example/package-lock.json +0 -2965
package/dist/index.mjs DELETED
@@ -1,45 +0,0 @@
1
- import {
2
- chains_exports
3
- } from "./chunk-3CR66BEX.mjs";
4
- import {
5
- types_exports
6
- } from "./chunk-HBOS3RBL.mjs";
7
- import {
8
- api_exports
9
- } from "./chunk-NYE6DBEZ.mjs";
10
- import {
11
- MatchProvider,
12
- ModalProvider,
13
- ToastProvider,
14
- components_exports,
15
- hooks_exports,
16
- ui_exports,
17
- useMatch,
18
- wagmiConfig
19
- } from "./chunk-KFB23MLQ.mjs";
20
- import "./chunk-JX73EY6V.mjs";
21
- import "./chunk-UA6XHZHX.mjs";
22
- import "./chunk-IZOOVZAD.mjs";
23
- import {
24
- icon_exports
25
- } from "./chunk-GD7URBBZ.mjs";
26
- import {
27
- lottie_exports
28
- } from "./chunk-XM6CYEXN.mjs";
29
- import "./chunk-J5LGTIGS.mjs";
30
- export {
31
- api_exports as Api,
32
- chains_exports as Chains,
33
- components_exports as Components,
34
- hooks_exports as Hooks,
35
- icon_exports as Icon,
36
- lottie_exports as Lottie,
37
- MatchProvider,
38
- ModalProvider,
39
- ToastProvider,
40
- types_exports as Types,
41
- ui_exports as UI,
42
- useMatch,
43
- wagmiConfig
44
- };
45
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,15 +0,0 @@
1
- declare const isSuccess: (res: {
2
- code: number;
3
- message: string;
4
- data?: any;
5
- }) => boolean;
6
- interface MyResponseType<T> {
7
- code: number;
8
- data: T;
9
- message: string;
10
- success: boolean;
11
- fail: boolean;
12
- result: T;
13
- }
14
-
15
- export { type MyResponseType as M, isSuccess as i };
@@ -1,15 +0,0 @@
1
- declare const isSuccess: (res: {
2
- code: number;
3
- message: string;
4
- data?: any;
5
- }) => boolean;
6
- interface MyResponseType<T> {
7
- code: number;
8
- data: T;
9
- message: string;
10
- success: boolean;
11
- fail: boolean;
12
- result: T;
13
- }
14
-
15
- export { type MyResponseType as M, isSuccess as i };
@@ -1,428 +0,0 @@
1
- import { PropsWithChildren, CSSProperties, ReactNode } from 'react';
2
- import { UseQueryOptions } from '@tanstack/react-query/src/types';
3
-
4
- interface AuthParams {
5
- AppId: string;
6
- AppClientId: string;
7
- UserId: string;
8
- AccessToken: string;
9
- Address?: string;
10
- }
11
- interface EmbeddedWalletsParams {
12
- Url: string;
13
- }
14
- declare enum ChainType {
15
- Ethereum = "ethereum",
16
- Solana = "solana"
17
- }
18
- declare enum RecoveryType {
19
- Base = "base_generated_recovery_key",
20
- UserPasscode = "user_passcode_recovery_key"
21
- }
22
-
23
- type ISocialLoginMethod = 'google' | 'twitter' | 'discord' | 'github' | 'telegram' | 'linkedin' | 'facebook' | 'youtube';
24
- type WalletType = 'evm' | 'sol' | 'tron' | 'btc' | 'ton';
25
- type LoginMethodType = WalletType | 'email' | ISocialLoginMethod;
26
- type CEXType = "Gate" | "Coinbase" | "Kucoin" | 'Bitget' | 'OKX' | 'Bybit' | 'Binance';
27
- type OtherLoginMethodType = 'email' | ISocialLoginMethod;
28
- type RecommendLoginMethodType = 'wallet' | 'email' | ISocialLoginMethod;
29
- type IEnvName = 'main' | 'dev' | 'test';
30
- type IEnvConfigType = {
31
- endpoints: {
32
- back: string;
33
- auth: string;
34
- };
35
- };
36
- type ILoginWalletReq = {
37
- domain: string;
38
- statement: string;
39
- address: string;
40
- chainId: number;
41
- version: string;
42
- uri: string;
43
- nonce: string;
44
- issuedAt?: string;
45
- };
46
- type IMatchEvents = {
47
- onLogin?: (data: {
48
- token: string;
49
- did: string;
50
- }) => void;
51
- onLogout?: () => void;
52
- onBind?: (data: {
53
- type: string;
54
- }) => void;
55
- };
56
- type BindWalletParam = {
57
- type: string;
58
- address: string;
59
- signature: any;
60
- message: string;
61
- connector_type: string;
62
- wallet_client_type: string;
63
- };
64
- type OverviewInfo = {
65
- score: number;
66
- total_assets: number;
67
- wallets: number;
68
- followers: number;
69
- sbt: number;
70
- is_kyc: boolean;
71
- is_poh: boolean;
72
- mid: string;
73
- user_identity: string;
74
- identities: {
75
- [key: string]: string;
76
- };
77
- did: string;
78
- address: string;
79
- username?: string;
80
- max_level: number;
81
- user_level: number;
82
- recover_type: `${RecoveryType}`;
83
- user_fried_total: number;
84
- };
85
- type AnyObject = {
86
- [key: string]: any;
87
- };
88
- type ThemeType = {
89
- modal: {
90
- header: CSSProperties;
91
- input: CSSProperties;
92
- back: CSSProperties;
93
- close: CSSProperties;
94
- content: CSSProperties;
95
- overlay: CSSProperties;
96
- error: CSSProperties;
97
- };
98
- email: {
99
- addressInput: CSSProperties;
100
- address: CSSProperties;
101
- codeBox: CSSProperties;
102
- codeInput: CSSProperties;
103
- codeButton: CSSProperties;
104
- codeButtonDisabled: CSSProperties;
105
- };
106
- login: {
107
- box: CSSProperties;
108
- item: CSSProperties;
109
- itemIcon: CSSProperties;
110
- itemName: CSSProperties;
111
- content: CSSProperties;
112
- arrow: CSSProperties;
113
- };
114
- button: {
115
- default: CSSProperties;
116
- disabled: CSSProperties;
117
- line: CSSProperties;
118
- };
119
- user: {
120
- item: CSSProperties;
121
- value: CSSProperties;
122
- };
123
- };
124
- type DeepPartial<T> = {
125
- [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
126
- };
127
- type WalletReceiveMessageType = {
128
- source: 'match-wallet';
129
- method: string;
130
- data: any;
131
- status: 'success' | 'failed';
132
- messageId: string;
133
- version: number;
134
- };
135
- type MessageType = {
136
- method: string;
137
- data: any;
138
- };
139
- type IconProps = {
140
- color?: string;
141
- size?: number | string;
142
- width?: number | string;
143
- height?: number | string;
144
- style?: CSSProperties;
145
- className?: string;
146
- onClick?: (e?: any) => void;
147
- };
148
- type ModalProps = PropsWithChildren & {
149
- isOpen: boolean;
150
- width?: number;
151
- className?: string;
152
- zIndex?: number;
153
- };
154
- type ModalWithHeaderProps = ModalProps & {
155
- onBack?: () => void;
156
- onClose?: () => void;
157
- title?: ReactNode;
158
- showClose?: boolean;
159
- showBorder?: boolean;
160
- };
161
- type InputProps = {
162
- placeholder?: string;
163
- value?: string;
164
- onChange?: (e?: any) => void;
165
- disabled?: boolean;
166
- readonly?: boolean;
167
- type?: string;
168
- maxLength?: number;
169
- className?: string;
170
- after?: React.ReactNode;
171
- showLength?: boolean;
172
- showClear?: boolean;
173
- rows?: number;
174
- maxRows?: number;
175
- };
176
- type LoginBoxProps = {
177
- methods?: OtherLoginMethodType[];
178
- inModal?: boolean;
179
- recommendMethods?: RecommendLoginMethodType[];
180
- walletMethods?: WalletType[];
181
- };
182
- type LoginPanelProps = {
183
- header?: React.ReactNode;
184
- onClose?: () => void;
185
- } & LoginBoxProps;
186
- type LoginModalProps = LoginPanelProps & ModalProps;
187
- type EmailModalProps = ModalProps & {
188
- onClose?: () => void;
189
- onBack?: () => void;
190
- onLogin?: () => void;
191
- };
192
- type ButtonProps = {
193
- size?: 'sm' | 'df' | 'lg';
194
- type?: "button" | "submit" | "reset";
195
- rounded?: boolean;
196
- block?: boolean;
197
- disabled?: boolean;
198
- loading?: boolean;
199
- children?: React.ReactNode;
200
- onClick?: () => void;
201
- highlight?: boolean;
202
- style?: CSSProperties;
203
- className?: string;
204
- };
205
- type BindItemType = {
206
- type: string;
207
- type_sort: string;
208
- platform_name: string;
209
- platform_id: number;
210
- platform_uid: string;
211
- platform_nickname: string;
212
- platform_status: number;
213
- };
214
- type PohItemType = {
215
- user_id: number;
216
- poh_market_id: number;
217
- image_type: string;
218
- category: string;
219
- name: string;
220
- app_id: string;
221
- schema_id: string;
222
- active: boolean;
223
- };
224
- type BindInfoType = {
225
- progress_count: number;
226
- progress_current: number;
227
- total_assets: number;
228
- wallet_count: number;
229
- wallet_current: number;
230
- cex_count: number;
231
- cex_current: number;
232
- social_count: number;
233
- social_current: number;
234
- others_count: number;
235
- others_current: number;
236
- };
237
- type PohZkpassParams = {
238
- taskId: string;
239
- schemaId: string;
240
- publicFields: any;
241
- allocatorAddress: string;
242
- publicFieldsHash: string;
243
- allocatorSignature: string;
244
- uHash: string;
245
- validatorAddress: string;
246
- validatorSignature: string;
247
- };
248
- type PopoverPositionType = "center" | "left" | "right";
249
- type PopoverTypeType = "hover" | "click";
250
- type PopoverProps = PropsWithChildren & {
251
- position?: PopoverPositionType;
252
- type?: PopoverTypeType;
253
- content: ReactNode;
254
- className?: string;
255
- gap?: number | string;
256
- };
257
- type UserPopoverProps = Omit<PopoverProps, 'content'>;
258
- type LocaleType = "en" | "zh" | "tw" | "fr" | "ja" | "ko" | "vi" | "es" | "pt";
259
- type WalletConfigType = {
260
- type: "Base" | "UserPasscode";
261
- };
262
- type DrawerProps = PropsWithChildren & {
263
- showClose?: boolean;
264
- onClose?: () => void;
265
- isOpen: boolean;
266
- title?: React.ReactNode;
267
- zIndex?: number;
268
- onBack?: () => void;
269
- };
270
- type WalletPanelProps = DrawerProps & {
271
- title?: React.ReactNode;
272
- drawerTitleVisible?: boolean;
273
- };
274
- type AppConfigType = {
275
- appid: string;
276
- app_name: string;
277
- app_icon?: string;
278
- platform: LoginMethodType[];
279
- };
280
- type UIProps = {
281
- style?: CSSProperties;
282
- className?: string;
283
- onClick?: (e?: any) => void;
284
- };
285
- type UserChainType = {
286
- id: number;
287
- name: string;
288
- nativeCurrency: {
289
- name: string;
290
- symbol: string;
291
- decimals: number;
292
- icon: string;
293
- };
294
- rpcUrls: {
295
- default: {
296
- http: string[];
297
- };
298
- };
299
- blockExplorers: {
300
- default: {
301
- name: string;
302
- url: string;
303
- apiUrl: string;
304
- };
305
- };
306
- iconUrl: string;
307
- contracts: {
308
- multicall3: {
309
- address: `0x${string}`;
310
- };
311
- };
312
- };
313
- interface UserTransactionNextPageParams {
314
- block_number: number;
315
- fee: string;
316
- hash: string;
317
- index: number;
318
- inserted_at: string;
319
- items_count: number;
320
- limit: number;
321
- offset: number;
322
- value: string;
323
- }
324
- type Hash = `0x${string}`;
325
- type Address = `0x${string}`;
326
- type UserTransactionType = {
327
- amount: string;
328
- block_number: string;
329
- from: Address;
330
- hash: Hash;
331
- input: Hash;
332
- receive: string;
333
- source: "auto" | "matchain";
334
- timestamp: string;
335
- to: Address;
336
- value: string;
337
- extra: {
338
- asset: string;
339
- decodedInput: any;
340
- has_error_in_internal_transactions: boolean;
341
- name: string;
342
- receipt_status: number;
343
- result: string;
344
- status: string;
345
- };
346
- };
347
- type UserTransactionRecordType = UserTransactionType & {
348
- symbol: string;
349
- decimals: number;
350
- };
351
- type UserAssetToken = {
352
- symbol: string;
353
- name: string;
354
- balance: number;
355
- price: number;
356
- chain_id: string;
357
- address: string;
358
- decimals: string;
359
- icon: string;
360
- price_change_24h: number;
361
- };
362
- type UserImportTokenType = {
363
- chain_id: string;
364
- symbol: string;
365
- address: string;
366
- decimals: number;
367
- };
368
- type WalletAssetType = {
369
- chain_id: string;
370
- chain_name: string;
371
- symbol: string;
372
- name: string;
373
- balance: number;
374
- price: number;
375
- price_change_24h: number;
376
- address: string;
377
- decimals: string;
378
- icon: string;
379
- };
380
- type MetaPageType<T> = {
381
- meta: {
382
- page_num: number;
383
- page_size: number;
384
- total: number;
385
- };
386
- items: T;
387
- };
388
- type WalletChainType = {
389
- chain_id: number;
390
- chain_name: string;
391
- chain_icon: string;
392
- chain_full_name: string;
393
- chain_type: string;
394
- };
395
- type WalletNFTType = {
396
- token_address: string;
397
- token_id: string;
398
- token_uri: string;
399
- amount: string;
400
- owner_of: string;
401
- name: string;
402
- symbol: string;
403
- blockchain: string;
404
- chain_id: string;
405
- };
406
- type WalletAssetMergeType = {
407
- chain_id: string;
408
- chain_name?: string;
409
- name?: string;
410
- symbol: string;
411
- balance?: number;
412
- price?: number;
413
- address: string;
414
- decimals: string;
415
- icon?: string;
416
- price_change_24h?: number;
417
- isAuto?: boolean;
418
- isCustom?: boolean;
419
- value?: number;
420
- balanceValue?: string;
421
- };
422
- type useMatchWalletAssetsProps = {
423
- importTokenOptions?: Partial<Omit<UseQueryOptions<UserImportTokenType[]>, 'queryKey' | 'queryFn'>>;
424
- assetListOptions?: Partial<Omit<UseQueryOptions<UserAssetToken[]>, 'queryKey' | 'queryFn'>>;
425
- };
426
- type WalletStatusType = 'error' | 'success' | 'nonce' | 'signer' | 'connecting' | 'start';
427
-
428
- export { RecoveryType as $, type Address as A, type ButtonProps as B, type CEXType as C, type DrawerProps as D, type EmailModalProps as E, type BindItemType as F, type BindInfoType as G, type Hash as H, type IMatchEvents as I, type PohItemType as J, type WalletChainType as K, type LocaleType as L, type ModalWithHeaderProps as M, type WalletNFTType as N, type OtherLoginMethodType as O, type PopoverPositionType as P, type AppConfigType as Q, type RecommendLoginMethodType as R, type AuthParams as S, type BindWalletParam as T, type UIProps as U, type DeepPartial as V, type WalletConfigType as W, type EmbeddedWalletsParams as X, type IEnvName as Y, type ILoginWalletReq as Z, type MessageType as _, type IEnvConfigType as a, type ThemeType as a0, type UserPopoverProps as a1, type UserTransactionRecordType as a2, type WalletReceiveMessageType as a3, type WalletStatusType as a4, type LoginBoxProps as b, type WalletType as c, type PopoverTypeType as d, type LoginPanelProps as e, type LoginModalProps as f, type WalletAssetMergeType as g, type WalletPanelProps as h, type InputProps as i, type ModalProps as j, type PopoverProps as k, type ISocialLoginMethod as l, type OverviewInfo as m, type LoginMethodType as n, ChainType as o, type UserChainType as p, type AnyObject as q, type UserTransactionType as r, type UserImportTokenType as s, type UserAssetToken as t, type useMatchWalletAssetsProps as u, type IconProps as v, type PohZkpassParams as w, type UserTransactionNextPageParams as x, type WalletAssetType as y, type MetaPageType as z };