@matchain/matchid-sdk-react 0.1.48-alpha.2 → 0.1.48-alpha.4
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 +1 -1
- package/dist/assets/icon/index.d.ts +1 -1
- package/dist/{chunk-D6IUBR7S.mjs → chunk-546GCDLV.mjs} +47 -1
- package/dist/chunk-546GCDLV.mjs.map +1 -0
- package/dist/{chunk-6HRRPZPM.mjs → chunk-UTCHBVMG.mjs} +2 -2
- package/dist/components/index.d.mts +3 -3
- package/dist/components/index.d.ts +3 -3
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/hooks/api/index.d.mts +2 -2
- package/dist/hooks/api/index.d.ts +2 -2
- package/dist/hooks/api/index.js.map +1 -1
- package/dist/hooks/api/index.mjs +2 -2
- package/dist/hooks/index.d.mts +2 -2
- package/dist/hooks/index.d.ts +2 -2
- package/dist/hooks/index.js +53 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +3 -1
- package/dist/{index-BVatQlwF.d.mts → index-B-s1k4Da.d.mts} +1 -1
- package/dist/{index-BIgM4fy0.d.mts → index-B8DYrhSW.d.mts} +1 -1
- package/dist/{index-CGs_yTFg.d.ts → index-BHvCA7F9.d.ts} +2 -2
- package/dist/{index-M7ZB3yR5.d.mts → index-BZrddrq-.d.mts} +2 -2
- package/dist/{index-DamklTOJ.d.mts → index-BvLpvebq.d.mts} +2 -2
- package/dist/{index-CKiK4KHj.d.ts → index-Bzcc-y8m.d.ts} +1 -1
- package/dist/{index-BwD1ij0H.d.ts → index-Cwx2p8th.d.ts} +1 -1
- package/dist/{index-C2-M-aBb.d.ts → index-DCeOyAw8.d.ts} +2 -2
- package/dist/{index-RfA22r-Z.d.ts → index-DG_gyw1q.d.ts} +1 -1
- package/dist/{index-BHVMQGZj.d.mts → index-DKyt0for.d.mts} +11 -3
- package/dist/{index-Bb7IkjUW.d.mts → index-DbG5IjhP.d.mts} +1 -1
- package/dist/{index-DgAnNnit.d.ts → index-TkB89QxX.d.ts} +11 -3
- package/dist/index.d.mts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +45 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/{types-DQq17lf4.d.mts → types-CHkU0WHZ.d.mts} +1 -1
- package/dist/{types-DQq17lf4.d.ts → types-CHkU0WHZ.d.ts} +1 -1
- package/dist/ui/index.d.mts +3 -3
- package/dist/ui/index.d.ts +3 -3
- package/package.json +1 -1
- package/dist/chunk-D6IUBR7S.mjs.map +0 -1
- /package/dist/{chunk-6HRRPZPM.mjs.map → chunk-UTCHBVMG.mjs.map} +0 -0
package/dist/hooks/index.mjs
CHANGED
|
@@ -3,12 +3,13 @@ import {
|
|
|
3
3
|
useMatchChain,
|
|
4
4
|
useMatchEvents,
|
|
5
5
|
useMatchWallet,
|
|
6
|
+
useMatchWalletRecords,
|
|
6
7
|
useModal,
|
|
7
8
|
useReceipt,
|
|
8
9
|
useToast,
|
|
9
10
|
useUserInfo,
|
|
10
11
|
useWallet
|
|
11
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-546GCDLV.mjs";
|
|
12
13
|
import "../chunk-UA6XHZHX.mjs";
|
|
13
14
|
import {
|
|
14
15
|
useLayout_exports
|
|
@@ -21,6 +22,7 @@ export {
|
|
|
21
22
|
useMatchChain,
|
|
22
23
|
useMatchEvents,
|
|
23
24
|
useMatchWallet,
|
|
25
|
+
useMatchWalletRecords,
|
|
24
26
|
useModal,
|
|
25
27
|
useReceipt,
|
|
26
28
|
useToast,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as AuthParams, C as ChainType, E as EmbeddedWalletsParams, R as RecoveryType } from './mpc-CTbBWHld.mjs';
|
|
2
|
-
import { A as AnyObject,
|
|
2
|
+
import { A as AnyObject, k as AppConfigType, l as BindInfoType, m as BindItemType, n as BindWalletParam, B as ButtonProps, C as CEXType, D as DeepPartial, o as DrawerProps, E as EmailModalProps, a as IEnvConfigType, p as IEnvName, q as ILoginWalletReq, I as IMatchEvents, g as ISocialLoginMethod, r as IconProps, s as InputProps, L as LocaleType, b as LoginBoxProps, i as LoginMethodType, f as LoginModalProps, e as LoginPanelProps, t as MessageType, u as MetaPageType, v as ModalProps, M as ModalWithHeaderProps, O as OtherLoginMethodType, h as OverviewInfo, w as PohItemType, x as PohZkpassParams, P as PopoverPositionType, y as PopoverProps, d as PopoverTypeType, R as RecommendLoginMethodType, T as ThemeType, z as UIProps, F as UserAssetToken, U as UserChainType, G as UserImportTokenType, H as UserPopoverProps, j as UserTransactionType, J as WalletAssetType, K as WalletChainType, W as WalletConfigType, N as WalletPanelProps, Q as WalletReceiveMessageType, c as WalletType } from './types-CHkU0WHZ.mjs';
|
|
3
3
|
|
|
4
4
|
declare const index_AnyObject: typeof AnyObject;
|
|
5
5
|
declare const index_AppConfigType: typeof AppConfigType;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseQueryOptions } from '@tanstack/react-query/src/types';
|
|
3
|
-
import {
|
|
3
|
+
import { x as PohZkpassParams, j as UserTransactionType, J as WalletAssetType, u as MetaPageType, m as BindItemType, l as BindInfoType, w as PohItemType, U as UserChainType, F as UserAssetToken, G as UserImportTokenType, K as WalletChainType } from './types-CHkU0WHZ.mjs';
|
|
4
4
|
|
|
5
5
|
declare const isSuccess: (res: {
|
|
6
6
|
code: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { E as EmailModalProps, b as LoginBoxProps, B as ButtonProps, O as OtherLoginMethodType, R as RecommendLoginMethodType, c as WalletType, P as PopoverPositionType, d as PopoverTypeType, e as LoginPanelProps, f as LoginModalProps, M as ModalWithHeaderProps } from './types-
|
|
3
|
-
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-
|
|
2
|
+
import { E as EmailModalProps, b as LoginBoxProps, B as ButtonProps, O as OtherLoginMethodType, R as RecommendLoginMethodType, c as WalletType, P as PopoverPositionType, d as PopoverTypeType, e as LoginPanelProps, f as LoginModalProps, M as ModalWithHeaderProps } from './types-CHkU0WHZ.js';
|
|
3
|
+
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-Bzcc-y8m.js';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
|
|
6
6
|
declare function EmailModal({ isOpen, width, onClose, onBack, onLogin }: EmailModalProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { E as EmailModalProps, b as LoginBoxProps, B as ButtonProps, O as OtherLoginMethodType, R as RecommendLoginMethodType, c as WalletType, P as PopoverPositionType, d as PopoverTypeType, e as LoginPanelProps, f as LoginModalProps, M as ModalWithHeaderProps } from './types-
|
|
3
|
-
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-
|
|
2
|
+
import { E as EmailModalProps, b as LoginBoxProps, B as ButtonProps, O as OtherLoginMethodType, R as RecommendLoginMethodType, c as WalletType, P as PopoverPositionType, d as PopoverTypeType, e as LoginPanelProps, f as LoginModalProps, M as ModalWithHeaderProps } from './types-CHkU0WHZ.mjs';
|
|
3
|
+
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-DbG5IjhP.mjs';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
|
|
6
6
|
declare function EmailModal({ isOpen, width, onClose, onBack, onLogin }: EmailModalProps): react_jsx_runtime.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-
|
|
1
|
+
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-DbG5IjhP.mjs';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { o as DrawerProps, N as WalletPanelProps, z as UIProps } from './types-CHkU0WHZ.mjs';
|
|
4
4
|
import { Hash, Chain } from 'viem';
|
|
5
5
|
import { CSSProperties } from 'react';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode, PropsWithChildren } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { s as InputProps, B as ButtonProps, v as ModalProps, M as ModalWithHeaderProps, y as PopoverProps } from './types-CHkU0WHZ.js';
|
|
4
4
|
|
|
5
5
|
declare function Field({ label, children, error, required, className }: {
|
|
6
6
|
label: ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
2
|
import { UseQueryOptions } from '@tanstack/react-query/src/types';
|
|
3
|
-
import {
|
|
3
|
+
import { x as PohZkpassParams, j as UserTransactionType, J as WalletAssetType, u as MetaPageType, m as BindItemType, l as BindInfoType, w as PohItemType, U as UserChainType, F as UserAssetToken, G as UserImportTokenType, K as WalletChainType } from './types-CHkU0WHZ.js';
|
|
4
4
|
|
|
5
5
|
declare const isSuccess: (res: {
|
|
6
6
|
code: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-
|
|
1
|
+
import { B as Button, F as Field, I as Input, M as Modal, a as ModalWithHeader, O as Overlay, P as Popover } from './index-Bzcc-y8m.js';
|
|
2
2
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
-
import {
|
|
3
|
+
import { o as DrawerProps, N as WalletPanelProps, z as UIProps } from './types-CHkU0WHZ.js';
|
|
4
4
|
import { Hash, Chain } from 'viem';
|
|
5
5
|
import { CSSProperties } from 'react';
|
|
6
6
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as AuthParams, C as ChainType, E as EmbeddedWalletsParams, R as RecoveryType } from './mpc-CTbBWHld.js';
|
|
2
|
-
import { A as AnyObject,
|
|
2
|
+
import { A as AnyObject, k as AppConfigType, l as BindInfoType, m as BindItemType, n as BindWalletParam, B as ButtonProps, C as CEXType, D as DeepPartial, o as DrawerProps, E as EmailModalProps, a as IEnvConfigType, p as IEnvName, q as ILoginWalletReq, I as IMatchEvents, g as ISocialLoginMethod, r as IconProps, s as InputProps, L as LocaleType, b as LoginBoxProps, i as LoginMethodType, f as LoginModalProps, e as LoginPanelProps, t as MessageType, u as MetaPageType, v as ModalProps, M as ModalWithHeaderProps, O as OtherLoginMethodType, h as OverviewInfo, w as PohItemType, x as PohZkpassParams, P as PopoverPositionType, y as PopoverProps, d as PopoverTypeType, R as RecommendLoginMethodType, T as ThemeType, z as UIProps, F as UserAssetToken, U as UserChainType, G as UserImportTokenType, H as UserPopoverProps, j as UserTransactionType, J as WalletAssetType, K as WalletChainType, W as WalletConfigType, N as WalletPanelProps, Q as WalletReceiveMessageType, c as WalletType } from './types-CHkU0WHZ.js';
|
|
3
3
|
|
|
4
4
|
declare const index_AnyObject: typeof AnyObject;
|
|
5
5
|
declare const index_AppConfigType: typeof AppConfigType;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as ISocialLoginMethod, h as OverviewInfo, C as CEXType, i as LoginMethodType, I as IMatchEvents, U as UserChainType } from './types-
|
|
1
|
+
import { g as ISocialLoginMethod, h as OverviewInfo, C as CEXType, i as LoginMethodType, I as IMatchEvents, U as UserChainType, j as UserTransactionType } from './types-CHkU0WHZ.mjs';
|
|
2
2
|
import * as viem from 'viem';
|
|
3
3
|
import { Account, WalletClientConfig, createWalletClient, SignableMessage, Hex, TransactionSerializable, DeployContractParameters, SendTransactionParameters, WriteContractParameters, Chain } from 'viem';
|
|
4
4
|
import { C as ChainType } from './mpc-CTbBWHld.mjs';
|
|
@@ -143,6 +143,13 @@ declare function useMatchChain(): {
|
|
|
143
143
|
declare function useMatchWallet(): {
|
|
144
144
|
showReceiveModal: () => void;
|
|
145
145
|
};
|
|
146
|
+
declare function useMatchWalletRecords({ pageSize }: {
|
|
147
|
+
pageSize?: number;
|
|
148
|
+
}): {
|
|
149
|
+
items: UserTransactionType[];
|
|
150
|
+
fetchMoreData: () => Promise<void>;
|
|
151
|
+
hasMore: boolean;
|
|
152
|
+
};
|
|
146
153
|
|
|
147
154
|
declare function useReceipt({ chainId, hash }: {
|
|
148
155
|
chainId: number;
|
|
@@ -161,13 +168,14 @@ declare const index_useLayout: typeof useLayout;
|
|
|
161
168
|
declare const index_useMatchChain: typeof useMatchChain;
|
|
162
169
|
declare const index_useMatchEvents: typeof useMatchEvents;
|
|
163
170
|
declare const index_useMatchWallet: typeof useMatchWallet;
|
|
171
|
+
declare const index_useMatchWalletRecords: typeof useMatchWalletRecords;
|
|
164
172
|
declare const index_useModal: typeof useModal;
|
|
165
173
|
declare const index_useReceipt: typeof useReceipt;
|
|
166
174
|
declare const index_useToast: typeof useToast;
|
|
167
175
|
declare const index_useUserInfo: typeof useUserInfo;
|
|
168
176
|
declare const index_useWallet: typeof useWallet;
|
|
169
177
|
declare namespace index {
|
|
170
|
-
export { index_useCopyClipboard as useCopyClipboard, index_useLayout as useLayout, index_useMatchChain as useMatchChain, index_useMatchEvents as useMatchEvents, index_useMatchWallet as useMatchWallet, index_useModal as useModal, index_useReceipt as useReceipt, index_useToast as useToast, index_useUserInfo as useUserInfo, index_useWallet as useWallet };
|
|
178
|
+
export { index_useCopyClipboard as useCopyClipboard, index_useLayout as useLayout, index_useMatchChain as useMatchChain, index_useMatchEvents as useMatchEvents, index_useMatchWallet as useMatchWallet, index_useMatchWalletRecords as useMatchWalletRecords, index_useModal as useModal, index_useReceipt as useReceipt, index_useToast as useToast, index_useUserInfo as useUserInfo, index_useWallet as useWallet };
|
|
171
179
|
}
|
|
172
180
|
|
|
173
|
-
export { useMatchEvents as a, useWallet as b, useCopyClipboard as c, useModal as d, useToast as e, useMatchChain as f, useMatchWallet as g,
|
|
181
|
+
export { useMatchEvents as a, useWallet as b, useCopyClipboard as c, useModal as d, useToast as e, useMatchChain as f, useMatchWallet as g, useMatchWalletRecords as h, index as i, useReceipt as j, useLayout as k, useUserInfo as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode, PropsWithChildren } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { s as InputProps, B as ButtonProps, v as ModalProps, M as ModalWithHeaderProps, y as PopoverProps } from './types-CHkU0WHZ.mjs';
|
|
4
4
|
|
|
5
5
|
declare function Field({ label, children, error, required, className }: {
|
|
6
6
|
label: ReactNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as ISocialLoginMethod, h as OverviewInfo, C as CEXType, i as LoginMethodType, I as IMatchEvents, U as UserChainType } from './types-
|
|
1
|
+
import { g as ISocialLoginMethod, h as OverviewInfo, C as CEXType, i as LoginMethodType, I as IMatchEvents, U as UserChainType, j as UserTransactionType } from './types-CHkU0WHZ.js';
|
|
2
2
|
import * as viem from 'viem';
|
|
3
3
|
import { Account, WalletClientConfig, createWalletClient, SignableMessage, Hex, TransactionSerializable, DeployContractParameters, SendTransactionParameters, WriteContractParameters, Chain } from 'viem';
|
|
4
4
|
import { C as ChainType } from './mpc-CTbBWHld.js';
|
|
@@ -143,6 +143,13 @@ declare function useMatchChain(): {
|
|
|
143
143
|
declare function useMatchWallet(): {
|
|
144
144
|
showReceiveModal: () => void;
|
|
145
145
|
};
|
|
146
|
+
declare function useMatchWalletRecords({ pageSize }: {
|
|
147
|
+
pageSize?: number;
|
|
148
|
+
}): {
|
|
149
|
+
items: UserTransactionType[];
|
|
150
|
+
fetchMoreData: () => Promise<void>;
|
|
151
|
+
hasMore: boolean;
|
|
152
|
+
};
|
|
146
153
|
|
|
147
154
|
declare function useReceipt({ chainId, hash }: {
|
|
148
155
|
chainId: number;
|
|
@@ -161,13 +168,14 @@ declare const index_useLayout: typeof useLayout;
|
|
|
161
168
|
declare const index_useMatchChain: typeof useMatchChain;
|
|
162
169
|
declare const index_useMatchEvents: typeof useMatchEvents;
|
|
163
170
|
declare const index_useMatchWallet: typeof useMatchWallet;
|
|
171
|
+
declare const index_useMatchWalletRecords: typeof useMatchWalletRecords;
|
|
164
172
|
declare const index_useModal: typeof useModal;
|
|
165
173
|
declare const index_useReceipt: typeof useReceipt;
|
|
166
174
|
declare const index_useToast: typeof useToast;
|
|
167
175
|
declare const index_useUserInfo: typeof useUserInfo;
|
|
168
176
|
declare const index_useWallet: typeof useWallet;
|
|
169
177
|
declare namespace index {
|
|
170
|
-
export { index_useCopyClipboard as useCopyClipboard, index_useLayout as useLayout, index_useMatchChain as useMatchChain, index_useMatchEvents as useMatchEvents, index_useMatchWallet as useMatchWallet, index_useModal as useModal, index_useReceipt as useReceipt, index_useToast as useToast, index_useUserInfo as useUserInfo, index_useWallet as useWallet };
|
|
178
|
+
export { index_useCopyClipboard as useCopyClipboard, index_useLayout as useLayout, index_useMatchChain as useMatchChain, index_useMatchEvents as useMatchEvents, index_useMatchWallet as useMatchWallet, index_useMatchWalletRecords as useMatchWalletRecords, index_useModal as useModal, index_useReceipt as useReceipt, index_useToast as useToast, index_useUserInfo as useUserInfo, index_useWallet as useWallet };
|
|
171
179
|
}
|
|
172
180
|
|
|
173
|
-
export { useMatchEvents as a, useWallet as b, useCopyClipboard as c, useModal as d, useToast as e, useMatchChain as f, useMatchWallet as g,
|
|
181
|
+
export { useMatchEvents as a, useWallet as b, useCopyClipboard as c, useModal as d, useToast as e, useMatchChain as f, useMatchWallet as g, useMatchWalletRecords as h, index as i, useReceipt as j, useLayout as k, useUserInfo as u };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType, W as WalletConfigType } from './types-
|
|
3
|
-
export { i as Components } from './index-
|
|
4
|
-
export { i as UI } from './index-
|
|
5
|
-
export { i as Hooks } from './index-
|
|
6
|
-
export { i as Api } from './index-
|
|
2
|
+
import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType, W as WalletConfigType } from './types-CHkU0WHZ.mjs';
|
|
3
|
+
export { i as Components } from './index-BZrddrq-.mjs';
|
|
4
|
+
export { i as UI } from './index-BvLpvebq.mjs';
|
|
5
|
+
export { i as Hooks } from './index-DKyt0for.mjs';
|
|
6
|
+
export { i as Api } from './index-B8DYrhSW.mjs';
|
|
7
7
|
export { i as Chains } from './index-DXRGMAbv.mjs';
|
|
8
|
-
export { i as Types } from './index-
|
|
8
|
+
export { i as Types } from './index-B-s1k4Da.mjs';
|
|
9
9
|
import 'react/jsx-runtime';
|
|
10
|
-
import './index-
|
|
10
|
+
import './index-DbG5IjhP.mjs';
|
|
11
11
|
import 'viem';
|
|
12
12
|
import './mpc-CTbBWHld.mjs';
|
|
13
13
|
import 'viem/types/misc';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType, W as WalletConfigType } from './types-
|
|
3
|
-
export { i as Components } from './index-
|
|
4
|
-
export { i as UI } from './index-
|
|
5
|
-
export { i as Hooks } from './index-
|
|
6
|
-
export { i as Api } from './index-
|
|
2
|
+
import { I as IMatchEvents, a as IEnvConfigType, L as LocaleType, W as WalletConfigType } from './types-CHkU0WHZ.js';
|
|
3
|
+
export { i as Components } from './index-BHvCA7F9.js';
|
|
4
|
+
export { i as UI } from './index-DCeOyAw8.js';
|
|
5
|
+
export { i as Hooks } from './index-TkB89QxX.js';
|
|
6
|
+
export { i as Api } from './index-Cwx2p8th.js';
|
|
7
7
|
export { i as Chains } from './index-DXRGMAbv.js';
|
|
8
|
-
export { i as Types } from './index-
|
|
8
|
+
export { i as Types } from './index-DG_gyw1q.js';
|
|
9
9
|
import 'react/jsx-runtime';
|
|
10
|
-
import './index-
|
|
10
|
+
import './index-Bzcc-y8m.js';
|
|
11
11
|
import 'viem';
|
|
12
12
|
import './mpc-CTbBWHld.js';
|
|
13
13
|
import 'viem/types/misc';
|
package/dist/index.js
CHANGED
|
@@ -52,6 +52,7 @@ __export(hooks_exports, {
|
|
|
52
52
|
useMatchChain: () => useMatchChain,
|
|
53
53
|
useMatchEvents: () => useMatchEvents,
|
|
54
54
|
useMatchWallet: () => useMatchWallet,
|
|
55
|
+
useMatchWalletRecords: () => useMatchWalletRecords,
|
|
55
56
|
useModal: () => useModal,
|
|
56
57
|
useReceipt: () => useReceipt,
|
|
57
58
|
useToast: () => useToast,
|
|
@@ -4865,6 +4866,11 @@ function WalletModal(props) {
|
|
|
4865
4866
|
// src/hooks/useMatchWallet.tsx
|
|
4866
4867
|
var import_react_qrcode = require("react-qrcode");
|
|
4867
4868
|
var import_react29 = require("react");
|
|
4869
|
+
|
|
4870
|
+
// example/src/config/contract.ts
|
|
4871
|
+
var address = "0x4143e29770fd63e24bb1f32d50bf8a590e34de4b";
|
|
4872
|
+
|
|
4873
|
+
// src/hooks/useMatchWallet.tsx
|
|
4868
4874
|
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
4869
4875
|
function useMatchWallet() {
|
|
4870
4876
|
const modal = useModal();
|
|
@@ -4912,6 +4918,45 @@ function useMatchWallet() {
|
|
|
4912
4918
|
showReceiveModal
|
|
4913
4919
|
};
|
|
4914
4920
|
}
|
|
4921
|
+
function useMatchWalletRecords({
|
|
4922
|
+
pageSize = 10
|
|
4923
|
+
}) {
|
|
4924
|
+
const [hasMore, setHasMore] = (0, import_react29.useState)(true);
|
|
4925
|
+
const [items, setItems] = (0, import_react29.useState)([]);
|
|
4926
|
+
const { chainId } = useMatchChain();
|
|
4927
|
+
const chainIdStr = chainId ? chainId.toString() : "";
|
|
4928
|
+
const fetchMoreData = async () => {
|
|
4929
|
+
if (!hasMore) {
|
|
4930
|
+
return;
|
|
4931
|
+
}
|
|
4932
|
+
const res = await getUserWalletTransactionsApi({
|
|
4933
|
+
chain_id: chainIdStr,
|
|
4934
|
+
limit: pageSize,
|
|
4935
|
+
offset: items.length
|
|
4936
|
+
});
|
|
4937
|
+
if (isSuccess(res)) {
|
|
4938
|
+
if (res.data && res.data.transactions.length > 0) {
|
|
4939
|
+
setItems(items.concat(res.data.transactions));
|
|
4940
|
+
}
|
|
4941
|
+
setHasMore(res.data && res.data.transactions.length >= pageSize);
|
|
4942
|
+
}
|
|
4943
|
+
};
|
|
4944
|
+
const onInit = async () => {
|
|
4945
|
+
setItems([]);
|
|
4946
|
+
setHasMore(true);
|
|
4947
|
+
fetchMoreData();
|
|
4948
|
+
};
|
|
4949
|
+
(0, import_react29.useEffect)(() => {
|
|
4950
|
+
if (chainId && address) {
|
|
4951
|
+
onInit();
|
|
4952
|
+
}
|
|
4953
|
+
}, [chainId, address]);
|
|
4954
|
+
return {
|
|
4955
|
+
items,
|
|
4956
|
+
fetchMoreData,
|
|
4957
|
+
hasMore
|
|
4958
|
+
};
|
|
4959
|
+
}
|
|
4915
4960
|
|
|
4916
4961
|
// src/hooks/useReceipt.tsx
|
|
4917
4962
|
var import_react30 = require("react");
|