@gitmyabi/biz 1.0.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.
@@ -0,0 +1,801 @@
1
+ import type { Address, PublicClient, WalletClient } from 'viem';
2
+ /**
3
+ * Biz.Call struct type
4
+ */
5
+ export type Biz_Call = {
6
+ target: `0x${string}`;
7
+ value: bigint;
8
+ data: `0x${string}`;
9
+ };
10
+ /**
11
+ * Biz.PackedUserOperation struct type
12
+ */
13
+ export type Biz_PackedUserOperation = {
14
+ sender: `0x${string}`;
15
+ nonce: bigint;
16
+ initCode: `0x${string}`;
17
+ callData: `0x${string}`;
18
+ accountGasLimits: `0x${string}`;
19
+ preVerificationGas: bigint;
20
+ gasFees: `0x${string}`;
21
+ paymasterAndData: `0x${string}`;
22
+ signature: `0x${string}`;
23
+ };
24
+ /**
25
+ * Biz_json ABI
26
+ *
27
+ * This ABI is typed using viem's type system for full type safety.
28
+ */
29
+ export declare const Biz_jsonAbi: readonly [{
30
+ readonly inputs: readonly [{
31
+ readonly internalType: "contract BizGuard";
32
+ readonly name: "_bizGuard";
33
+ readonly type: "address";
34
+ }];
35
+ readonly stateMutability: "nonpayable";
36
+ readonly type: "constructor";
37
+ }, {
38
+ readonly inputs: readonly [];
39
+ readonly name: "ECDSAInvalidSignature";
40
+ readonly type: "error";
41
+ }, {
42
+ readonly inputs: readonly [{
43
+ readonly internalType: "uint256";
44
+ readonly name: "length";
45
+ readonly type: "uint256";
46
+ }];
47
+ readonly name: "ECDSAInvalidSignatureLength";
48
+ readonly type: "error";
49
+ }, {
50
+ readonly inputs: readonly [{
51
+ readonly internalType: "bytes32";
52
+ readonly name: "s";
53
+ readonly type: "bytes32";
54
+ }];
55
+ readonly name: "ECDSAInvalidSignatureS";
56
+ readonly type: "error";
57
+ }, {
58
+ readonly inputs: readonly [];
59
+ readonly name: "ERC4337Disabled";
60
+ readonly type: "error";
61
+ }, {
62
+ readonly inputs: readonly [];
63
+ readonly name: "Invalid4337ExecutionSelector";
64
+ readonly type: "error";
65
+ }, {
66
+ readonly inputs: readonly [];
67
+ readonly name: "InvalidERC4337Flag";
68
+ readonly type: "error";
69
+ }, {
70
+ readonly inputs: readonly [];
71
+ readonly name: "InvalidSignature";
72
+ readonly type: "error";
73
+ }, {
74
+ readonly inputs: readonly [];
75
+ readonly name: "OnlyEntryPoint";
76
+ readonly type: "error";
77
+ }, {
78
+ readonly inputs: readonly [];
79
+ readonly name: "OnlySelf";
80
+ readonly type: "error";
81
+ }, {
82
+ readonly inputs: readonly [];
83
+ readonly name: "ZeroAddressGuard";
84
+ readonly type: "error";
85
+ }, {
86
+ readonly stateMutability: "payable";
87
+ readonly type: "fallback";
88
+ }, {
89
+ readonly inputs: readonly [];
90
+ readonly name: "accountId";
91
+ readonly outputs: readonly [{
92
+ readonly internalType: "string";
93
+ readonly name: "";
94
+ readonly type: "string";
95
+ }];
96
+ readonly stateMutability: "pure";
97
+ readonly type: "function";
98
+ }, {
99
+ readonly inputs: readonly [];
100
+ readonly name: "accountStorageBases";
101
+ readonly outputs: readonly [{
102
+ readonly internalType: "bytes32[]";
103
+ readonly name: "";
104
+ readonly type: "bytes32[]";
105
+ }];
106
+ readonly stateMutability: "view";
107
+ readonly type: "function";
108
+ }, {
109
+ readonly inputs: readonly [];
110
+ readonly name: "bizGuard";
111
+ readonly outputs: readonly [{
112
+ readonly internalType: "contract BizGuard";
113
+ readonly name: "";
114
+ readonly type: "address";
115
+ }];
116
+ readonly stateMutability: "view";
117
+ readonly type: "function";
118
+ }, {
119
+ readonly inputs: readonly [];
120
+ readonly name: "entryPoint";
121
+ readonly outputs: readonly [{
122
+ readonly internalType: "address";
123
+ readonly name: "";
124
+ readonly type: "address";
125
+ }];
126
+ readonly stateMutability: "view";
127
+ readonly type: "function";
128
+ }, {
129
+ readonly inputs: readonly [{
130
+ readonly internalType: "address";
131
+ readonly name: "target";
132
+ readonly type: "address";
133
+ }, {
134
+ readonly internalType: "uint256";
135
+ readonly name: "value";
136
+ readonly type: "uint256";
137
+ }, {
138
+ readonly internalType: "bytes";
139
+ readonly name: "data";
140
+ readonly type: "bytes";
141
+ }];
142
+ readonly name: "execute";
143
+ readonly outputs: readonly [];
144
+ readonly stateMutability: "payable";
145
+ readonly type: "function";
146
+ }, {
147
+ readonly inputs: readonly [{
148
+ readonly internalType: "address";
149
+ readonly name: "target";
150
+ readonly type: "address";
151
+ }, {
152
+ readonly internalType: "uint256";
153
+ readonly name: "value";
154
+ readonly type: "uint256";
155
+ }, {
156
+ readonly internalType: "bytes";
157
+ readonly name: "data";
158
+ readonly type: "bytes";
159
+ }];
160
+ readonly name: "execute4337Op";
161
+ readonly outputs: readonly [];
162
+ readonly stateMutability: "payable";
163
+ readonly type: "function";
164
+ }, {
165
+ readonly inputs: readonly [{
166
+ readonly components: readonly [{
167
+ readonly internalType: "address";
168
+ readonly name: "target";
169
+ readonly type: "address";
170
+ }, {
171
+ readonly internalType: "uint256";
172
+ readonly name: "value";
173
+ readonly type: "uint256";
174
+ }, {
175
+ readonly internalType: "bytes";
176
+ readonly name: "data";
177
+ readonly type: "bytes";
178
+ }];
179
+ readonly internalType: "struct Biz.Call[]";
180
+ readonly name: "calls";
181
+ readonly type: "tuple[]";
182
+ }];
183
+ readonly name: "execute4337Ops";
184
+ readonly outputs: readonly [];
185
+ readonly stateMutability: "payable";
186
+ readonly type: "function";
187
+ }, {
188
+ readonly inputs: readonly [{
189
+ readonly components: readonly [{
190
+ readonly internalType: "address";
191
+ readonly name: "target";
192
+ readonly type: "address";
193
+ }, {
194
+ readonly internalType: "uint256";
195
+ readonly name: "value";
196
+ readonly type: "uint256";
197
+ }, {
198
+ readonly internalType: "bytes";
199
+ readonly name: "data";
200
+ readonly type: "bytes";
201
+ }];
202
+ readonly internalType: "struct Biz.Call[]";
203
+ readonly name: "calls";
204
+ readonly type: "tuple[]";
205
+ }];
206
+ readonly name: "executeBatch";
207
+ readonly outputs: readonly [];
208
+ readonly stateMutability: "payable";
209
+ readonly type: "function";
210
+ }, {
211
+ readonly inputs: readonly [{
212
+ readonly components: readonly [{
213
+ readonly internalType: "address";
214
+ readonly name: "target";
215
+ readonly type: "address";
216
+ }, {
217
+ readonly internalType: "uint256";
218
+ readonly name: "value";
219
+ readonly type: "uint256";
220
+ }, {
221
+ readonly internalType: "bytes";
222
+ readonly name: "data";
223
+ readonly type: "bytes";
224
+ }];
225
+ readonly internalType: "struct Biz.Call[]";
226
+ readonly name: "calls";
227
+ readonly type: "tuple[]";
228
+ }, {
229
+ readonly internalType: "bytes";
230
+ readonly name: "signature";
231
+ readonly type: "bytes";
232
+ }];
233
+ readonly name: "executeWithSignature";
234
+ readonly outputs: readonly [];
235
+ readonly stateMutability: "payable";
236
+ readonly type: "function";
237
+ }, {
238
+ readonly inputs: readonly [{
239
+ readonly internalType: "bytes32";
240
+ readonly name: "hash";
241
+ readonly type: "bytes32";
242
+ }, {
243
+ readonly internalType: "bytes";
244
+ readonly name: "signature";
245
+ readonly type: "bytes";
246
+ }];
247
+ readonly name: "isValidSignature";
248
+ readonly outputs: readonly [{
249
+ readonly internalType: "bytes4";
250
+ readonly name: "isValid";
251
+ readonly type: "bytes4";
252
+ }];
253
+ readonly stateMutability: "view";
254
+ readonly type: "function";
255
+ }, {
256
+ readonly inputs: readonly [{
257
+ readonly internalType: "address";
258
+ readonly name: "";
259
+ readonly type: "address";
260
+ }, {
261
+ readonly internalType: "address";
262
+ readonly name: "";
263
+ readonly type: "address";
264
+ }, {
265
+ readonly internalType: "uint256[]";
266
+ readonly name: "";
267
+ readonly type: "uint256[]";
268
+ }, {
269
+ readonly internalType: "uint256[]";
270
+ readonly name: "";
271
+ readonly type: "uint256[]";
272
+ }, {
273
+ readonly internalType: "bytes";
274
+ readonly name: "";
275
+ readonly type: "bytes";
276
+ }];
277
+ readonly name: "onERC1155BatchReceived";
278
+ readonly outputs: readonly [{
279
+ readonly internalType: "bytes4";
280
+ readonly name: "";
281
+ readonly type: "bytes4";
282
+ }];
283
+ readonly stateMutability: "pure";
284
+ readonly type: "function";
285
+ }, {
286
+ readonly inputs: readonly [{
287
+ readonly internalType: "address";
288
+ readonly name: "";
289
+ readonly type: "address";
290
+ }, {
291
+ readonly internalType: "address";
292
+ readonly name: "";
293
+ readonly type: "address";
294
+ }, {
295
+ readonly internalType: "uint256";
296
+ readonly name: "";
297
+ readonly type: "uint256";
298
+ }, {
299
+ readonly internalType: "uint256";
300
+ readonly name: "";
301
+ readonly type: "uint256";
302
+ }, {
303
+ readonly internalType: "bytes";
304
+ readonly name: "";
305
+ readonly type: "bytes";
306
+ }];
307
+ readonly name: "onERC1155Received";
308
+ readonly outputs: readonly [{
309
+ readonly internalType: "bytes4";
310
+ readonly name: "";
311
+ readonly type: "bytes4";
312
+ }];
313
+ readonly stateMutability: "pure";
314
+ readonly type: "function";
315
+ }, {
316
+ readonly inputs: readonly [{
317
+ readonly internalType: "address";
318
+ readonly name: "";
319
+ readonly type: "address";
320
+ }, {
321
+ readonly internalType: "address";
322
+ readonly name: "";
323
+ readonly type: "address";
324
+ }, {
325
+ readonly internalType: "uint256";
326
+ readonly name: "";
327
+ readonly type: "uint256";
328
+ }, {
329
+ readonly internalType: "bytes";
330
+ readonly name: "";
331
+ readonly type: "bytes";
332
+ }];
333
+ readonly name: "onERC721Received";
334
+ readonly outputs: readonly [{
335
+ readonly internalType: "bytes4";
336
+ readonly name: "";
337
+ readonly type: "bytes4";
338
+ }];
339
+ readonly stateMutability: "pure";
340
+ readonly type: "function";
341
+ }, {
342
+ readonly inputs: readonly [{
343
+ readonly internalType: "address";
344
+ readonly name: "";
345
+ readonly type: "address";
346
+ }, {
347
+ readonly internalType: "uint256";
348
+ readonly name: "";
349
+ readonly type: "uint256";
350
+ }, {
351
+ readonly internalType: "bytes";
352
+ readonly name: "";
353
+ readonly type: "bytes";
354
+ }];
355
+ readonly name: "onTokenTransfer";
356
+ readonly outputs: readonly [{
357
+ readonly internalType: "bool";
358
+ readonly name: "";
359
+ readonly type: "bool";
360
+ }];
361
+ readonly stateMutability: "pure";
362
+ readonly type: "function";
363
+ }, {
364
+ readonly inputs: readonly [{
365
+ readonly internalType: "bytes4";
366
+ readonly name: "interfaceId";
367
+ readonly type: "bytes4";
368
+ }];
369
+ readonly name: "supportsInterface";
370
+ readonly outputs: readonly [{
371
+ readonly internalType: "bool";
372
+ readonly name: "";
373
+ readonly type: "bool";
374
+ }];
375
+ readonly stateMutability: "view";
376
+ readonly type: "function";
377
+ }, {
378
+ readonly inputs: readonly [{
379
+ readonly internalType: "address";
380
+ readonly name: "";
381
+ readonly type: "address";
382
+ }, {
383
+ readonly internalType: "address";
384
+ readonly name: "";
385
+ readonly type: "address";
386
+ }, {
387
+ readonly internalType: "address";
388
+ readonly name: "";
389
+ readonly type: "address";
390
+ }, {
391
+ readonly internalType: "uint256";
392
+ readonly name: "";
393
+ readonly type: "uint256";
394
+ }, {
395
+ readonly internalType: "bytes";
396
+ readonly name: "";
397
+ readonly type: "bytes";
398
+ }, {
399
+ readonly internalType: "bytes";
400
+ readonly name: "";
401
+ readonly type: "bytes";
402
+ }];
403
+ readonly name: "tokensReceived";
404
+ readonly outputs: readonly [];
405
+ readonly stateMutability: "pure";
406
+ readonly type: "function";
407
+ }, {
408
+ readonly inputs: readonly [{
409
+ readonly components: readonly [{
410
+ readonly internalType: "address";
411
+ readonly name: "sender";
412
+ readonly type: "address";
413
+ }, {
414
+ readonly internalType: "uint256";
415
+ readonly name: "nonce";
416
+ readonly type: "uint256";
417
+ }, {
418
+ readonly internalType: "bytes";
419
+ readonly name: "initCode";
420
+ readonly type: "bytes";
421
+ }, {
422
+ readonly internalType: "bytes";
423
+ readonly name: "callData";
424
+ readonly type: "bytes";
425
+ }, {
426
+ readonly internalType: "bytes32";
427
+ readonly name: "accountGasLimits";
428
+ readonly type: "bytes32";
429
+ }, {
430
+ readonly internalType: "uint256";
431
+ readonly name: "preVerificationGas";
432
+ readonly type: "uint256";
433
+ }, {
434
+ readonly internalType: "bytes32";
435
+ readonly name: "gasFees";
436
+ readonly type: "bytes32";
437
+ }, {
438
+ readonly internalType: "bytes";
439
+ readonly name: "paymasterAndData";
440
+ readonly type: "bytes";
441
+ }, {
442
+ readonly internalType: "bytes";
443
+ readonly name: "signature";
444
+ readonly type: "bytes";
445
+ }];
446
+ readonly internalType: "struct Biz.PackedUserOperation";
447
+ readonly name: "userOp";
448
+ readonly type: "tuple";
449
+ }, {
450
+ readonly internalType: "bytes32";
451
+ readonly name: "userOpHash";
452
+ readonly type: "bytes32";
453
+ }, {
454
+ readonly internalType: "uint256";
455
+ readonly name: "missingAccountFunds";
456
+ readonly type: "uint256";
457
+ }];
458
+ readonly name: "validateUserOp";
459
+ readonly outputs: readonly [{
460
+ readonly internalType: "uint256";
461
+ readonly name: "validationData";
462
+ readonly type: "uint256";
463
+ }];
464
+ readonly stateMutability: "nonpayable";
465
+ readonly type: "function";
466
+ }, {
467
+ readonly stateMutability: "payable";
468
+ readonly type: "receive";
469
+ }];
470
+ /**
471
+ * Type-safe ABI for Biz_json
472
+ */
473
+ export type Biz_jsonAbi = typeof Biz_jsonAbi;
474
+ /**
475
+ * Contract instance type for Biz_json
476
+ */
477
+ export type Biz_jsonContract = any;
478
+ /**
479
+ * Biz_json Contract Class
480
+ *
481
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
482
+ *
483
+ * @example
484
+ * ```typescript
485
+ * import { createPublicClient, createWalletClient, http } from 'viem';
486
+ * import { mainnet } from 'viem/chains';
487
+ * import { Biz_json } from 'Biz_json';
488
+ *
489
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
490
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
491
+ *
492
+ * const contract = new Biz_json('0x...', { publicClient, walletClient });
493
+ *
494
+ * // Read functions
495
+ * const result = await contract.balanceOf('0x...');
496
+ *
497
+ * // Write functions
498
+ * const hash = await contract.transfer('0x...', 1000n);
499
+ *
500
+ * // Simulate transactions (dry-run)
501
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
502
+ * console.log('Gas estimate:', simulation.request.gas);
503
+ *
504
+ * // Watch events
505
+ * const unwatch = contract.watch.Transfer((event) => {
506
+ * console.log('Transfer event:', event);
507
+ * });
508
+ * ```
509
+ */
510
+ export declare class Biz_json {
511
+ private contract;
512
+ private contractAddress;
513
+ private publicClient;
514
+ constructor(address: Address, clients: {
515
+ publicClient: PublicClient;
516
+ walletClient?: WalletClient;
517
+ });
518
+ /**
519
+ * Get the contract address
520
+ */
521
+ get address(): Address;
522
+ /**
523
+ * Get the underlying viem contract instance
524
+ */
525
+ getContract(): Biz_jsonContract;
526
+ /**
527
+ * accountId
528
+ * pure
529
+ */
530
+ accountId(): Promise<string>;
531
+ /**
532
+ * accountStorageBases
533
+ * view
534
+ */
535
+ accountStorageBases(): Promise<`0x${string}`[]>;
536
+ /**
537
+ * bizGuard
538
+ * view
539
+ */
540
+ bizGuard(): Promise<`0x${string}`>;
541
+ /**
542
+ * entryPoint
543
+ * view
544
+ */
545
+ entryPoint(): Promise<`0x${string}`>;
546
+ /**
547
+ * isValidSignature
548
+ * view
549
+ */
550
+ isValidSignature(hash: `0x${string}`, signature: `0x${string}`): Promise<`0x${string}`>;
551
+ /**
552
+ * onERC1155BatchReceived
553
+ * pure
554
+ */
555
+ onERC1155BatchReceived(arg0: `0x${string}`, arg1: `0x${string}`, arg2: bigint[], arg3: bigint[], arg4: `0x${string}`): Promise<`0x${string}`>;
556
+ /**
557
+ * onERC1155Received
558
+ * pure
559
+ */
560
+ onERC1155Received(arg0: `0x${string}`, arg1: `0x${string}`, arg2: bigint, arg3: bigint, arg4: `0x${string}`): Promise<`0x${string}`>;
561
+ /**
562
+ * onERC721Received
563
+ * pure
564
+ */
565
+ onERC721Received(arg0: `0x${string}`, arg1: `0x${string}`, arg2: bigint, arg3: `0x${string}`): Promise<`0x${string}`>;
566
+ /**
567
+ * onTokenTransfer
568
+ * pure
569
+ */
570
+ onTokenTransfer(arg0: `0x${string}`, arg1: bigint, arg2: `0x${string}`): Promise<boolean>;
571
+ /**
572
+ * supportsInterface
573
+ * view
574
+ */
575
+ supportsInterface(interfaceId: `0x${string}`): Promise<boolean>;
576
+ /**
577
+ * tokensReceived
578
+ * pure
579
+ */
580
+ tokensReceived(arg0: `0x${string}`, arg1: `0x${string}`, arg2: `0x${string}`, arg3: bigint, arg4: `0x${string}`, arg5: `0x${string}`): Promise<void>;
581
+ /**
582
+ * execute
583
+ * payable
584
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
585
+ */
586
+ execute(target: `0x${string}`, value: bigint, data: `0x${string}`, options?: {
587
+ accessList?: import('viem').AccessList;
588
+ authorizationList?: import('viem').AuthorizationList;
589
+ chain?: import('viem').Chain | null;
590
+ dataSuffix?: `0x${string}`;
591
+ gas?: bigint;
592
+ gasPrice?: bigint;
593
+ maxFeePerGas?: bigint;
594
+ maxPriorityFeePerGas?: bigint;
595
+ nonce?: number;
596
+ value?: bigint;
597
+ }): Promise<`0x${string}`>;
598
+ /**
599
+ * execute4337Op
600
+ * payable
601
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
602
+ */
603
+ execute4337Op(target: `0x${string}`, value: bigint, data: `0x${string}`, options?: {
604
+ accessList?: import('viem').AccessList;
605
+ authorizationList?: import('viem').AuthorizationList;
606
+ chain?: import('viem').Chain | null;
607
+ dataSuffix?: `0x${string}`;
608
+ gas?: bigint;
609
+ gasPrice?: bigint;
610
+ maxFeePerGas?: bigint;
611
+ maxPriorityFeePerGas?: bigint;
612
+ nonce?: number;
613
+ value?: bigint;
614
+ }): Promise<`0x${string}`>;
615
+ /**
616
+ * execute4337Ops
617
+ * payable
618
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
619
+ */
620
+ execute4337Ops(calls: Biz_Call[], options?: {
621
+ accessList?: import('viem').AccessList;
622
+ authorizationList?: import('viem').AuthorizationList;
623
+ chain?: import('viem').Chain | null;
624
+ dataSuffix?: `0x${string}`;
625
+ gas?: bigint;
626
+ gasPrice?: bigint;
627
+ maxFeePerGas?: bigint;
628
+ maxPriorityFeePerGas?: bigint;
629
+ nonce?: number;
630
+ value?: bigint;
631
+ }): Promise<`0x${string}`>;
632
+ /**
633
+ * executeBatch
634
+ * payable
635
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
636
+ */
637
+ executeBatch(calls: Biz_Call[], options?: {
638
+ accessList?: import('viem').AccessList;
639
+ authorizationList?: import('viem').AuthorizationList;
640
+ chain?: import('viem').Chain | null;
641
+ dataSuffix?: `0x${string}`;
642
+ gas?: bigint;
643
+ gasPrice?: bigint;
644
+ maxFeePerGas?: bigint;
645
+ maxPriorityFeePerGas?: bigint;
646
+ nonce?: number;
647
+ value?: bigint;
648
+ }): Promise<`0x${string}`>;
649
+ /**
650
+ * executeWithSignature
651
+ * payable
652
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
653
+ */
654
+ executeWithSignature(calls: Biz_Call[], signature: `0x${string}`, options?: {
655
+ accessList?: import('viem').AccessList;
656
+ authorizationList?: import('viem').AuthorizationList;
657
+ chain?: import('viem').Chain | null;
658
+ dataSuffix?: `0x${string}`;
659
+ gas?: bigint;
660
+ gasPrice?: bigint;
661
+ maxFeePerGas?: bigint;
662
+ maxPriorityFeePerGas?: bigint;
663
+ nonce?: number;
664
+ value?: bigint;
665
+ }): Promise<`0x${string}`>;
666
+ /**
667
+ * validateUserOp
668
+ * nonpayable
669
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
670
+ */
671
+ validateUserOp(userOp: Biz_PackedUserOperation, userOpHash: `0x${string}`, missingAccountFunds: bigint, options?: {
672
+ accessList?: import('viem').AccessList;
673
+ authorizationList?: import('viem').AuthorizationList;
674
+ chain?: import('viem').Chain | null;
675
+ dataSuffix?: `0x${string}`;
676
+ gas?: bigint;
677
+ gasPrice?: bigint;
678
+ maxFeePerGas?: bigint;
679
+ maxPriorityFeePerGas?: bigint;
680
+ nonce?: number;
681
+ value?: bigint;
682
+ }): Promise<`0x${string}`>;
683
+ /**
684
+ * Simulate contract write operations (dry-run without sending transaction)
685
+ *
686
+ * @example
687
+ * const result = await contract.simulate.transfer('0x...', 1000n);
688
+ * console.log('Gas estimate:', result.request.gas);
689
+ * console.log('Would succeed:', result.result);
690
+ */
691
+ get simulate(): {
692
+ /**
693
+ * Simulate execute
694
+ * Returns gas estimate and result without sending transaction
695
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
696
+ */
697
+ execute(target: `0x${string}`, value: bigint, data: `0x${string}`, options?: {
698
+ accessList?: import("viem").AccessList;
699
+ authorizationList?: import("viem").AuthorizationList;
700
+ chain?: import("viem").Chain | null;
701
+ dataSuffix?: `0x${string}`;
702
+ gas?: bigint;
703
+ gasPrice?: bigint;
704
+ maxFeePerGas?: bigint;
705
+ maxPriorityFeePerGas?: bigint;
706
+ nonce?: number;
707
+ value?: bigint;
708
+ }): Promise<void>;
709
+ /**
710
+ * Simulate execute4337Op
711
+ * Returns gas estimate and result without sending transaction
712
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
713
+ */
714
+ execute4337Op(target: `0x${string}`, value: bigint, data: `0x${string}`, options?: {
715
+ accessList?: import("viem").AccessList;
716
+ authorizationList?: import("viem").AuthorizationList;
717
+ chain?: import("viem").Chain | null;
718
+ dataSuffix?: `0x${string}`;
719
+ gas?: bigint;
720
+ gasPrice?: bigint;
721
+ maxFeePerGas?: bigint;
722
+ maxPriorityFeePerGas?: bigint;
723
+ nonce?: number;
724
+ value?: bigint;
725
+ }): Promise<void>;
726
+ /**
727
+ * Simulate execute4337Ops
728
+ * Returns gas estimate and result without sending transaction
729
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
730
+ */
731
+ execute4337Ops(calls: Biz_Call[], options?: {
732
+ accessList?: import("viem").AccessList;
733
+ authorizationList?: import("viem").AuthorizationList;
734
+ chain?: import("viem").Chain | null;
735
+ dataSuffix?: `0x${string}`;
736
+ gas?: bigint;
737
+ gasPrice?: bigint;
738
+ maxFeePerGas?: bigint;
739
+ maxPriorityFeePerGas?: bigint;
740
+ nonce?: number;
741
+ value?: bigint;
742
+ }): Promise<void>;
743
+ /**
744
+ * Simulate executeBatch
745
+ * Returns gas estimate and result without sending transaction
746
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
747
+ */
748
+ executeBatch(calls: Biz_Call[], options?: {
749
+ accessList?: import("viem").AccessList;
750
+ authorizationList?: import("viem").AuthorizationList;
751
+ chain?: import("viem").Chain | null;
752
+ dataSuffix?: `0x${string}`;
753
+ gas?: bigint;
754
+ gasPrice?: bigint;
755
+ maxFeePerGas?: bigint;
756
+ maxPriorityFeePerGas?: bigint;
757
+ nonce?: number;
758
+ value?: bigint;
759
+ }): Promise<void>;
760
+ /**
761
+ * Simulate executeWithSignature
762
+ * Returns gas estimate and result without sending transaction
763
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
764
+ */
765
+ executeWithSignature(calls: Biz_Call[], signature: `0x${string}`, options?: {
766
+ accessList?: import("viem").AccessList;
767
+ authorizationList?: import("viem").AuthorizationList;
768
+ chain?: import("viem").Chain | null;
769
+ dataSuffix?: `0x${string}`;
770
+ gas?: bigint;
771
+ gasPrice?: bigint;
772
+ maxFeePerGas?: bigint;
773
+ maxPriorityFeePerGas?: bigint;
774
+ nonce?: number;
775
+ value?: bigint;
776
+ }): Promise<void>;
777
+ /**
778
+ * Simulate validateUserOp
779
+ * Returns gas estimate and result without sending transaction
780
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
781
+ */
782
+ validateUserOp(userOp: Biz_PackedUserOperation, userOpHash: `0x${string}`, missingAccountFunds: bigint, options?: {
783
+ accessList?: import("viem").AccessList;
784
+ authorizationList?: import("viem").AuthorizationList;
785
+ chain?: import("viem").Chain | null;
786
+ dataSuffix?: `0x${string}`;
787
+ gas?: bigint;
788
+ gasPrice?: bigint;
789
+ maxFeePerGas?: bigint;
790
+ maxPriorityFeePerGas?: bigint;
791
+ nonce?: number;
792
+ value?: bigint;
793
+ }): Promise<bigint>;
794
+ };
795
+ /**
796
+ * Watch contract events
797
+ *
798
+ * Note: This contract has no events, so watch returns an empty object.
799
+ */
800
+ get watch(): {};
801
+ }