wagmi-extended 2.3.8 → 2.4.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.
@@ -1,4 +1,4 @@
1
- import { type Address } from "viem";
1
+ import type { Address } from "viem";
2
2
  import type { QueryClient } from "@tanstack/react-query";
3
3
  import type { Config } from "wagmi";
4
4
  /** Reusable React Query key helper for deployment block lookups. */
@@ -23,7 +23,6 @@ export declare const deploymentBlockKey: (chainId: bigint | undefined, address:
23
23
  export declare function getDeploymentBlockQueryOptionsX(address: Address, floor?: bigint, wagmiConfig?: Config, options?: {
24
24
  disableLocalStorage?: boolean;
25
25
  chainId?: bigint;
26
- allowFail?: boolean;
27
26
  }): {
28
27
  readonly staleTime: number;
29
28
  readonly meta: {
@@ -28,8 +28,8 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
28
28
  isPending: boolean;
29
29
  errorMessage: string | undefined;
30
30
  error: null;
31
- status: "idle";
32
31
  data: undefined;
32
+ status: "idle";
33
33
  variables: undefined;
34
34
  isError: false;
35
35
  isIdle: true;
@@ -47,8 +47,8 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
47
47
  isPending: boolean;
48
48
  errorMessage: string | undefined;
49
49
  error: null;
50
- status: "pending";
51
50
  data: undefined;
51
+ status: "pending";
52
52
  variables: {
53
53
  abi: import("viem").Abi;
54
54
  functionName: string;
@@ -58,19 +58,19 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
58
58
  account?: `0x${string}` | import("viem").Account | null | undefined;
59
59
  value?: bigint | undefined;
60
60
  dataSuffix?: `0x${string}` | undefined;
61
- type?: "legacy" | undefined;
62
61
  gas?: bigint | undefined;
63
62
  nonce?: number | undefined;
64
- maxFeePerBlobGas?: undefined | undefined;
63
+ accessList?: undefined;
64
+ authorizationList?: undefined;
65
+ blobVersionedHashes?: undefined;
66
+ type?: "legacy" | undefined;
65
67
  gasPrice?: bigint | undefined;
68
+ maxFeePerBlobGas?: undefined | undefined;
66
69
  maxFeePerGas?: undefined | undefined;
67
70
  maxPriorityFeePerGas?: undefined | undefined;
68
- accessList?: undefined;
69
71
  blobs?: undefined;
70
- blobVersionedHashes?: undefined;
71
72
  kzg?: undefined;
72
73
  sidecars?: undefined;
73
- authorizationList?: undefined;
74
74
  chainId?: number | undefined;
75
75
  connector?: import("wagmi").Connector | undefined;
76
76
  __mode?: "prepared" | undefined;
@@ -83,19 +83,19 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
83
83
  account?: `0x${string}` | import("viem").Account | null | undefined;
84
84
  value?: bigint | undefined;
85
85
  dataSuffix?: `0x${string}` | undefined;
86
- type?: "eip2930" | undefined;
87
86
  gas?: bigint | undefined;
88
87
  nonce?: number | undefined;
89
- maxFeePerBlobGas?: undefined | undefined;
88
+ accessList?: import("viem").AccessList | undefined;
89
+ authorizationList?: undefined;
90
+ blobVersionedHashes?: undefined;
91
+ type?: "eip2930" | undefined;
90
92
  gasPrice?: bigint | undefined;
93
+ maxFeePerBlobGas?: undefined | undefined;
91
94
  maxFeePerGas?: undefined | undefined;
92
95
  maxPriorityFeePerGas?: undefined | undefined;
93
- accessList?: import("viem").AccessList | undefined;
94
96
  blobs?: undefined;
95
- blobVersionedHashes?: undefined;
96
97
  kzg?: undefined;
97
98
  sidecars?: undefined;
98
- authorizationList?: undefined;
99
99
  chainId?: number | undefined;
100
100
  connector?: import("wagmi").Connector | undefined;
101
101
  __mode?: "prepared" | undefined;
@@ -108,19 +108,19 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
108
108
  account?: `0x${string}` | import("viem").Account | null | undefined;
109
109
  value?: bigint | undefined;
110
110
  dataSuffix?: `0x${string}` | undefined;
111
- type?: "eip1559" | undefined;
112
111
  gas?: bigint | undefined;
113
112
  nonce?: number | undefined;
114
- maxFeePerBlobGas?: undefined | undefined;
113
+ accessList?: import("viem").AccessList | undefined;
114
+ authorizationList?: undefined;
115
+ blobVersionedHashes?: undefined;
116
+ type?: "eip1559" | undefined;
115
117
  gasPrice?: undefined | undefined;
118
+ maxFeePerBlobGas?: undefined | undefined;
116
119
  maxFeePerGas?: bigint | undefined;
117
120
  maxPriorityFeePerGas?: bigint | undefined;
118
- accessList?: import("viem").AccessList | undefined;
119
121
  blobs?: undefined;
120
- blobVersionedHashes?: undefined;
121
122
  kzg?: undefined;
122
123
  sidecars?: undefined;
123
- authorizationList?: undefined;
124
124
  chainId?: number | undefined;
125
125
  connector?: import("wagmi").Connector | undefined;
126
126
  __mode?: "prepared" | undefined;
@@ -133,19 +133,19 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
133
133
  account?: `0x${string}` | import("viem").Account | null | undefined;
134
134
  value?: bigint | undefined;
135
135
  dataSuffix?: `0x${string}` | undefined;
136
- type?: "eip4844" | undefined;
137
136
  gas?: bigint | undefined;
138
137
  nonce?: number | undefined;
139
- maxFeePerBlobGas: bigint;
138
+ accessList?: import("viem").AccessList | undefined;
139
+ authorizationList?: undefined;
140
+ blobVersionedHashes?: readonly `0x${string}`[] | undefined;
141
+ type?: "eip4844" | undefined;
140
142
  gasPrice?: undefined | undefined;
143
+ maxFeePerBlobGas: bigint;
141
144
  maxFeePerGas?: bigint | undefined;
142
145
  maxPriorityFeePerGas?: bigint | undefined;
143
- accessList?: import("viem").AccessList | undefined;
144
146
  blobs: readonly import("viem").Hex[] | readonly import("viem").ByteArray[];
145
- blobVersionedHashes?: readonly `0x${string}`[] | undefined;
146
147
  kzg?: import("viem").Kzg | undefined;
147
148
  sidecars?: readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined;
148
- authorizationList?: undefined;
149
149
  chainId?: number | undefined;
150
150
  connector?: import("wagmi").Connector | undefined;
151
151
  __mode?: "prepared" | undefined;
@@ -158,19 +158,19 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
158
158
  account?: `0x${string}` | import("viem").Account | null | undefined;
159
159
  value?: bigint | undefined;
160
160
  dataSuffix?: `0x${string}` | undefined;
161
- type?: "eip7702" | undefined;
162
161
  gas?: bigint | undefined;
163
162
  nonce?: number | undefined;
164
- maxFeePerBlobGas?: undefined | undefined;
163
+ accessList?: import("viem").AccessList | undefined;
164
+ authorizationList?: import("viem").AuthorizationList<number, boolean> | undefined;
165
+ blobVersionedHashes?: undefined;
166
+ type?: "eip7702" | undefined;
165
167
  gasPrice?: undefined | undefined;
168
+ maxFeePerBlobGas?: undefined | undefined;
166
169
  maxFeePerGas?: bigint | undefined;
167
170
  maxPriorityFeePerGas?: bigint | undefined;
168
- accessList?: import("viem").AccessList | undefined;
169
171
  blobs?: undefined;
170
- blobVersionedHashes?: undefined;
171
172
  kzg?: undefined;
172
173
  sidecars?: undefined;
173
- authorizationList?: import("viem").AuthorizationList<number, boolean> | undefined;
174
174
  chainId?: number | undefined;
175
175
  connector?: import("wagmi").Connector | undefined;
176
176
  __mode?: "prepared" | undefined;
@@ -191,8 +191,8 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
191
191
  isPending: boolean;
192
192
  errorMessage: string | undefined;
193
193
  error: import("@wagmi/core").WriteContractErrorType;
194
- status: "error";
195
194
  data: undefined;
195
+ status: "error";
196
196
  variables: {
197
197
  abi: import("viem").Abi;
198
198
  functionName: string;
@@ -202,19 +202,19 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
202
202
  account?: `0x${string}` | import("viem").Account | null | undefined;
203
203
  value?: bigint | undefined;
204
204
  dataSuffix?: `0x${string}` | undefined;
205
- type?: "legacy" | undefined;
206
205
  gas?: bigint | undefined;
207
206
  nonce?: number | undefined;
208
- maxFeePerBlobGas?: undefined | undefined;
207
+ accessList?: undefined;
208
+ authorizationList?: undefined;
209
+ blobVersionedHashes?: undefined;
210
+ type?: "legacy" | undefined;
209
211
  gasPrice?: bigint | undefined;
212
+ maxFeePerBlobGas?: undefined | undefined;
210
213
  maxFeePerGas?: undefined | undefined;
211
214
  maxPriorityFeePerGas?: undefined | undefined;
212
- accessList?: undefined;
213
215
  blobs?: undefined;
214
- blobVersionedHashes?: undefined;
215
216
  kzg?: undefined;
216
217
  sidecars?: undefined;
217
- authorizationList?: undefined;
218
218
  chainId?: number | undefined;
219
219
  connector?: import("wagmi").Connector | undefined;
220
220
  __mode?: "prepared" | undefined;
@@ -227,19 +227,19 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
227
227
  account?: `0x${string}` | import("viem").Account | null | undefined;
228
228
  value?: bigint | undefined;
229
229
  dataSuffix?: `0x${string}` | undefined;
230
- type?: "eip2930" | undefined;
231
230
  gas?: bigint | undefined;
232
231
  nonce?: number | undefined;
233
- maxFeePerBlobGas?: undefined | undefined;
232
+ accessList?: import("viem").AccessList | undefined;
233
+ authorizationList?: undefined;
234
+ blobVersionedHashes?: undefined;
235
+ type?: "eip2930" | undefined;
234
236
  gasPrice?: bigint | undefined;
237
+ maxFeePerBlobGas?: undefined | undefined;
235
238
  maxFeePerGas?: undefined | undefined;
236
239
  maxPriorityFeePerGas?: undefined | undefined;
237
- accessList?: import("viem").AccessList | undefined;
238
240
  blobs?: undefined;
239
- blobVersionedHashes?: undefined;
240
241
  kzg?: undefined;
241
242
  sidecars?: undefined;
242
- authorizationList?: undefined;
243
243
  chainId?: number | undefined;
244
244
  connector?: import("wagmi").Connector | undefined;
245
245
  __mode?: "prepared" | undefined;
@@ -252,19 +252,19 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
252
252
  account?: `0x${string}` | import("viem").Account | null | undefined;
253
253
  value?: bigint | undefined;
254
254
  dataSuffix?: `0x${string}` | undefined;
255
- type?: "eip1559" | undefined;
256
255
  gas?: bigint | undefined;
257
256
  nonce?: number | undefined;
258
- maxFeePerBlobGas?: undefined | undefined;
257
+ accessList?: import("viem").AccessList | undefined;
258
+ authorizationList?: undefined;
259
+ blobVersionedHashes?: undefined;
260
+ type?: "eip1559" | undefined;
259
261
  gasPrice?: undefined | undefined;
262
+ maxFeePerBlobGas?: undefined | undefined;
260
263
  maxFeePerGas?: bigint | undefined;
261
264
  maxPriorityFeePerGas?: bigint | undefined;
262
- accessList?: import("viem").AccessList | undefined;
263
265
  blobs?: undefined;
264
- blobVersionedHashes?: undefined;
265
266
  kzg?: undefined;
266
267
  sidecars?: undefined;
267
- authorizationList?: undefined;
268
268
  chainId?: number | undefined;
269
269
  connector?: import("wagmi").Connector | undefined;
270
270
  __mode?: "prepared" | undefined;
@@ -277,19 +277,19 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
277
277
  account?: `0x${string}` | import("viem").Account | null | undefined;
278
278
  value?: bigint | undefined;
279
279
  dataSuffix?: `0x${string}` | undefined;
280
- type?: "eip4844" | undefined;
281
280
  gas?: bigint | undefined;
282
281
  nonce?: number | undefined;
283
- maxFeePerBlobGas: bigint;
282
+ accessList?: import("viem").AccessList | undefined;
283
+ authorizationList?: undefined;
284
+ blobVersionedHashes?: readonly `0x${string}`[] | undefined;
285
+ type?: "eip4844" | undefined;
284
286
  gasPrice?: undefined | undefined;
287
+ maxFeePerBlobGas: bigint;
285
288
  maxFeePerGas?: bigint | undefined;
286
289
  maxPriorityFeePerGas?: bigint | undefined;
287
- accessList?: import("viem").AccessList | undefined;
288
290
  blobs: readonly import("viem").Hex[] | readonly import("viem").ByteArray[];
289
- blobVersionedHashes?: readonly `0x${string}`[] | undefined;
290
291
  kzg?: import("viem").Kzg | undefined;
291
292
  sidecars?: readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined;
292
- authorizationList?: undefined;
293
293
  chainId?: number | undefined;
294
294
  connector?: import("wagmi").Connector | undefined;
295
295
  __mode?: "prepared" | undefined;
@@ -302,19 +302,19 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
302
302
  account?: `0x${string}` | import("viem").Account | null | undefined;
303
303
  value?: bigint | undefined;
304
304
  dataSuffix?: `0x${string}` | undefined;
305
- type?: "eip7702" | undefined;
306
305
  gas?: bigint | undefined;
307
306
  nonce?: number | undefined;
308
- maxFeePerBlobGas?: undefined | undefined;
307
+ accessList?: import("viem").AccessList | undefined;
308
+ authorizationList?: import("viem").AuthorizationList<number, boolean> | undefined;
309
+ blobVersionedHashes?: undefined;
310
+ type?: "eip7702" | undefined;
309
311
  gasPrice?: undefined | undefined;
312
+ maxFeePerBlobGas?: undefined | undefined;
310
313
  maxFeePerGas?: bigint | undefined;
311
314
  maxPriorityFeePerGas?: bigint | undefined;
312
- accessList?: import("viem").AccessList | undefined;
313
315
  blobs?: undefined;
314
- blobVersionedHashes?: undefined;
315
316
  kzg?: undefined;
316
317
  sidecars?: undefined;
317
- authorizationList?: import("viem").AuthorizationList<number, boolean> | undefined;
318
318
  chainId?: number | undefined;
319
319
  connector?: import("wagmi").Connector | undefined;
320
320
  __mode?: "prepared" | undefined;
@@ -335,8 +335,8 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
335
335
  isPending: boolean;
336
336
  errorMessage: string | undefined;
337
337
  error: null;
338
- status: "success";
339
338
  data: `0x${string}`;
339
+ status: "success";
340
340
  variables: {
341
341
  abi: import("viem").Abi;
342
342
  functionName: string;
@@ -346,19 +346,19 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
346
346
  account?: `0x${string}` | import("viem").Account | null | undefined;
347
347
  value?: bigint | undefined;
348
348
  dataSuffix?: `0x${string}` | undefined;
349
- type?: "legacy" | undefined;
350
349
  gas?: bigint | undefined;
351
350
  nonce?: number | undefined;
352
- maxFeePerBlobGas?: undefined | undefined;
351
+ accessList?: undefined;
352
+ authorizationList?: undefined;
353
+ blobVersionedHashes?: undefined;
354
+ type?: "legacy" | undefined;
353
355
  gasPrice?: bigint | undefined;
356
+ maxFeePerBlobGas?: undefined | undefined;
354
357
  maxFeePerGas?: undefined | undefined;
355
358
  maxPriorityFeePerGas?: undefined | undefined;
356
- accessList?: undefined;
357
359
  blobs?: undefined;
358
- blobVersionedHashes?: undefined;
359
360
  kzg?: undefined;
360
361
  sidecars?: undefined;
361
- authorizationList?: undefined;
362
362
  chainId?: number | undefined;
363
363
  connector?: import("wagmi").Connector | undefined;
364
364
  __mode?: "prepared" | undefined;
@@ -371,19 +371,19 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
371
371
  account?: `0x${string}` | import("viem").Account | null | undefined;
372
372
  value?: bigint | undefined;
373
373
  dataSuffix?: `0x${string}` | undefined;
374
- type?: "eip2930" | undefined;
375
374
  gas?: bigint | undefined;
376
375
  nonce?: number | undefined;
377
- maxFeePerBlobGas?: undefined | undefined;
376
+ accessList?: import("viem").AccessList | undefined;
377
+ authorizationList?: undefined;
378
+ blobVersionedHashes?: undefined;
379
+ type?: "eip2930" | undefined;
378
380
  gasPrice?: bigint | undefined;
381
+ maxFeePerBlobGas?: undefined | undefined;
379
382
  maxFeePerGas?: undefined | undefined;
380
383
  maxPriorityFeePerGas?: undefined | undefined;
381
- accessList?: import("viem").AccessList | undefined;
382
384
  blobs?: undefined;
383
- blobVersionedHashes?: undefined;
384
385
  kzg?: undefined;
385
386
  sidecars?: undefined;
386
- authorizationList?: undefined;
387
387
  chainId?: number | undefined;
388
388
  connector?: import("wagmi").Connector | undefined;
389
389
  __mode?: "prepared" | undefined;
@@ -396,19 +396,19 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
396
396
  account?: `0x${string}` | import("viem").Account | null | undefined;
397
397
  value?: bigint | undefined;
398
398
  dataSuffix?: `0x${string}` | undefined;
399
- type?: "eip1559" | undefined;
400
399
  gas?: bigint | undefined;
401
400
  nonce?: number | undefined;
402
- maxFeePerBlobGas?: undefined | undefined;
401
+ accessList?: import("viem").AccessList | undefined;
402
+ authorizationList?: undefined;
403
+ blobVersionedHashes?: undefined;
404
+ type?: "eip1559" | undefined;
403
405
  gasPrice?: undefined | undefined;
406
+ maxFeePerBlobGas?: undefined | undefined;
404
407
  maxFeePerGas?: bigint | undefined;
405
408
  maxPriorityFeePerGas?: bigint | undefined;
406
- accessList?: import("viem").AccessList | undefined;
407
409
  blobs?: undefined;
408
- blobVersionedHashes?: undefined;
409
410
  kzg?: undefined;
410
411
  sidecars?: undefined;
411
- authorizationList?: undefined;
412
412
  chainId?: number | undefined;
413
413
  connector?: import("wagmi").Connector | undefined;
414
414
  __mode?: "prepared" | undefined;
@@ -421,19 +421,19 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
421
421
  account?: `0x${string}` | import("viem").Account | null | undefined;
422
422
  value?: bigint | undefined;
423
423
  dataSuffix?: `0x${string}` | undefined;
424
- type?: "eip4844" | undefined;
425
424
  gas?: bigint | undefined;
426
425
  nonce?: number | undefined;
427
- maxFeePerBlobGas: bigint;
426
+ accessList?: import("viem").AccessList | undefined;
427
+ authorizationList?: undefined;
428
+ blobVersionedHashes?: readonly `0x${string}`[] | undefined;
429
+ type?: "eip4844" | undefined;
428
430
  gasPrice?: undefined | undefined;
431
+ maxFeePerBlobGas: bigint;
429
432
  maxFeePerGas?: bigint | undefined;
430
433
  maxPriorityFeePerGas?: bigint | undefined;
431
- accessList?: import("viem").AccessList | undefined;
432
434
  blobs: readonly import("viem").Hex[] | readonly import("viem").ByteArray[];
433
- blobVersionedHashes?: readonly `0x${string}`[] | undefined;
434
435
  kzg?: import("viem").Kzg | undefined;
435
436
  sidecars?: readonly import("viem").BlobSidecar<`0x${string}`>[] | undefined;
436
- authorizationList?: undefined;
437
437
  chainId?: number | undefined;
438
438
  connector?: import("wagmi").Connector | undefined;
439
439
  __mode?: "prepared" | undefined;
@@ -446,19 +446,19 @@ export declare function useContractWriteX(settings: WriteExtendedAsyncParams): {
446
446
  account?: `0x${string}` | import("viem").Account | null | undefined;
447
447
  value?: bigint | undefined;
448
448
  dataSuffix?: `0x${string}` | undefined;
449
- type?: "eip7702" | undefined;
450
449
  gas?: bigint | undefined;
451
450
  nonce?: number | undefined;
452
- maxFeePerBlobGas?: undefined | undefined;
451
+ accessList?: import("viem").AccessList | undefined;
452
+ authorizationList?: import("viem").AuthorizationList<number, boolean> | undefined;
453
+ blobVersionedHashes?: undefined;
454
+ type?: "eip7702" | undefined;
453
455
  gasPrice?: undefined | undefined;
456
+ maxFeePerBlobGas?: undefined | undefined;
454
457
  maxFeePerGas?: bigint | undefined;
455
458
  maxPriorityFeePerGas?: bigint | undefined;
456
- accessList?: import("viem").AccessList | undefined;
457
459
  blobs?: undefined;
458
- blobVersionedHashes?: undefined;
459
460
  kzg?: undefined;
460
461
  sidecars?: undefined;
461
- authorizationList?: import("viem").AuthorizationList<number, boolean> | undefined;
462
462
  chainId?: number | undefined;
463
463
  connector?: import("wagmi").Connector | undefined;
464
464
  __mode?: "prepared" | undefined;
@@ -1,5 +1,5 @@
1
1
  import { Query, QueryKey } from "@tanstack/query-core";
2
- import { Address } from "viem";
2
+ import { Address, WaitForTransactionReceiptParameters } from "viem";
3
3
  export type WriteExtendedAsyncParams = {
4
4
  onSuccess?: (txHash: Address) => void;
5
5
  onError?: (e: any) => void;
@@ -13,6 +13,7 @@ export type WriteExtendedAsyncParams = {
13
13
  invalidatePredicate?: (query: Query<unknown, unknown>) => boolean;
14
14
  disableLogging?: boolean;
15
15
  disableWaitingForReceipt?: boolean;
16
+ waitForTransactionReceiptParameters?: WaitForTransactionReceiptParameters;
16
17
  };
17
18
  /**
18
19
  * Custom hook to handle transaction mutations.
@@ -29,8 +29,8 @@ export declare function useSendTransactionX(settings?: WriteExtendedAsyncParams)
29
29
  sendTransaction: import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>;
30
30
  sendTransactionX: (params: Parameters<import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>>[0], simulationParams?: Parameters<typeof writeContract>[1]) => Promise<void>;
31
31
  error: null;
32
- status: "idle";
33
32
  data: undefined;
33
+ status: "idle";
34
34
  variables: undefined;
35
35
  isError: false;
36
36
  isIdle: true;
@@ -48,8 +48,8 @@ export declare function useSendTransactionX(settings?: WriteExtendedAsyncParams)
48
48
  sendTransaction: import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>;
49
49
  sendTransactionX: (params: Parameters<import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>>[0], simulationParams?: Parameters<typeof writeContract>[1]) => Promise<void>;
50
50
  error: null;
51
- status: "pending";
52
51
  data: undefined;
52
+ status: "pending";
53
53
  variables: import("wagmi/query").SendTransactionVariables<import("wagmi").Config, number>;
54
54
  isError: false;
55
55
  isIdle: false;
@@ -67,8 +67,8 @@ export declare function useSendTransactionX(settings?: WriteExtendedAsyncParams)
67
67
  sendTransaction: import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>;
68
68
  sendTransactionX: (params: Parameters<import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>>[0], simulationParams?: Parameters<typeof writeContract>[1]) => Promise<void>;
69
69
  error: import("wagmi/actions").SendTransactionErrorType;
70
- status: "error";
71
70
  data: undefined;
71
+ status: "error";
72
72
  variables: import("wagmi/query").SendTransactionVariables<import("wagmi").Config, number>;
73
73
  isError: true;
74
74
  isIdle: false;
@@ -86,8 +86,8 @@ export declare function useSendTransactionX(settings?: WriteExtendedAsyncParams)
86
86
  sendTransaction: import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>;
87
87
  sendTransactionX: (params: Parameters<import("wagmi/query").SendTransactionMutate<import("wagmi").Config, void>>[0], simulationParams?: Parameters<typeof writeContract>[1]) => Promise<void>;
88
88
  error: null;
89
- status: "success";
90
89
  data: `0x${string}`;
90
+ status: "success";
91
91
  variables: import("wagmi/query").SendTransactionVariables<import("wagmi").Config, number>;
92
92
  isError: false;
93
93
  isIdle: false;
package/dist/index.cjs.js CHANGED
@@ -129,6 +129,7 @@ function useHandleTransactionMutationX({ settings, }) {
129
129
  // 1. wait for transaction receipt
130
130
  const txReceipt = await actions.waitForTransactionReceipt(wagmiConfig, {
131
131
  hash: txHash,
132
+ ...settings?.waitForTransactionReceiptParameters,
132
133
  });
133
134
  // 2. throw if receipt is not valid
134
135
  if (txReceipt.status === "reverted")
@@ -886,24 +887,12 @@ function writeDeploymentBlockToLS(chainId, address, floor, value) {
886
887
  /**
887
888
  * Internal helper: checks if there is bytecode at `address` on `blockNumber`.
888
889
  */
889
- async function hasCodeAtX(address, blockNumber, wagmiConfig, allowFail = true) {
890
+ async function hasCodeAtX(address, blockNumber, wagmiConfig) {
890
891
  const client = actions.getPublicClient(wagmiConfig);
891
892
  if (!client)
892
893
  throw new Error("Public client is missing");
893
- try {
894
- const code = await client.getCode({ address, blockNumber });
895
- return !!code && code !== "0x";
896
- }
897
- catch (err) {
898
- const isPruned = err instanceof viem.InvalidParamsRpcError &&
899
- typeof err.details === "string" &&
900
- err.details.toLowerCase().includes("block requested not found");
901
- if (allowFail && isPruned) {
902
- console.warn(`[deploymentBlock] RPC pruned state for block ${blockNumber} — allowFail = true → treating as no-code`);
903
- return false;
904
- }
905
- throw err;
906
- }
894
+ const code = await client.getCode({ address, blockNumber });
895
+ return !!code && code !== "0x";
907
896
  }
908
897
  /**
909
898
  * Internal helper: finds the earliest block where code exists at `address`,
@@ -916,17 +905,17 @@ async function hasCodeAtX(address, blockNumber, wagmiConfig, allowFail = true) {
916
905
  * @returns The first block number (bigint) where code is present.
917
906
  * @throws If no code exists at the latest block (i.e., contract not deployed).
918
907
  */
919
- async function findDeploymentBlockRpcX(address, wagmiConfig, floor = 0n, allowFail = true) {
908
+ async function findDeploymentBlockRpcX(address, wagmiConfig, floor = 0n) {
920
909
  const client = actions.getPublicClient(wagmiConfig);
921
910
  if (!client)
922
911
  throw new Error("Public client is missing");
923
912
  const latest = await client.getBlockNumber();
924
- if (!(await hasCodeAtX(address, latest, wagmiConfig, allowFail))) {
913
+ if (!(await hasCodeAtX(address, latest, wagmiConfig))) {
925
914
  const chainId = client.chain?.id ?? 0;
926
915
  throw new Error(`No code for ${address} at latest block ${latest} on chain ${chainId}.`);
927
916
  }
928
917
  // If caller-supplied floor already has code, it *is* the first code block.
929
- if (floor > 0n && (await hasCodeAtX(address, floor, wagmiConfig, allowFail)))
918
+ if (floor > 0n && (await hasCodeAtX(address, floor, wagmiConfig)))
930
919
  return floor;
931
920
  // Exponential descent to find a "no code" lower bound fast.
932
921
  let lo = floor; // known (or assumed) no code
@@ -934,7 +923,7 @@ async function findDeploymentBlockRpcX(address, wagmiConfig, floor = 0n, allowFa
934
923
  let step = 1n;
935
924
  while (hi - step > lo) {
936
925
  const probe = hi - step;
937
- if (await hasCodeAtX(address, probe, wagmiConfig, allowFail)) {
926
+ if (await hasCodeAtX(address, probe, wagmiConfig)) {
938
927
  hi = probe; // still has code -> move upper bound down
939
928
  step <<= 1n; // double the step
940
929
  }
@@ -946,7 +935,7 @@ async function findDeploymentBlockRpcX(address, wagmiConfig, floor = 0n, allowFa
946
935
  // Binary search to the first block with code in (lo, hi]
947
936
  while (lo + 1n < hi) {
948
937
  const mid = lo + (hi - lo) / 2n;
949
- if (await hasCodeAtX(address, mid, wagmiConfig, allowFail))
938
+ if (await hasCodeAtX(address, mid, wagmiConfig))
950
939
  hi = mid;
951
940
  else
952
941
  lo = mid;
@@ -995,7 +984,7 @@ function getDeploymentBlockQueryOptionsX(address, floor = 0n, wagmiConfig, optio
995
984
  return fromLS;
996
985
  }
997
986
  // Otherwise do the discovery via RPC
998
- const discovered = await findDeploymentBlockRpcX(address, wagmiConfig, floor, options?.allowFail);
987
+ const discovered = await findDeploymentBlockRpcX(address, wagmiConfig, floor);
999
988
  // Persist to localStorage for subsequent sessions
1000
989
  if (!disableLocalStorage) {
1001
990
  writeDeploymentBlockToLS(finalChainId, address, floor, discovered);
@@ -1063,7 +1052,9 @@ async function fetchDeploymentBlockX(address, floor = 0n, options, queryClient,
1063
1052
  }
1064
1053
  }
1065
1054
  return queryClient.fetchQuery({
1066
- ...getDeploymentBlockQueryOptionsX(address, floor, wagmiConfig, options),
1055
+ ...getDeploymentBlockQueryOptionsX(address, floor, wagmiConfig, {
1056
+ disableLocalStorage,
1057
+ }),
1067
1058
  // Ensure the final key includes a concrete chainId
1068
1059
  queryKey: key,
1069
1060
  // Reinstate metadata (in case your ensure/util merges)