@zama-fhe/react-sdk 1.0.0-alpha.2
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/LICENSE +28 -0
- package/README.md +990 -0
- package/dist/chunk-463DUSLG.js +1005 -0
- package/dist/chunk-463DUSLG.js.map +1 -0
- package/dist/ethers/index.d.ts +142 -0
- package/dist/ethers/index.js +173 -0
- package/dist/ethers/index.js.map +1 -0
- package/dist/index.d.ts +1082 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -0
- package/dist/use-approve-underlying-DAkxWhfm.d.ts +784 -0
- package/dist/viem/index.d.ts +142 -0
- package/dist/viem/index.js +173 -0
- package/dist/viem/index.js.map +1 -0
- package/dist/wagmi/index.d.ts +7139 -0
- package/dist/wagmi/index.js +280 -0
- package/dist/wagmi/index.js.map +1 -0
- package/package.json +91 -0
|
@@ -0,0 +1,784 @@
|
|
|
1
|
+
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
2
|
+
import { UseQueryOptions, UseMutationOptions, UseQueryResult, UseSuspenseQueryResult } from '@tanstack/react-query';
|
|
3
|
+
import * as _zama_fhe_sdk from '@zama-fhe/sdk';
|
|
4
|
+
import { Address, ZamaSDK, Token, TransactionResult, UnshieldCallbacks, Hex, ReadonlyToken, RawLog, ActivityLogMetadata, ActivityItem } from '@zama-fhe/sdk';
|
|
5
|
+
|
|
6
|
+
/** Base configuration shared by all mutation hooks that need a Token instance. */
|
|
7
|
+
interface UseZamaConfig {
|
|
8
|
+
/** Address of the confidential token contract. */
|
|
9
|
+
tokenAddress: Address;
|
|
10
|
+
/** Address of the wrapper contract (required for shield/unshield operations). */
|
|
11
|
+
wrapperAddress?: Address;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Get a {@link Token} instance, memoized by address pair.
|
|
15
|
+
* Reads signer and storage from the nearest {@link ZamaProvider}.
|
|
16
|
+
*
|
|
17
|
+
* @param config - Token and optional wrapper addresses.
|
|
18
|
+
* @returns A memoized `Token` instance.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* const token = useToken({ tokenAddress: "0xToken", wrapperAddress: "0xWrapper" });
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
declare function useToken(config: UseZamaConfig): _zama_fhe_sdk.Token;
|
|
26
|
+
|
|
27
|
+
/** Configuration for {@link useConfidentialBalance}. */
|
|
28
|
+
interface UseConfidentialBalanceConfig {
|
|
29
|
+
/** Address of the confidential token contract. */
|
|
30
|
+
tokenAddress: Address;
|
|
31
|
+
/** Polling interval (ms) for the encrypted handle. Default: 10 000. */
|
|
32
|
+
handleRefetchInterval?: number;
|
|
33
|
+
}
|
|
34
|
+
/** Query options for the decrypt phase of {@link useConfidentialBalance}. */
|
|
35
|
+
type UseConfidentialBalanceOptions = Omit<UseQueryOptions<bigint, Error>, "queryKey" | "queryFn">;
|
|
36
|
+
/**
|
|
37
|
+
* Declarative hook to read the connected wallet's confidential token balance.
|
|
38
|
+
* Uses two-phase polling: cheaply polls the encrypted handle, then only
|
|
39
|
+
* decrypts when the handle changes (new balance).
|
|
40
|
+
*
|
|
41
|
+
* @param config - Token address and optional polling interval.
|
|
42
|
+
* @param options - React Query options forwarded to the decrypt query.
|
|
43
|
+
* @returns The decrypt query result plus `handleQuery` for Phase 1 state.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```tsx
|
|
47
|
+
* const { data: balance, isLoading, handleQuery } = useConfidentialBalance({
|
|
48
|
+
* tokenAddress: "0x...",
|
|
49
|
+
* });
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
declare function useConfidentialBalance(config: UseConfidentialBalanceConfig, options?: UseConfidentialBalanceOptions): {
|
|
53
|
+
handleQuery: _tanstack_react_query.UseQueryResult<`0x${string}`, Error>;
|
|
54
|
+
data: bigint;
|
|
55
|
+
error: Error;
|
|
56
|
+
isError: true;
|
|
57
|
+
isPending: false;
|
|
58
|
+
isLoading: false;
|
|
59
|
+
isLoadingError: false;
|
|
60
|
+
isRefetchError: true;
|
|
61
|
+
isSuccess: false;
|
|
62
|
+
isPlaceholderData: false;
|
|
63
|
+
status: "error";
|
|
64
|
+
dataUpdatedAt: number;
|
|
65
|
+
errorUpdatedAt: number;
|
|
66
|
+
failureCount: number;
|
|
67
|
+
failureReason: Error | null;
|
|
68
|
+
errorUpdateCount: number;
|
|
69
|
+
isFetched: boolean;
|
|
70
|
+
isFetchedAfterMount: boolean;
|
|
71
|
+
isFetching: boolean;
|
|
72
|
+
isInitialLoading: boolean;
|
|
73
|
+
isPaused: boolean;
|
|
74
|
+
isRefetching: boolean;
|
|
75
|
+
isStale: boolean;
|
|
76
|
+
isEnabled: boolean;
|
|
77
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<bigint, Error>>;
|
|
78
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
79
|
+
promise: Promise<bigint>;
|
|
80
|
+
} | {
|
|
81
|
+
handleQuery: _tanstack_react_query.UseQueryResult<`0x${string}`, Error>;
|
|
82
|
+
data: bigint;
|
|
83
|
+
error: null;
|
|
84
|
+
isError: false;
|
|
85
|
+
isPending: false;
|
|
86
|
+
isLoading: false;
|
|
87
|
+
isLoadingError: false;
|
|
88
|
+
isRefetchError: false;
|
|
89
|
+
isSuccess: true;
|
|
90
|
+
isPlaceholderData: false;
|
|
91
|
+
status: "success";
|
|
92
|
+
dataUpdatedAt: number;
|
|
93
|
+
errorUpdatedAt: number;
|
|
94
|
+
failureCount: number;
|
|
95
|
+
failureReason: Error | null;
|
|
96
|
+
errorUpdateCount: number;
|
|
97
|
+
isFetched: boolean;
|
|
98
|
+
isFetchedAfterMount: boolean;
|
|
99
|
+
isFetching: boolean;
|
|
100
|
+
isInitialLoading: boolean;
|
|
101
|
+
isPaused: boolean;
|
|
102
|
+
isRefetching: boolean;
|
|
103
|
+
isStale: boolean;
|
|
104
|
+
isEnabled: boolean;
|
|
105
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<bigint, Error>>;
|
|
106
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
107
|
+
promise: Promise<bigint>;
|
|
108
|
+
} | {
|
|
109
|
+
handleQuery: _tanstack_react_query.UseQueryResult<`0x${string}`, Error>;
|
|
110
|
+
data: undefined;
|
|
111
|
+
error: Error;
|
|
112
|
+
isError: true;
|
|
113
|
+
isPending: false;
|
|
114
|
+
isLoading: false;
|
|
115
|
+
isLoadingError: true;
|
|
116
|
+
isRefetchError: false;
|
|
117
|
+
isSuccess: false;
|
|
118
|
+
isPlaceholderData: false;
|
|
119
|
+
status: "error";
|
|
120
|
+
dataUpdatedAt: number;
|
|
121
|
+
errorUpdatedAt: number;
|
|
122
|
+
failureCount: number;
|
|
123
|
+
failureReason: Error | null;
|
|
124
|
+
errorUpdateCount: number;
|
|
125
|
+
isFetched: boolean;
|
|
126
|
+
isFetchedAfterMount: boolean;
|
|
127
|
+
isFetching: boolean;
|
|
128
|
+
isInitialLoading: boolean;
|
|
129
|
+
isPaused: boolean;
|
|
130
|
+
isRefetching: boolean;
|
|
131
|
+
isStale: boolean;
|
|
132
|
+
isEnabled: boolean;
|
|
133
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<bigint, Error>>;
|
|
134
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
135
|
+
promise: Promise<bigint>;
|
|
136
|
+
} | {
|
|
137
|
+
handleQuery: _tanstack_react_query.UseQueryResult<`0x${string}`, Error>;
|
|
138
|
+
data: undefined;
|
|
139
|
+
error: null;
|
|
140
|
+
isError: false;
|
|
141
|
+
isPending: true;
|
|
142
|
+
isLoading: true;
|
|
143
|
+
isLoadingError: false;
|
|
144
|
+
isRefetchError: false;
|
|
145
|
+
isSuccess: false;
|
|
146
|
+
isPlaceholderData: false;
|
|
147
|
+
status: "pending";
|
|
148
|
+
dataUpdatedAt: number;
|
|
149
|
+
errorUpdatedAt: number;
|
|
150
|
+
failureCount: number;
|
|
151
|
+
failureReason: Error | null;
|
|
152
|
+
errorUpdateCount: number;
|
|
153
|
+
isFetched: boolean;
|
|
154
|
+
isFetchedAfterMount: boolean;
|
|
155
|
+
isFetching: boolean;
|
|
156
|
+
isInitialLoading: boolean;
|
|
157
|
+
isPaused: boolean;
|
|
158
|
+
isRefetching: boolean;
|
|
159
|
+
isStale: boolean;
|
|
160
|
+
isEnabled: boolean;
|
|
161
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<bigint, Error>>;
|
|
162
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
163
|
+
promise: Promise<bigint>;
|
|
164
|
+
} | {
|
|
165
|
+
handleQuery: _tanstack_react_query.UseQueryResult<`0x${string}`, Error>;
|
|
166
|
+
data: undefined;
|
|
167
|
+
error: null;
|
|
168
|
+
isError: false;
|
|
169
|
+
isPending: true;
|
|
170
|
+
isLoadingError: false;
|
|
171
|
+
isRefetchError: false;
|
|
172
|
+
isSuccess: false;
|
|
173
|
+
isPlaceholderData: false;
|
|
174
|
+
status: "pending";
|
|
175
|
+
dataUpdatedAt: number;
|
|
176
|
+
errorUpdatedAt: number;
|
|
177
|
+
failureCount: number;
|
|
178
|
+
failureReason: Error | null;
|
|
179
|
+
errorUpdateCount: number;
|
|
180
|
+
isFetched: boolean;
|
|
181
|
+
isFetchedAfterMount: boolean;
|
|
182
|
+
isFetching: boolean;
|
|
183
|
+
isLoading: boolean;
|
|
184
|
+
isInitialLoading: boolean;
|
|
185
|
+
isPaused: boolean;
|
|
186
|
+
isRefetching: boolean;
|
|
187
|
+
isStale: boolean;
|
|
188
|
+
isEnabled: boolean;
|
|
189
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<bigint, Error>>;
|
|
190
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
191
|
+
promise: Promise<bigint>;
|
|
192
|
+
} | {
|
|
193
|
+
handleQuery: _tanstack_react_query.UseQueryResult<`0x${string}`, Error>;
|
|
194
|
+
data: bigint;
|
|
195
|
+
isError: false;
|
|
196
|
+
error: null;
|
|
197
|
+
isPending: false;
|
|
198
|
+
isLoading: false;
|
|
199
|
+
isLoadingError: false;
|
|
200
|
+
isRefetchError: false;
|
|
201
|
+
isSuccess: true;
|
|
202
|
+
isPlaceholderData: true;
|
|
203
|
+
status: "success";
|
|
204
|
+
dataUpdatedAt: number;
|
|
205
|
+
errorUpdatedAt: number;
|
|
206
|
+
failureCount: number;
|
|
207
|
+
failureReason: Error | null;
|
|
208
|
+
errorUpdateCount: number;
|
|
209
|
+
isFetched: boolean;
|
|
210
|
+
isFetchedAfterMount: boolean;
|
|
211
|
+
isFetching: boolean;
|
|
212
|
+
isInitialLoading: boolean;
|
|
213
|
+
isPaused: boolean;
|
|
214
|
+
isRefetching: boolean;
|
|
215
|
+
isStale: boolean;
|
|
216
|
+
isEnabled: boolean;
|
|
217
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<bigint, Error>>;
|
|
218
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
219
|
+
promise: Promise<bigint>;
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
/** Configuration for {@link useConfidentialBalances}. */
|
|
223
|
+
interface UseConfidentialBalancesConfig {
|
|
224
|
+
/** Addresses of the confidential token contracts to batch-query. */
|
|
225
|
+
tokenAddresses: Address[];
|
|
226
|
+
/** Polling interval (ms) for the encrypted handles. Default: 10 000. */
|
|
227
|
+
handleRefetchInterval?: number;
|
|
228
|
+
/** Maximum number of concurrent decrypt calls. Default: `Infinity` (no limit). */
|
|
229
|
+
maxConcurrency?: number;
|
|
230
|
+
}
|
|
231
|
+
/** Query options for the decrypt phase of {@link useConfidentialBalances}. */
|
|
232
|
+
type UseConfidentialBalancesOptions = Omit<UseQueryOptions<Map<Address, bigint>, Error>, "queryKey" | "queryFn">;
|
|
233
|
+
/**
|
|
234
|
+
* Declarative hook to read multiple confidential token balances in batch.
|
|
235
|
+
* Uses two-phase polling: cheaply polls encrypted handles, then only
|
|
236
|
+
* decrypts when any handle changes.
|
|
237
|
+
*
|
|
238
|
+
* @param config - Token addresses and optional polling interval.
|
|
239
|
+
* @param options - React Query options forwarded to the decrypt query.
|
|
240
|
+
* @returns The decrypt query result (Map of address → balance) plus `handlesQuery` for Phase 1 state.
|
|
241
|
+
*
|
|
242
|
+
* @example
|
|
243
|
+
* ```tsx
|
|
244
|
+
* const { data: balances } = useConfidentialBalances({
|
|
245
|
+
* tokenAddresses: ["0xTokenA", "0xTokenB"],
|
|
246
|
+
* });
|
|
247
|
+
* const balance = balances?.get("0xTokenA");
|
|
248
|
+
* ```
|
|
249
|
+
*/
|
|
250
|
+
declare function useConfidentialBalances(config: UseConfidentialBalancesConfig, options?: UseConfidentialBalancesOptions): {
|
|
251
|
+
handlesQuery: _tanstack_react_query.UseQueryResult<`0x${string}`[], Error>;
|
|
252
|
+
data: Map<`0x${string}`, bigint>;
|
|
253
|
+
error: Error;
|
|
254
|
+
isError: true;
|
|
255
|
+
isPending: false;
|
|
256
|
+
isLoading: false;
|
|
257
|
+
isLoadingError: false;
|
|
258
|
+
isRefetchError: true;
|
|
259
|
+
isSuccess: false;
|
|
260
|
+
isPlaceholderData: false;
|
|
261
|
+
status: "error";
|
|
262
|
+
dataUpdatedAt: number;
|
|
263
|
+
errorUpdatedAt: number;
|
|
264
|
+
failureCount: number;
|
|
265
|
+
failureReason: Error | null;
|
|
266
|
+
errorUpdateCount: number;
|
|
267
|
+
isFetched: boolean;
|
|
268
|
+
isFetchedAfterMount: boolean;
|
|
269
|
+
isFetching: boolean;
|
|
270
|
+
isInitialLoading: boolean;
|
|
271
|
+
isPaused: boolean;
|
|
272
|
+
isRefetching: boolean;
|
|
273
|
+
isStale: boolean;
|
|
274
|
+
isEnabled: boolean;
|
|
275
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Map<`0x${string}`, bigint>, Error>>;
|
|
276
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
277
|
+
promise: Promise<Map<`0x${string}`, bigint>>;
|
|
278
|
+
} | {
|
|
279
|
+
handlesQuery: _tanstack_react_query.UseQueryResult<`0x${string}`[], Error>;
|
|
280
|
+
data: Map<`0x${string}`, bigint>;
|
|
281
|
+
error: null;
|
|
282
|
+
isError: false;
|
|
283
|
+
isPending: false;
|
|
284
|
+
isLoading: false;
|
|
285
|
+
isLoadingError: false;
|
|
286
|
+
isRefetchError: false;
|
|
287
|
+
isSuccess: true;
|
|
288
|
+
isPlaceholderData: false;
|
|
289
|
+
status: "success";
|
|
290
|
+
dataUpdatedAt: number;
|
|
291
|
+
errorUpdatedAt: number;
|
|
292
|
+
failureCount: number;
|
|
293
|
+
failureReason: Error | null;
|
|
294
|
+
errorUpdateCount: number;
|
|
295
|
+
isFetched: boolean;
|
|
296
|
+
isFetchedAfterMount: boolean;
|
|
297
|
+
isFetching: boolean;
|
|
298
|
+
isInitialLoading: boolean;
|
|
299
|
+
isPaused: boolean;
|
|
300
|
+
isRefetching: boolean;
|
|
301
|
+
isStale: boolean;
|
|
302
|
+
isEnabled: boolean;
|
|
303
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Map<`0x${string}`, bigint>, Error>>;
|
|
304
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
305
|
+
promise: Promise<Map<`0x${string}`, bigint>>;
|
|
306
|
+
} | {
|
|
307
|
+
handlesQuery: _tanstack_react_query.UseQueryResult<`0x${string}`[], Error>;
|
|
308
|
+
data: undefined;
|
|
309
|
+
error: Error;
|
|
310
|
+
isError: true;
|
|
311
|
+
isPending: false;
|
|
312
|
+
isLoading: false;
|
|
313
|
+
isLoadingError: true;
|
|
314
|
+
isRefetchError: false;
|
|
315
|
+
isSuccess: false;
|
|
316
|
+
isPlaceholderData: false;
|
|
317
|
+
status: "error";
|
|
318
|
+
dataUpdatedAt: number;
|
|
319
|
+
errorUpdatedAt: number;
|
|
320
|
+
failureCount: number;
|
|
321
|
+
failureReason: Error | null;
|
|
322
|
+
errorUpdateCount: number;
|
|
323
|
+
isFetched: boolean;
|
|
324
|
+
isFetchedAfterMount: boolean;
|
|
325
|
+
isFetching: boolean;
|
|
326
|
+
isInitialLoading: boolean;
|
|
327
|
+
isPaused: boolean;
|
|
328
|
+
isRefetching: boolean;
|
|
329
|
+
isStale: boolean;
|
|
330
|
+
isEnabled: boolean;
|
|
331
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Map<`0x${string}`, bigint>, Error>>;
|
|
332
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
333
|
+
promise: Promise<Map<`0x${string}`, bigint>>;
|
|
334
|
+
} | {
|
|
335
|
+
handlesQuery: _tanstack_react_query.UseQueryResult<`0x${string}`[], Error>;
|
|
336
|
+
data: undefined;
|
|
337
|
+
error: null;
|
|
338
|
+
isError: false;
|
|
339
|
+
isPending: true;
|
|
340
|
+
isLoading: true;
|
|
341
|
+
isLoadingError: false;
|
|
342
|
+
isRefetchError: false;
|
|
343
|
+
isSuccess: false;
|
|
344
|
+
isPlaceholderData: false;
|
|
345
|
+
status: "pending";
|
|
346
|
+
dataUpdatedAt: number;
|
|
347
|
+
errorUpdatedAt: number;
|
|
348
|
+
failureCount: number;
|
|
349
|
+
failureReason: Error | null;
|
|
350
|
+
errorUpdateCount: number;
|
|
351
|
+
isFetched: boolean;
|
|
352
|
+
isFetchedAfterMount: boolean;
|
|
353
|
+
isFetching: boolean;
|
|
354
|
+
isInitialLoading: boolean;
|
|
355
|
+
isPaused: boolean;
|
|
356
|
+
isRefetching: boolean;
|
|
357
|
+
isStale: boolean;
|
|
358
|
+
isEnabled: boolean;
|
|
359
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Map<`0x${string}`, bigint>, Error>>;
|
|
360
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
361
|
+
promise: Promise<Map<`0x${string}`, bigint>>;
|
|
362
|
+
} | {
|
|
363
|
+
handlesQuery: _tanstack_react_query.UseQueryResult<`0x${string}`[], Error>;
|
|
364
|
+
data: undefined;
|
|
365
|
+
error: null;
|
|
366
|
+
isError: false;
|
|
367
|
+
isPending: true;
|
|
368
|
+
isLoadingError: false;
|
|
369
|
+
isRefetchError: false;
|
|
370
|
+
isSuccess: false;
|
|
371
|
+
isPlaceholderData: false;
|
|
372
|
+
status: "pending";
|
|
373
|
+
dataUpdatedAt: number;
|
|
374
|
+
errorUpdatedAt: number;
|
|
375
|
+
failureCount: number;
|
|
376
|
+
failureReason: Error | null;
|
|
377
|
+
errorUpdateCount: number;
|
|
378
|
+
isFetched: boolean;
|
|
379
|
+
isFetchedAfterMount: boolean;
|
|
380
|
+
isFetching: boolean;
|
|
381
|
+
isLoading: boolean;
|
|
382
|
+
isInitialLoading: boolean;
|
|
383
|
+
isPaused: boolean;
|
|
384
|
+
isRefetching: boolean;
|
|
385
|
+
isStale: boolean;
|
|
386
|
+
isEnabled: boolean;
|
|
387
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Map<`0x${string}`, bigint>, Error>>;
|
|
388
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
389
|
+
promise: Promise<Map<`0x${string}`, bigint>>;
|
|
390
|
+
} | {
|
|
391
|
+
handlesQuery: _tanstack_react_query.UseQueryResult<`0x${string}`[], Error>;
|
|
392
|
+
data: Map<`0x${string}`, bigint>;
|
|
393
|
+
isError: false;
|
|
394
|
+
error: null;
|
|
395
|
+
isPending: false;
|
|
396
|
+
isLoading: false;
|
|
397
|
+
isLoadingError: false;
|
|
398
|
+
isRefetchError: false;
|
|
399
|
+
isSuccess: true;
|
|
400
|
+
isPlaceholderData: true;
|
|
401
|
+
status: "success";
|
|
402
|
+
dataUpdatedAt: number;
|
|
403
|
+
errorUpdatedAt: number;
|
|
404
|
+
failureCount: number;
|
|
405
|
+
failureReason: Error | null;
|
|
406
|
+
errorUpdateCount: number;
|
|
407
|
+
isFetched: boolean;
|
|
408
|
+
isFetchedAfterMount: boolean;
|
|
409
|
+
isFetching: boolean;
|
|
410
|
+
isInitialLoading: boolean;
|
|
411
|
+
isPaused: boolean;
|
|
412
|
+
isRefetching: boolean;
|
|
413
|
+
isStale: boolean;
|
|
414
|
+
isEnabled: boolean;
|
|
415
|
+
refetch: (options?: _tanstack_react_query.RefetchOptions) => Promise<_tanstack_react_query.QueryObserverResult<Map<`0x${string}`, bigint>, Error>>;
|
|
416
|
+
fetchStatus: _tanstack_react_query.FetchStatus;
|
|
417
|
+
promise: Promise<Map<`0x${string}`, bigint>>;
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* TanStack Query mutation options factory for authorize-all.
|
|
422
|
+
*
|
|
423
|
+
* @param sdk - A `ZamaSDK` instance.
|
|
424
|
+
* @returns Mutation options with `mutationKey` and `mutationFn`.
|
|
425
|
+
*/
|
|
426
|
+
declare function authorizeAllMutationOptions(sdk: ZamaSDK): {
|
|
427
|
+
mutationKey: readonly ["authorizeAll"];
|
|
428
|
+
mutationFn: (tokenAddresses: Address[]) => Promise<void>;
|
|
429
|
+
};
|
|
430
|
+
/**
|
|
431
|
+
* Pre-authorize FHE decrypt credentials for a list of token addresses.
|
|
432
|
+
* A single wallet signature covers all addresses, so subsequent decrypt
|
|
433
|
+
* operations on any of these tokens reuse cached credentials.
|
|
434
|
+
*
|
|
435
|
+
* @example
|
|
436
|
+
* ```tsx
|
|
437
|
+
* const { mutateAsync: authorizeAll, isPending } = useAuthorizeAll();
|
|
438
|
+
* // Call authorizeAll(allTokenAddresses) before any individual reveal
|
|
439
|
+
* ```
|
|
440
|
+
*/
|
|
441
|
+
declare function useAuthorizeAll(): _tanstack_react_query.UseMutationResult<void, Error, `0x${string}`[], unknown>;
|
|
442
|
+
|
|
443
|
+
/** Parameters passed to the `mutate` function of {@link useConfidentialTransferFrom}. */
|
|
444
|
+
interface ConfidentialTransferFromParams {
|
|
445
|
+
/** Address to transfer from. Caller must be an approved operator. */
|
|
446
|
+
from: Address;
|
|
447
|
+
/** Recipient address. */
|
|
448
|
+
to: Address;
|
|
449
|
+
/** Amount to transfer (plaintext — encrypted automatically). */
|
|
450
|
+
amount: bigint;
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* TanStack Query mutation options factory for confidential transfer-from.
|
|
454
|
+
*
|
|
455
|
+
* @param token - A `Token` instance.
|
|
456
|
+
* @returns Mutation options with `mutationKey` and `mutationFn`.
|
|
457
|
+
*/
|
|
458
|
+
declare function confidentialTransferFromMutationOptions(token: Token): {
|
|
459
|
+
mutationKey: readonly ["confidentialTransferFrom", `0x${string}`];
|
|
460
|
+
mutationFn: ({ from, to, amount }: ConfidentialTransferFromParams) => Promise<TransactionResult>;
|
|
461
|
+
};
|
|
462
|
+
/**
|
|
463
|
+
* Operator transfer on behalf of another address. Caller must be an approved operator.
|
|
464
|
+
* Invalidates balance caches on success.
|
|
465
|
+
*
|
|
466
|
+
* @param config - Token address (and optional wrapper) identifying the token.
|
|
467
|
+
* @param options - React Query mutation options.
|
|
468
|
+
*
|
|
469
|
+
* @example
|
|
470
|
+
* ```tsx
|
|
471
|
+
* const transferFrom = useConfidentialTransferFrom({ tokenAddress: "0x..." });
|
|
472
|
+
* transferFrom.mutate({ from: "0xOwner", to: "0xRecipient", amount: 500n });
|
|
473
|
+
* ```
|
|
474
|
+
*/
|
|
475
|
+
declare function useConfidentialTransferFrom(config: UseZamaConfig, options?: UseMutationOptions<TransactionResult, Error, ConfidentialTransferFromParams, Address>): _tanstack_react_query.UseMutationResult<TransactionResult, Error, ConfidentialTransferFromParams, `0x${string}`>;
|
|
476
|
+
|
|
477
|
+
/** Parameters passed to the `mutate` function of {@link useConfidentialApprove}. */
|
|
478
|
+
interface ConfidentialApproveParams {
|
|
479
|
+
/** Address to approve as operator. */
|
|
480
|
+
spender: Address;
|
|
481
|
+
/** Unix timestamp until which the approval is valid. Defaults to 1 hour from now. */
|
|
482
|
+
until?: number;
|
|
483
|
+
}
|
|
484
|
+
/**
|
|
485
|
+
* TanStack Query mutation options factory for confidential approve.
|
|
486
|
+
*
|
|
487
|
+
* @param token - A `Token` instance.
|
|
488
|
+
* @returns Mutation options with `mutationKey` and `mutationFn`.
|
|
489
|
+
*/
|
|
490
|
+
declare function confidentialApproveMutationOptions(token: Token): {
|
|
491
|
+
mutationKey: readonly ["confidentialApprove", `0x${string}`];
|
|
492
|
+
mutationFn: ({ spender, until }: ConfidentialApproveParams) => Promise<TransactionResult>;
|
|
493
|
+
};
|
|
494
|
+
/**
|
|
495
|
+
* Set operator approval for a confidential token. Defaults to 1 hour.
|
|
496
|
+
*
|
|
497
|
+
* Errors are {@link ZamaError} subclasses — use `instanceof` to handle specific failures:
|
|
498
|
+
* - {@link SigningRejectedError} — user rejected the wallet prompt
|
|
499
|
+
* - {@link TransactionRevertedError} — on-chain transaction reverted
|
|
500
|
+
*
|
|
501
|
+
* @param config - Token address (and optional wrapper) identifying the token.
|
|
502
|
+
* @param options - React Query mutation options.
|
|
503
|
+
*
|
|
504
|
+
* @example
|
|
505
|
+
* ```tsx
|
|
506
|
+
* const approve = useConfidentialApprove({ tokenAddress: "0x..." });
|
|
507
|
+
* approve.mutate({ spender: "0xOperator" });
|
|
508
|
+
* ```
|
|
509
|
+
*/
|
|
510
|
+
declare function useConfidentialApprove(config: UseZamaConfig, options?: UseMutationOptions<TransactionResult, Error, ConfidentialApproveParams, Address>): _tanstack_react_query.UseMutationResult<TransactionResult, Error, ConfidentialApproveParams, `0x${string}`>;
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* TanStack Query mutation options factory for unwrap-all.
|
|
514
|
+
*
|
|
515
|
+
* @param token - A `Token` instance.
|
|
516
|
+
* @returns Mutation options with `mutationKey` and `mutationFn`.
|
|
517
|
+
*/
|
|
518
|
+
declare function unwrapAllMutationOptions(token: Token): {
|
|
519
|
+
mutationKey: readonly ["unwrapAll", `0x${string}`];
|
|
520
|
+
mutationFn: () => Promise<TransactionResult>;
|
|
521
|
+
};
|
|
522
|
+
/**
|
|
523
|
+
* Request an unwrap for the entire confidential balance.
|
|
524
|
+
* Uses the on-chain balance handle directly (no encryption needed).
|
|
525
|
+
* Call {@link useFinalizeUnwrap} after processing, or use {@link useUnshieldAll} for single-call orchestration.
|
|
526
|
+
*
|
|
527
|
+
* @param config - Token address (and optional wrapper) identifying the token.
|
|
528
|
+
* @param options - React Query mutation options.
|
|
529
|
+
*
|
|
530
|
+
* @example
|
|
531
|
+
* ```tsx
|
|
532
|
+
* const unwrapAll = useUnwrapAll({ tokenAddress: "0x..." });
|
|
533
|
+
* unwrapAll.mutate();
|
|
534
|
+
* ```
|
|
535
|
+
*/
|
|
536
|
+
declare function useUnwrapAll(config: UseZamaConfig, options?: UseMutationOptions<TransactionResult, Error, void, Address>): _tanstack_react_query.UseMutationResult<TransactionResult, Error, void, `0x${string}`>;
|
|
537
|
+
|
|
538
|
+
/** Parameters passed to the `mutate` function of {@link useUnshield}. */
|
|
539
|
+
interface UnshieldParams {
|
|
540
|
+
/** Amount to unshield (plaintext — encrypted automatically). */
|
|
541
|
+
amount: bigint;
|
|
542
|
+
/** Optional progress callbacks for the multi-step unshield flow. */
|
|
543
|
+
callbacks?: UnshieldCallbacks;
|
|
544
|
+
}
|
|
545
|
+
/**
|
|
546
|
+
* TanStack Query mutation options factory for unshield.
|
|
547
|
+
*
|
|
548
|
+
* @param token - A `Token` instance.
|
|
549
|
+
* @returns Mutation options with `mutationKey` and `mutationFn`.
|
|
550
|
+
*/
|
|
551
|
+
declare function unshieldMutationOptions(token: Token): {
|
|
552
|
+
mutationKey: readonly ["unshield", `0x${string}`];
|
|
553
|
+
mutationFn: ({ amount, callbacks }: UnshieldParams) => Promise<TransactionResult>;
|
|
554
|
+
};
|
|
555
|
+
/**
|
|
556
|
+
* Unshield a specific amount and finalize in one call.
|
|
557
|
+
* Orchestrates: unwrap → wait for receipt → parse event → finalize.
|
|
558
|
+
*
|
|
559
|
+
* Errors are {@link ZamaError} subclasses — use `instanceof` to handle specific failures:
|
|
560
|
+
* - {@link SigningRejectedError} — user rejected the wallet prompt
|
|
561
|
+
* - {@link EncryptionFailedError} — FHE encryption failed during unwrap
|
|
562
|
+
* - {@link DecryptionFailedError} — public decryption failed during finalize
|
|
563
|
+
* - {@link TransactionRevertedError} — on-chain transaction reverted
|
|
564
|
+
*
|
|
565
|
+
* @param config - Token and wrapper addresses.
|
|
566
|
+
* @param options - React Query mutation options.
|
|
567
|
+
*
|
|
568
|
+
* @example
|
|
569
|
+
* ```tsx
|
|
570
|
+
* const unshield = useUnshield({ tokenAddress: "0x...", wrapperAddress: "0x..." });
|
|
571
|
+
* unshield.mutate({ amount: 500n });
|
|
572
|
+
* ```
|
|
573
|
+
*/
|
|
574
|
+
declare function useUnshield(config: UseZamaConfig, options?: UseMutationOptions<TransactionResult, Error, UnshieldParams, Address>): _tanstack_react_query.UseMutationResult<TransactionResult, Error, UnshieldParams, `0x${string}`>;
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* TanStack Query mutation options factory for unshield-all.
|
|
578
|
+
*
|
|
579
|
+
* @param token - A `Token` instance.
|
|
580
|
+
* @returns Mutation options with `mutationKey` and `mutationFn`.
|
|
581
|
+
*/
|
|
582
|
+
/** Parameters passed to the `mutate` function of {@link useUnshieldAll}. */
|
|
583
|
+
interface UnshieldAllParams {
|
|
584
|
+
/** Optional progress callbacks for the multi-step unshield flow. */
|
|
585
|
+
callbacks?: UnshieldCallbacks;
|
|
586
|
+
}
|
|
587
|
+
declare function unshieldAllMutationOptions(token: Token): {
|
|
588
|
+
mutationKey: readonly ["unshieldAll", `0x${string}`];
|
|
589
|
+
mutationFn: (params?: UnshieldAllParams) => Promise<TransactionResult>;
|
|
590
|
+
};
|
|
591
|
+
/**
|
|
592
|
+
* Unshield the entire balance and finalize in one call.
|
|
593
|
+
* Orchestrates: unwrapAll → wait for receipt → parse event → finalize.
|
|
594
|
+
*
|
|
595
|
+
* @param config - Token and wrapper addresses.
|
|
596
|
+
* @param options - React Query mutation options.
|
|
597
|
+
*
|
|
598
|
+
* @example
|
|
599
|
+
* ```tsx
|
|
600
|
+
* const unshieldAll = useUnshieldAll({ tokenAddress: "0x...", wrapperAddress: "0x..." });
|
|
601
|
+
* unshieldAll.mutate();
|
|
602
|
+
* ```
|
|
603
|
+
*/
|
|
604
|
+
declare function useUnshieldAll(config: UseZamaConfig, options?: UseMutationOptions<TransactionResult, Error, UnshieldAllParams | void, Address>): _tanstack_react_query.UseMutationResult<TransactionResult, Error, void | UnshieldAllParams, `0x${string}`>;
|
|
605
|
+
|
|
606
|
+
/** Parameters passed to the `mutate` function of {@link useResumeUnshield}. */
|
|
607
|
+
interface ResumeUnshieldParams {
|
|
608
|
+
/** The unwrap transaction hash from a previously interrupted unshield. */
|
|
609
|
+
unwrapTxHash: Hex;
|
|
610
|
+
/** Optional progress callbacks for the finalization flow. */
|
|
611
|
+
callbacks?: UnshieldCallbacks;
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* TanStack Query mutation options factory for resume-unshield.
|
|
615
|
+
*
|
|
616
|
+
* @param token - A `Token` instance.
|
|
617
|
+
* @returns Mutation options with `mutationKey` and `mutationFn`.
|
|
618
|
+
*/
|
|
619
|
+
declare function resumeUnshieldMutationOptions(token: Token): {
|
|
620
|
+
mutationKey: readonly ["resumeUnshield", `0x${string}`];
|
|
621
|
+
mutationFn: ({ unwrapTxHash, callbacks }: ResumeUnshieldParams) => Promise<TransactionResult>;
|
|
622
|
+
};
|
|
623
|
+
/**
|
|
624
|
+
* Resume an interrupted unshield from an existing unwrap tx hash.
|
|
625
|
+
* Useful when the user submitted the unwrap but the finalize step was
|
|
626
|
+
* interrupted (e.g. page reload, network error).
|
|
627
|
+
*
|
|
628
|
+
* Errors are {@link ZamaError} subclasses — use `instanceof` to handle specific failures:
|
|
629
|
+
* - {@link DecryptionFailedError} — public decryption failed during finalize
|
|
630
|
+
* - {@link TransactionRevertedError} — on-chain transaction reverted
|
|
631
|
+
*
|
|
632
|
+
* @param config - Token and wrapper addresses.
|
|
633
|
+
* @param options - React Query mutation options.
|
|
634
|
+
*
|
|
635
|
+
* @example
|
|
636
|
+
* ```tsx
|
|
637
|
+
* const resumeUnshield = useResumeUnshield({ tokenAddress: "0x...", wrapperAddress: "0x..." });
|
|
638
|
+
* resumeUnshield.mutate({ unwrapTxHash: "0xabc..." });
|
|
639
|
+
* ```
|
|
640
|
+
*/
|
|
641
|
+
declare function useResumeUnshield(config: UseZamaConfig, options?: UseMutationOptions<TransactionResult, Error, ResumeUnshieldParams, Address>): _tanstack_react_query.UseMutationResult<TransactionResult, Error, ResumeUnshieldParams, `0x${string}`>;
|
|
642
|
+
|
|
643
|
+
/**
|
|
644
|
+
* Query key factory for token metadata queries.
|
|
645
|
+
* Use with `queryClient.invalidateQueries()` / `resetQueries()`.
|
|
646
|
+
*/
|
|
647
|
+
declare const tokenMetadataQueryKeys: {
|
|
648
|
+
/** Match all token metadata queries. */
|
|
649
|
+
readonly all: readonly ["tokenMetadata"];
|
|
650
|
+
/** Match metadata query for a specific token. */
|
|
651
|
+
readonly token: (tokenAddress: string) => readonly ["tokenMetadata", string];
|
|
652
|
+
};
|
|
653
|
+
/** ERC-20 token metadata (name, symbol, decimals). */
|
|
654
|
+
interface TokenMetadata {
|
|
655
|
+
/** Human-readable token name (e.g. "Wrapped Ether"). */
|
|
656
|
+
name: string;
|
|
657
|
+
/** Short ticker symbol (e.g. "WETH"). */
|
|
658
|
+
symbol: string;
|
|
659
|
+
/** Number of decimal places (e.g. 18). */
|
|
660
|
+
decimals: number;
|
|
661
|
+
}
|
|
662
|
+
/**
|
|
663
|
+
* TanStack Query options factory for token metadata.
|
|
664
|
+
* Returns a config object usable with `useQuery`, `prefetchQuery`, `useQueries`, etc.
|
|
665
|
+
*
|
|
666
|
+
* @param token - A `ReadonlyToken` instance.
|
|
667
|
+
* @returns Query options with `queryKey`, `queryFn`, and `staleTime`.
|
|
668
|
+
*
|
|
669
|
+
* @example
|
|
670
|
+
* ```ts
|
|
671
|
+
* const options = tokenMetadataQueryOptions(token);
|
|
672
|
+
* await queryClient.prefetchQuery(options);
|
|
673
|
+
* ```
|
|
674
|
+
*/
|
|
675
|
+
declare function tokenMetadataQueryOptions(token: ReadonlyToken): {
|
|
676
|
+
readonly queryKey: readonly ["tokenMetadata", string];
|
|
677
|
+
readonly queryFn: () => Promise<TokenMetadata>;
|
|
678
|
+
readonly staleTime: number;
|
|
679
|
+
};
|
|
680
|
+
/**
|
|
681
|
+
* Read ERC-20 token metadata (name, symbol, decimals).
|
|
682
|
+
* Fetches all three in parallel. Cached indefinitely since metadata is immutable.
|
|
683
|
+
*
|
|
684
|
+
* @param tokenAddress - Address of the token contract.
|
|
685
|
+
* @param options - React Query options (forwarded to `useQuery`).
|
|
686
|
+
* @returns Query result with `data: TokenMetadata`.
|
|
687
|
+
*
|
|
688
|
+
* @example
|
|
689
|
+
* ```tsx
|
|
690
|
+
* const { data: metadata } = useTokenMetadata("0xToken");
|
|
691
|
+
* // metadata?.name, metadata?.symbol, metadata?.decimals
|
|
692
|
+
* ```
|
|
693
|
+
*/
|
|
694
|
+
declare function useTokenMetadata(tokenAddress: Address, options?: Omit<UseQueryOptions<TokenMetadata, Error>, "queryKey" | "queryFn">): UseQueryResult<TokenMetadata, Error>;
|
|
695
|
+
/**
|
|
696
|
+
* Suspense variant of {@link useTokenMetadata}.
|
|
697
|
+
* Suspends rendering until metadata is loaded.
|
|
698
|
+
*
|
|
699
|
+
* @param tokenAddress - Address of the token contract.
|
|
700
|
+
* @returns Suspense query result with `data: TokenMetadata`.
|
|
701
|
+
*
|
|
702
|
+
* @example
|
|
703
|
+
* ```tsx
|
|
704
|
+
* const { data: metadata } = useTokenMetadataSuspense("0xToken");
|
|
705
|
+
* ```
|
|
706
|
+
*/
|
|
707
|
+
declare function useTokenMetadataSuspense(tokenAddress: Address): UseSuspenseQueryResult<TokenMetadata, Error>;
|
|
708
|
+
|
|
709
|
+
/**
|
|
710
|
+
* Query key factory for activity feed queries.
|
|
711
|
+
* Use with `queryClient.invalidateQueries()` / `resetQueries()`.
|
|
712
|
+
*/
|
|
713
|
+
declare const activityFeedQueryKeys: {
|
|
714
|
+
/** Match all activity feed queries. */
|
|
715
|
+
readonly all: readonly ["activityFeed"];
|
|
716
|
+
/** Match activity feed queries for a specific token. */
|
|
717
|
+
readonly token: (tokenAddress: string) => readonly ["activityFeed", string];
|
|
718
|
+
};
|
|
719
|
+
/** Configuration for {@link useActivityFeed}. */
|
|
720
|
+
interface UseActivityFeedConfig {
|
|
721
|
+
/** Address of the confidential token contract. */
|
|
722
|
+
tokenAddress: Address;
|
|
723
|
+
/** Connected wallet address. Pass `undefined` to disable the query. */
|
|
724
|
+
userAddress: Address | undefined;
|
|
725
|
+
/** Raw event logs from the provider (viem, ethers, etc.). Pass `undefined` to disable. */
|
|
726
|
+
logs: readonly (RawLog & Partial<ActivityLogMetadata>)[] | undefined;
|
|
727
|
+
/** Whether to batch-decrypt encrypted transfer amounts. Default: `true`. */
|
|
728
|
+
decrypt?: boolean;
|
|
729
|
+
}
|
|
730
|
+
/**
|
|
731
|
+
* Two-phase activity feed hook.
|
|
732
|
+
* Phase 1: Instantly parses raw logs into classified {@link ActivityItem}s (sync, cheap).
|
|
733
|
+
* Phase 2: Batch-decrypts encrypted transfer amounts via the relayer (async).
|
|
734
|
+
*
|
|
735
|
+
* The wallet provides logs (from its own provider — viem, ethers, etc.)
|
|
736
|
+
* and this hook normalizes + decrypts them.
|
|
737
|
+
*
|
|
738
|
+
* @param config - Token address, user address, raw logs, and decrypt option.
|
|
739
|
+
* @returns Query result with `data: ActivityItem[]`.
|
|
740
|
+
*
|
|
741
|
+
* @example
|
|
742
|
+
* ```tsx
|
|
743
|
+
* const { data: activity } = useActivityFeed({
|
|
744
|
+
* tokenAddress: "0xToken",
|
|
745
|
+
* userAddress: "0xUser",
|
|
746
|
+
* logs: rawLogs,
|
|
747
|
+
* });
|
|
748
|
+
* ```
|
|
749
|
+
*/
|
|
750
|
+
declare function useActivityFeed(config: UseActivityFeedConfig): UseQueryResult<ActivityItem[], Error>;
|
|
751
|
+
|
|
752
|
+
/** Parameters passed to the `mutate` function of {@link useApproveUnderlying}. */
|
|
753
|
+
interface ApproveUnderlyingParams {
|
|
754
|
+
/** Approval amount. Defaults to max uint256 if omitted. */
|
|
755
|
+
amount?: bigint;
|
|
756
|
+
}
|
|
757
|
+
/**
|
|
758
|
+
* TanStack Query mutation options factory for approve-underlying.
|
|
759
|
+
*
|
|
760
|
+
* @param token - A `Token` instance.
|
|
761
|
+
* @returns Mutation options with `mutationKey` and `mutationFn`.
|
|
762
|
+
*/
|
|
763
|
+
declare function approveUnderlyingMutationOptions(token: Token): {
|
|
764
|
+
mutationKey: readonly ["approveUnderlying", `0x${string}`];
|
|
765
|
+
mutationFn: ({ amount }: ApproveUnderlyingParams) => Promise<TransactionResult>;
|
|
766
|
+
};
|
|
767
|
+
/**
|
|
768
|
+
* Approve the wrapper contract to spend the underlying ERC-20.
|
|
769
|
+
* Defaults to max uint256. Resets to zero first if there's an existing
|
|
770
|
+
* non-zero allowance (required by tokens like USDT).
|
|
771
|
+
*
|
|
772
|
+
* @param config - Token and wrapper addresses.
|
|
773
|
+
* @param options - React Query mutation options.
|
|
774
|
+
*
|
|
775
|
+
* @example
|
|
776
|
+
* ```tsx
|
|
777
|
+
* const approve = useApproveUnderlying({ tokenAddress: "0x...", wrapperAddress: "0x..." });
|
|
778
|
+
* approve.mutate({}); // max approval
|
|
779
|
+
* approve.mutate({ amount: 1000n }); // exact amount
|
|
780
|
+
* ```
|
|
781
|
+
*/
|
|
782
|
+
declare function useApproveUnderlying(config: UseZamaConfig, options?: UseMutationOptions<TransactionResult, Error, ApproveUnderlyingParams, Address>): _tanstack_react_query.UseMutationResult<TransactionResult, Error, ApproveUnderlyingParams, `0x${string}`>;
|
|
783
|
+
|
|
784
|
+
export { type ApproveUnderlyingParams as A, useResumeUnshield as B, type ConfidentialApproveParams as C, useToken as D, useTokenMetadata as E, useTokenMetadataSuspense as F, useUnshield as G, useUnshieldAll as H, useUnwrapAll as I, type ResumeUnshieldParams as R, type TokenMetadata as T, type UseZamaConfig as U, type ConfidentialTransferFromParams as a, type UnshieldAllParams as b, type UnshieldParams as c, type UseActivityFeedConfig as d, type UseConfidentialBalanceConfig as e, type UseConfidentialBalanceOptions as f, type UseConfidentialBalancesConfig as g, type UseConfidentialBalancesOptions as h, activityFeedQueryKeys as i, approveUnderlyingMutationOptions as j, authorizeAllMutationOptions as k, confidentialApproveMutationOptions as l, confidentialTransferFromMutationOptions as m, tokenMetadataQueryOptions as n, unshieldMutationOptions as o, unwrapAllMutationOptions as p, useActivityFeed as q, resumeUnshieldMutationOptions as r, useApproveUnderlying as s, tokenMetadataQueryKeys as t, unshieldAllMutationOptions as u, useAuthorizeAll as v, useConfidentialApprove as w, useConfidentialBalance as x, useConfidentialBalances as y, useConfidentialTransferFrom as z };
|