@gitmyabi/kernel 1.0.17 → 1.0.18

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,1112 +0,0 @@
1
- import type { Address, PublicClient, WalletClient } from 'viem';
2
- /**
3
- * Call struct type
4
- */
5
- export type Call = {
6
- to: `0x${string}`;
7
- value: bigint;
8
- data: `0x${string}`;
9
- };
10
- /**
11
- * ExecutionDetail struct type
12
- */
13
- export type ExecutionDetail = {
14
- validAfter: bigint;
15
- validUntil: bigint;
16
- executor: `0x${string}`;
17
- validator: `0x${string}`;
18
- };
19
- /**
20
- * UserOperation struct type
21
- */
22
- export type UserOperation = {
23
- sender: `0x${string}`;
24
- nonce: bigint;
25
- initCode: `0x${string}`;
26
- callData: `0x${string}`;
27
- callGasLimit: bigint;
28
- verificationGasLimit: bigint;
29
- preVerificationGas: bigint;
30
- maxFeePerGas: bigint;
31
- maxPriorityFeePerGas: bigint;
32
- paymasterAndData: `0x${string}`;
33
- signature: `0x${string}`;
34
- };
35
- /**
36
- * Kernel_json ABI
37
- *
38
- * This ABI is typed using viem's type system for full type safety.
39
- */
40
- export declare const Kernel_jsonAbi: readonly [{
41
- readonly inputs: readonly [{
42
- readonly internalType: "contract IEntryPoint";
43
- readonly name: "_entryPoint";
44
- readonly type: "address";
45
- }];
46
- readonly stateMutability: "nonpayable";
47
- readonly type: "constructor";
48
- }, {
49
- readonly inputs: readonly [];
50
- readonly name: "AlreadyInitialized";
51
- readonly type: "error";
52
- }, {
53
- readonly inputs: readonly [];
54
- readonly name: "DeprecatedOperation";
55
- readonly type: "error";
56
- }, {
57
- readonly inputs: readonly [];
58
- readonly name: "DisabledMode";
59
- readonly type: "error";
60
- }, {
61
- readonly inputs: readonly [];
62
- readonly name: "NotAuthorizedCaller";
63
- readonly type: "error";
64
- }, {
65
- readonly inputs: readonly [];
66
- readonly name: "NotEntryPoint";
67
- readonly type: "error";
68
- }, {
69
- readonly anonymous: false;
70
- readonly inputs: readonly [{
71
- readonly indexed: true;
72
- readonly internalType: "address";
73
- readonly name: "oldValidator";
74
- readonly type: "address";
75
- }, {
76
- readonly indexed: true;
77
- readonly internalType: "address";
78
- readonly name: "newValidator";
79
- readonly type: "address";
80
- }];
81
- readonly name: "DefaultValidatorChanged";
82
- readonly type: "event";
83
- }, {
84
- readonly anonymous: false;
85
- readonly inputs: readonly [{
86
- readonly indexed: true;
87
- readonly internalType: "bytes4";
88
- readonly name: "selector";
89
- readonly type: "bytes4";
90
- }, {
91
- readonly indexed: true;
92
- readonly internalType: "address";
93
- readonly name: "executor";
94
- readonly type: "address";
95
- }, {
96
- readonly indexed: true;
97
- readonly internalType: "address";
98
- readonly name: "validator";
99
- readonly type: "address";
100
- }];
101
- readonly name: "ExecutionChanged";
102
- readonly type: "event";
103
- }, {
104
- readonly anonymous: false;
105
- readonly inputs: readonly [{
106
- readonly indexed: false;
107
- readonly internalType: "address";
108
- readonly name: "sender";
109
- readonly type: "address";
110
- }, {
111
- readonly indexed: false;
112
- readonly internalType: "uint256";
113
- readonly name: "amount";
114
- readonly type: "uint256";
115
- }];
116
- readonly name: "Received";
117
- readonly type: "event";
118
- }, {
119
- readonly anonymous: false;
120
- readonly inputs: readonly [{
121
- readonly indexed: true;
122
- readonly internalType: "address";
123
- readonly name: "newImplementation";
124
- readonly type: "address";
125
- }];
126
- readonly name: "Upgraded";
127
- readonly type: "event";
128
- }, {
129
- readonly stateMutability: "payable";
130
- readonly type: "fallback";
131
- }, {
132
- readonly inputs: readonly [{
133
- readonly internalType: "bytes4";
134
- readonly name: "_disableFlag";
135
- readonly type: "bytes4";
136
- }];
137
- readonly name: "disableMode";
138
- readonly outputs: readonly [];
139
- readonly stateMutability: "payable";
140
- readonly type: "function";
141
- }, {
142
- readonly inputs: readonly [];
143
- readonly name: "eip712Domain";
144
- readonly outputs: readonly [{
145
- readonly internalType: "bytes1";
146
- readonly name: "fields";
147
- readonly type: "bytes1";
148
- }, {
149
- readonly internalType: "string";
150
- readonly name: "name";
151
- readonly type: "string";
152
- }, {
153
- readonly internalType: "string";
154
- readonly name: "version";
155
- readonly type: "string";
156
- }, {
157
- readonly internalType: "uint256";
158
- readonly name: "chainId";
159
- readonly type: "uint256";
160
- }, {
161
- readonly internalType: "address";
162
- readonly name: "verifyingContract";
163
- readonly type: "address";
164
- }, {
165
- readonly internalType: "bytes32";
166
- readonly name: "salt";
167
- readonly type: "bytes32";
168
- }, {
169
- readonly internalType: "uint256[]";
170
- readonly name: "extensions";
171
- readonly type: "uint256[]";
172
- }];
173
- readonly stateMutability: "view";
174
- readonly type: "function";
175
- }, {
176
- readonly inputs: readonly [];
177
- readonly name: "entryPoint";
178
- readonly outputs: readonly [{
179
- readonly internalType: "contract IEntryPoint";
180
- readonly name: "";
181
- readonly type: "address";
182
- }];
183
- readonly stateMutability: "view";
184
- readonly type: "function";
185
- }, {
186
- readonly inputs: readonly [{
187
- readonly internalType: "address";
188
- readonly name: "to";
189
- readonly type: "address";
190
- }, {
191
- readonly internalType: "uint256";
192
- readonly name: "value";
193
- readonly type: "uint256";
194
- }, {
195
- readonly internalType: "bytes";
196
- readonly name: "data";
197
- readonly type: "bytes";
198
- }, {
199
- readonly internalType: "enum Operation";
200
- readonly name: "_operation";
201
- readonly type: "uint8";
202
- }];
203
- readonly name: "execute";
204
- readonly outputs: readonly [];
205
- readonly stateMutability: "payable";
206
- readonly type: "function";
207
- }, {
208
- readonly inputs: readonly [{
209
- readonly components: readonly [{
210
- readonly internalType: "address";
211
- readonly name: "to";
212
- readonly type: "address";
213
- }, {
214
- readonly internalType: "uint256";
215
- readonly name: "value";
216
- readonly type: "uint256";
217
- }, {
218
- readonly internalType: "bytes";
219
- readonly name: "data";
220
- readonly type: "bytes";
221
- }];
222
- readonly internalType: "struct Call[]";
223
- readonly name: "calls";
224
- readonly type: "tuple[]";
225
- }];
226
- readonly name: "executeBatch";
227
- readonly outputs: readonly [];
228
- readonly stateMutability: "payable";
229
- readonly type: "function";
230
- }, {
231
- readonly inputs: readonly [{
232
- readonly internalType: "address";
233
- readonly name: "to";
234
- readonly type: "address";
235
- }, {
236
- readonly internalType: "bytes";
237
- readonly name: "data";
238
- readonly type: "bytes";
239
- }];
240
- readonly name: "executeDelegateCall";
241
- readonly outputs: readonly [];
242
- readonly stateMutability: "payable";
243
- readonly type: "function";
244
- }, {
245
- readonly inputs: readonly [];
246
- readonly name: "getDefaultValidator";
247
- readonly outputs: readonly [{
248
- readonly internalType: "contract IKernelValidator";
249
- readonly name: "validator";
250
- readonly type: "address";
251
- }];
252
- readonly stateMutability: "view";
253
- readonly type: "function";
254
- }, {
255
- readonly inputs: readonly [];
256
- readonly name: "getDisabledMode";
257
- readonly outputs: readonly [{
258
- readonly internalType: "bytes4";
259
- readonly name: "disabled";
260
- readonly type: "bytes4";
261
- }];
262
- readonly stateMutability: "view";
263
- readonly type: "function";
264
- }, {
265
- readonly inputs: readonly [{
266
- readonly internalType: "bytes4";
267
- readonly name: "_selector";
268
- readonly type: "bytes4";
269
- }];
270
- readonly name: "getExecution";
271
- readonly outputs: readonly [{
272
- readonly components: readonly [{
273
- readonly internalType: "ValidAfter";
274
- readonly name: "validAfter";
275
- readonly type: "uint48";
276
- }, {
277
- readonly internalType: "ValidUntil";
278
- readonly name: "validUntil";
279
- readonly type: "uint48";
280
- }, {
281
- readonly internalType: "address";
282
- readonly name: "executor";
283
- readonly type: "address";
284
- }, {
285
- readonly internalType: "contract IKernelValidator";
286
- readonly name: "validator";
287
- readonly type: "address";
288
- }];
289
- readonly internalType: "struct ExecutionDetail";
290
- readonly name: "";
291
- readonly type: "tuple";
292
- }];
293
- readonly stateMutability: "view";
294
- readonly type: "function";
295
- }, {
296
- readonly inputs: readonly [];
297
- readonly name: "getLastDisabledTime";
298
- readonly outputs: readonly [{
299
- readonly internalType: "uint48";
300
- readonly name: "";
301
- readonly type: "uint48";
302
- }];
303
- readonly stateMutability: "view";
304
- readonly type: "function";
305
- }, {
306
- readonly inputs: readonly [{
307
- readonly internalType: "uint192";
308
- readonly name: "key";
309
- readonly type: "uint192";
310
- }];
311
- readonly name: "getNonce";
312
- readonly outputs: readonly [{
313
- readonly internalType: "uint256";
314
- readonly name: "";
315
- readonly type: "uint256";
316
- }];
317
- readonly stateMutability: "view";
318
- readonly type: "function";
319
- }, {
320
- readonly inputs: readonly [];
321
- readonly name: "getNonce";
322
- readonly outputs: readonly [{
323
- readonly internalType: "uint256";
324
- readonly name: "";
325
- readonly type: "uint256";
326
- }];
327
- readonly stateMutability: "view";
328
- readonly type: "function";
329
- }, {
330
- readonly inputs: readonly [{
331
- readonly internalType: "contract IKernelValidator";
332
- readonly name: "_defaultValidator";
333
- readonly type: "address";
334
- }, {
335
- readonly internalType: "bytes";
336
- readonly name: "_data";
337
- readonly type: "bytes";
338
- }];
339
- readonly name: "initialize";
340
- readonly outputs: readonly [];
341
- readonly stateMutability: "payable";
342
- readonly type: "function";
343
- }, {
344
- readonly inputs: readonly [{
345
- readonly internalType: "bytes32";
346
- readonly name: "hash";
347
- readonly type: "bytes32";
348
- }, {
349
- readonly internalType: "bytes";
350
- readonly name: "signature";
351
- readonly type: "bytes";
352
- }];
353
- readonly name: "isValidSignature";
354
- readonly outputs: readonly [{
355
- readonly internalType: "bytes4";
356
- readonly name: "";
357
- readonly type: "bytes4";
358
- }];
359
- readonly stateMutability: "view";
360
- readonly type: "function";
361
- }, {
362
- readonly inputs: readonly [];
363
- readonly name: "name";
364
- readonly outputs: readonly [{
365
- readonly internalType: "string";
366
- readonly name: "";
367
- readonly type: "string";
368
- }];
369
- readonly stateMutability: "view";
370
- readonly type: "function";
371
- }, {
372
- readonly inputs: readonly [{
373
- readonly internalType: "address";
374
- readonly name: "";
375
- readonly type: "address";
376
- }, {
377
- readonly internalType: "address";
378
- readonly name: "";
379
- readonly type: "address";
380
- }, {
381
- readonly internalType: "uint256[]";
382
- readonly name: "";
383
- readonly type: "uint256[]";
384
- }, {
385
- readonly internalType: "uint256[]";
386
- readonly name: "";
387
- readonly type: "uint256[]";
388
- }, {
389
- readonly internalType: "bytes";
390
- readonly name: "";
391
- readonly type: "bytes";
392
- }];
393
- readonly name: "onERC1155BatchReceived";
394
- readonly outputs: readonly [{
395
- readonly internalType: "bytes4";
396
- readonly name: "";
397
- readonly type: "bytes4";
398
- }];
399
- readonly stateMutability: "pure";
400
- readonly type: "function";
401
- }, {
402
- readonly inputs: readonly [{
403
- readonly internalType: "address";
404
- readonly name: "";
405
- readonly type: "address";
406
- }, {
407
- readonly internalType: "address";
408
- readonly name: "";
409
- readonly type: "address";
410
- }, {
411
- readonly internalType: "uint256";
412
- readonly name: "";
413
- readonly type: "uint256";
414
- }, {
415
- readonly internalType: "uint256";
416
- readonly name: "";
417
- readonly type: "uint256";
418
- }, {
419
- readonly internalType: "bytes";
420
- readonly name: "";
421
- readonly type: "bytes";
422
- }];
423
- readonly name: "onERC1155Received";
424
- readonly outputs: readonly [{
425
- readonly internalType: "bytes4";
426
- readonly name: "";
427
- readonly type: "bytes4";
428
- }];
429
- readonly stateMutability: "pure";
430
- readonly type: "function";
431
- }, {
432
- readonly inputs: readonly [{
433
- readonly internalType: "address";
434
- readonly name: "";
435
- readonly type: "address";
436
- }, {
437
- readonly internalType: "address";
438
- readonly name: "";
439
- readonly type: "address";
440
- }, {
441
- readonly internalType: "uint256";
442
- readonly name: "";
443
- readonly type: "uint256";
444
- }, {
445
- readonly internalType: "bytes";
446
- readonly name: "";
447
- readonly type: "bytes";
448
- }];
449
- readonly name: "onERC721Received";
450
- readonly outputs: readonly [{
451
- readonly internalType: "bytes4";
452
- readonly name: "";
453
- readonly type: "bytes4";
454
- }];
455
- readonly stateMutability: "pure";
456
- readonly type: "function";
457
- }, {
458
- readonly inputs: readonly [{
459
- readonly internalType: "contract IKernelValidator";
460
- readonly name: "_defaultValidator";
461
- readonly type: "address";
462
- }, {
463
- readonly internalType: "bytes";
464
- readonly name: "_data";
465
- readonly type: "bytes";
466
- }];
467
- readonly name: "setDefaultValidator";
468
- readonly outputs: readonly [];
469
- readonly stateMutability: "payable";
470
- readonly type: "function";
471
- }, {
472
- readonly inputs: readonly [{
473
- readonly internalType: "bytes4";
474
- readonly name: "_selector";
475
- readonly type: "bytes4";
476
- }, {
477
- readonly internalType: "address";
478
- readonly name: "_executor";
479
- readonly type: "address";
480
- }, {
481
- readonly internalType: "contract IKernelValidator";
482
- readonly name: "_validator";
483
- readonly type: "address";
484
- }, {
485
- readonly internalType: "ValidUntil";
486
- readonly name: "_validUntil";
487
- readonly type: "uint48";
488
- }, {
489
- readonly internalType: "ValidAfter";
490
- readonly name: "_validAfter";
491
- readonly type: "uint48";
492
- }, {
493
- readonly internalType: "bytes";
494
- readonly name: "_enableData";
495
- readonly type: "bytes";
496
- }];
497
- readonly name: "setExecution";
498
- readonly outputs: readonly [];
499
- readonly stateMutability: "payable";
500
- readonly type: "function";
501
- }, {
502
- readonly inputs: readonly [{
503
- readonly internalType: "address";
504
- readonly name: "_newImplementation";
505
- readonly type: "address";
506
- }];
507
- readonly name: "upgradeTo";
508
- readonly outputs: readonly [];
509
- readonly stateMutability: "payable";
510
- readonly type: "function";
511
- }, {
512
- readonly inputs: readonly [{
513
- readonly internalType: "bytes32";
514
- readonly name: "hash";
515
- readonly type: "bytes32";
516
- }, {
517
- readonly internalType: "bytes";
518
- readonly name: "signature";
519
- readonly type: "bytes";
520
- }];
521
- readonly name: "validateSignature";
522
- readonly outputs: readonly [{
523
- readonly internalType: "ValidationData";
524
- readonly name: "";
525
- readonly type: "uint256";
526
- }];
527
- readonly stateMutability: "view";
528
- readonly type: "function";
529
- }, {
530
- readonly inputs: readonly [{
531
- readonly components: readonly [{
532
- readonly internalType: "address";
533
- readonly name: "sender";
534
- readonly type: "address";
535
- }, {
536
- readonly internalType: "uint256";
537
- readonly name: "nonce";
538
- readonly type: "uint256";
539
- }, {
540
- readonly internalType: "bytes";
541
- readonly name: "initCode";
542
- readonly type: "bytes";
543
- }, {
544
- readonly internalType: "bytes";
545
- readonly name: "callData";
546
- readonly type: "bytes";
547
- }, {
548
- readonly internalType: "uint256";
549
- readonly name: "callGasLimit";
550
- readonly type: "uint256";
551
- }, {
552
- readonly internalType: "uint256";
553
- readonly name: "verificationGasLimit";
554
- readonly type: "uint256";
555
- }, {
556
- readonly internalType: "uint256";
557
- readonly name: "preVerificationGas";
558
- readonly type: "uint256";
559
- }, {
560
- readonly internalType: "uint256";
561
- readonly name: "maxFeePerGas";
562
- readonly type: "uint256";
563
- }, {
564
- readonly internalType: "uint256";
565
- readonly name: "maxPriorityFeePerGas";
566
- readonly type: "uint256";
567
- }, {
568
- readonly internalType: "bytes";
569
- readonly name: "paymasterAndData";
570
- readonly type: "bytes";
571
- }, {
572
- readonly internalType: "bytes";
573
- readonly name: "signature";
574
- readonly type: "bytes";
575
- }];
576
- readonly internalType: "struct UserOperation";
577
- readonly name: "_userOp";
578
- readonly type: "tuple";
579
- }, {
580
- readonly internalType: "bytes32";
581
- readonly name: "userOpHash";
582
- readonly type: "bytes32";
583
- }, {
584
- readonly internalType: "uint256";
585
- readonly name: "missingAccountFunds";
586
- readonly type: "uint256";
587
- }];
588
- readonly name: "validateUserOp";
589
- readonly outputs: readonly [{
590
- readonly internalType: "ValidationData";
591
- readonly name: "validationData";
592
- readonly type: "uint256";
593
- }];
594
- readonly stateMutability: "payable";
595
- readonly type: "function";
596
- }, {
597
- readonly inputs: readonly [];
598
- readonly name: "version";
599
- readonly outputs: readonly [{
600
- readonly internalType: "string";
601
- readonly name: "";
602
- readonly type: "string";
603
- }];
604
- readonly stateMutability: "view";
605
- readonly type: "function";
606
- }, {
607
- readonly stateMutability: "payable";
608
- readonly type: "receive";
609
- }];
610
- /**
611
- * Type-safe ABI for Kernel_json
612
- */
613
- export type Kernel_jsonAbi = typeof Kernel_jsonAbi;
614
- /**
615
- * Contract instance type for Kernel_json
616
- */
617
- export type Kernel_jsonContract = any;
618
- /**
619
- * Kernel_json Contract Class
620
- *
621
- * Provides a class-based API similar to TypeChain for interacting with the contract.
622
- *
623
- * @example
624
- * ```typescript
625
- * import { createPublicClient, createWalletClient, http } from 'viem';
626
- * import { mainnet } from 'viem/chains';
627
- * import { Kernel_json } from 'Kernel_json';
628
- *
629
- * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
630
- * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
631
- *
632
- * const contract = new Kernel_json('0x...', { publicClient, walletClient });
633
- *
634
- * // Read functions
635
- * const result = await contract.balanceOf('0x...');
636
- *
637
- * // Write functions
638
- * const hash = await contract.transfer('0x...', 1000n);
639
- *
640
- * // Simulate transactions (dry-run)
641
- * const simulation = await contract.simulate.transfer('0x...', 1000n);
642
- * console.log('Gas estimate:', simulation.request.gas);
643
- *
644
- * // Watch events
645
- * const unwatch = contract.watch.Transfer((event) => {
646
- * console.log('Transfer event:', event);
647
- * });
648
- * ```
649
- */
650
- export declare class Kernel_json {
651
- private contract;
652
- private contractAddress;
653
- private publicClient;
654
- constructor(address: Address, clients: {
655
- publicClient: PublicClient;
656
- walletClient?: WalletClient;
657
- });
658
- /**
659
- * Get the contract address
660
- */
661
- get address(): Address;
662
- /**
663
- * Get the underlying viem contract instance
664
- */
665
- getContract(): Kernel_jsonContract;
666
- /**
667
- * eip712Domain
668
- * view
669
- */
670
- eip712Domain(): Promise<[`0x${string}`, string, string, bigint, `0x${string}`, `0x${string}`, bigint[]]>;
671
- /**
672
- * entryPoint
673
- * view
674
- */
675
- entryPoint(): Promise<`0x${string}`>;
676
- /**
677
- * getDefaultValidator
678
- * view
679
- */
680
- getDefaultValidator(): Promise<`0x${string}`>;
681
- /**
682
- * getDisabledMode
683
- * view
684
- */
685
- getDisabledMode(): Promise<`0x${string}`>;
686
- /**
687
- * getExecution
688
- * view
689
- */
690
- getExecution(_selector: `0x${string}`): Promise<ExecutionDetail>;
691
- /**
692
- * getLastDisabledTime
693
- * view
694
- */
695
- getLastDisabledTime(): Promise<bigint>;
696
- getNonce(key: bigint): Promise<bigint>;
697
- getNonce(): Promise<bigint>;
698
- /**
699
- * isValidSignature
700
- * view
701
- */
702
- isValidSignature(hash: `0x${string}`, signature: `0x${string}`): Promise<`0x${string}`>;
703
- /**
704
- * name
705
- * view
706
- */
707
- name(): Promise<string>;
708
- /**
709
- * onERC1155BatchReceived
710
- * pure
711
- */
712
- onERC1155BatchReceived(arg0: `0x${string}`, arg1: `0x${string}`, arg2: bigint[], arg3: bigint[], arg4: `0x${string}`): Promise<`0x${string}`>;
713
- /**
714
- * onERC1155Received
715
- * pure
716
- */
717
- onERC1155Received(arg0: `0x${string}`, arg1: `0x${string}`, arg2: bigint, arg3: bigint, arg4: `0x${string}`): Promise<`0x${string}`>;
718
- /**
719
- * onERC721Received
720
- * pure
721
- */
722
- onERC721Received(arg0: `0x${string}`, arg1: `0x${string}`, arg2: bigint, arg3: `0x${string}`): Promise<`0x${string}`>;
723
- /**
724
- * validateSignature
725
- * view
726
- */
727
- validateSignature(hash: `0x${string}`, signature: `0x${string}`): Promise<bigint>;
728
- /**
729
- * version
730
- * view
731
- */
732
- version(): Promise<string>;
733
- /**
734
- * disableMode
735
- * payable
736
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
737
- */
738
- disableMode(_disableFlag: `0x${string}`, options?: {
739
- accessList?: import('viem').AccessList;
740
- authorizationList?: import('viem').AuthorizationList;
741
- chain?: import('viem').Chain | null;
742
- dataSuffix?: `0x${string}`;
743
- gas?: bigint;
744
- gasPrice?: bigint;
745
- maxFeePerGas?: bigint;
746
- maxPriorityFeePerGas?: bigint;
747
- nonce?: number;
748
- value?: bigint;
749
- }): Promise<`0x${string}`>;
750
- /**
751
- * execute
752
- * payable
753
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
754
- */
755
- execute(to: `0x${string}`, value: bigint, data: `0x${string}`, _operation: bigint, options?: {
756
- accessList?: import('viem').AccessList;
757
- authorizationList?: import('viem').AuthorizationList;
758
- chain?: import('viem').Chain | null;
759
- dataSuffix?: `0x${string}`;
760
- gas?: bigint;
761
- gasPrice?: bigint;
762
- maxFeePerGas?: bigint;
763
- maxPriorityFeePerGas?: bigint;
764
- nonce?: number;
765
- value?: bigint;
766
- }): Promise<`0x${string}`>;
767
- /**
768
- * executeBatch
769
- * payable
770
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
771
- */
772
- executeBatch(calls: Call[], options?: {
773
- accessList?: import('viem').AccessList;
774
- authorizationList?: import('viem').AuthorizationList;
775
- chain?: import('viem').Chain | null;
776
- dataSuffix?: `0x${string}`;
777
- gas?: bigint;
778
- gasPrice?: bigint;
779
- maxFeePerGas?: bigint;
780
- maxPriorityFeePerGas?: bigint;
781
- nonce?: number;
782
- value?: bigint;
783
- }): Promise<`0x${string}`>;
784
- /**
785
- * executeDelegateCall
786
- * payable
787
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
788
- */
789
- executeDelegateCall(to: `0x${string}`, data: `0x${string}`, options?: {
790
- accessList?: import('viem').AccessList;
791
- authorizationList?: import('viem').AuthorizationList;
792
- chain?: import('viem').Chain | null;
793
- dataSuffix?: `0x${string}`;
794
- gas?: bigint;
795
- gasPrice?: bigint;
796
- maxFeePerGas?: bigint;
797
- maxPriorityFeePerGas?: bigint;
798
- nonce?: number;
799
- value?: bigint;
800
- }): Promise<`0x${string}`>;
801
- /**
802
- * initialize
803
- * payable
804
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
805
- */
806
- initialize(_defaultValidator: `0x${string}`, _data: `0x${string}`, options?: {
807
- accessList?: import('viem').AccessList;
808
- authorizationList?: import('viem').AuthorizationList;
809
- chain?: import('viem').Chain | null;
810
- dataSuffix?: `0x${string}`;
811
- gas?: bigint;
812
- gasPrice?: bigint;
813
- maxFeePerGas?: bigint;
814
- maxPriorityFeePerGas?: bigint;
815
- nonce?: number;
816
- value?: bigint;
817
- }): Promise<`0x${string}`>;
818
- /**
819
- * setDefaultValidator
820
- * payable
821
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
822
- */
823
- setDefaultValidator(_defaultValidator: `0x${string}`, _data: `0x${string}`, options?: {
824
- accessList?: import('viem').AccessList;
825
- authorizationList?: import('viem').AuthorizationList;
826
- chain?: import('viem').Chain | null;
827
- dataSuffix?: `0x${string}`;
828
- gas?: bigint;
829
- gasPrice?: bigint;
830
- maxFeePerGas?: bigint;
831
- maxPriorityFeePerGas?: bigint;
832
- nonce?: number;
833
- value?: bigint;
834
- }): Promise<`0x${string}`>;
835
- /**
836
- * setExecution
837
- * payable
838
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
839
- */
840
- setExecution(_selector: `0x${string}`, _executor: `0x${string}`, _validator: `0x${string}`, _validUntil: bigint, _validAfter: bigint, _enableData: `0x${string}`, options?: {
841
- accessList?: import('viem').AccessList;
842
- authorizationList?: import('viem').AuthorizationList;
843
- chain?: import('viem').Chain | null;
844
- dataSuffix?: `0x${string}`;
845
- gas?: bigint;
846
- gasPrice?: bigint;
847
- maxFeePerGas?: bigint;
848
- maxPriorityFeePerGas?: bigint;
849
- nonce?: number;
850
- value?: bigint;
851
- }): Promise<`0x${string}`>;
852
- /**
853
- * upgradeTo
854
- * payable
855
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
856
- */
857
- upgradeTo(_newImplementation: `0x${string}`, options?: {
858
- accessList?: import('viem').AccessList;
859
- authorizationList?: import('viem').AuthorizationList;
860
- chain?: import('viem').Chain | null;
861
- dataSuffix?: `0x${string}`;
862
- gas?: bigint;
863
- gasPrice?: bigint;
864
- maxFeePerGas?: bigint;
865
- maxPriorityFeePerGas?: bigint;
866
- nonce?: number;
867
- value?: bigint;
868
- }): Promise<`0x${string}`>;
869
- /**
870
- * validateUserOp
871
- * payable
872
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
873
- */
874
- validateUserOp(_userOp: UserOperation, userOpHash: `0x${string}`, missingAccountFunds: bigint, options?: {
875
- accessList?: import('viem').AccessList;
876
- authorizationList?: import('viem').AuthorizationList;
877
- chain?: import('viem').Chain | null;
878
- dataSuffix?: `0x${string}`;
879
- gas?: bigint;
880
- gasPrice?: bigint;
881
- maxFeePerGas?: bigint;
882
- maxPriorityFeePerGas?: bigint;
883
- nonce?: number;
884
- value?: bigint;
885
- }): Promise<`0x${string}`>;
886
- /**
887
- * Simulate contract write operations (dry-run without sending transaction)
888
- *
889
- * @example
890
- * const result = await contract.simulate.transfer('0x...', 1000n);
891
- * console.log('Gas estimate:', result.request.gas);
892
- * console.log('Would succeed:', result.result);
893
- */
894
- get simulate(): {
895
- /**
896
- * Simulate disableMode
897
- * Returns gas estimate and result without sending transaction
898
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
899
- */
900
- disableMode(_disableFlag: `0x${string}`, options?: {
901
- accessList?: import("viem").AccessList;
902
- authorizationList?: import("viem").AuthorizationList;
903
- chain?: import("viem").Chain | null;
904
- dataSuffix?: `0x${string}`;
905
- gas?: bigint;
906
- gasPrice?: bigint;
907
- maxFeePerGas?: bigint;
908
- maxPriorityFeePerGas?: bigint;
909
- nonce?: number;
910
- value?: bigint;
911
- }): Promise<void>;
912
- /**
913
- * Simulate execute
914
- * Returns gas estimate and result without sending transaction
915
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
916
- */
917
- execute(to: `0x${string}`, value: bigint, data: `0x${string}`, _operation: bigint, options?: {
918
- accessList?: import("viem").AccessList;
919
- authorizationList?: import("viem").AuthorizationList;
920
- chain?: import("viem").Chain | null;
921
- dataSuffix?: `0x${string}`;
922
- gas?: bigint;
923
- gasPrice?: bigint;
924
- maxFeePerGas?: bigint;
925
- maxPriorityFeePerGas?: bigint;
926
- nonce?: number;
927
- value?: bigint;
928
- }): Promise<void>;
929
- /**
930
- * Simulate executeBatch
931
- * Returns gas estimate and result without sending transaction
932
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
933
- */
934
- executeBatch(calls: Call[], options?: {
935
- accessList?: import("viem").AccessList;
936
- authorizationList?: import("viem").AuthorizationList;
937
- chain?: import("viem").Chain | null;
938
- dataSuffix?: `0x${string}`;
939
- gas?: bigint;
940
- gasPrice?: bigint;
941
- maxFeePerGas?: bigint;
942
- maxPriorityFeePerGas?: bigint;
943
- nonce?: number;
944
- value?: bigint;
945
- }): Promise<void>;
946
- /**
947
- * Simulate executeDelegateCall
948
- * Returns gas estimate and result without sending transaction
949
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
950
- */
951
- executeDelegateCall(to: `0x${string}`, data: `0x${string}`, options?: {
952
- accessList?: import("viem").AccessList;
953
- authorizationList?: import("viem").AuthorizationList;
954
- chain?: import("viem").Chain | null;
955
- dataSuffix?: `0x${string}`;
956
- gas?: bigint;
957
- gasPrice?: bigint;
958
- maxFeePerGas?: bigint;
959
- maxPriorityFeePerGas?: bigint;
960
- nonce?: number;
961
- value?: bigint;
962
- }): Promise<void>;
963
- /**
964
- * Simulate initialize
965
- * Returns gas estimate and result without sending transaction
966
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
967
- */
968
- initialize(_defaultValidator: `0x${string}`, _data: `0x${string}`, options?: {
969
- accessList?: import("viem").AccessList;
970
- authorizationList?: import("viem").AuthorizationList;
971
- chain?: import("viem").Chain | null;
972
- dataSuffix?: `0x${string}`;
973
- gas?: bigint;
974
- gasPrice?: bigint;
975
- maxFeePerGas?: bigint;
976
- maxPriorityFeePerGas?: bigint;
977
- nonce?: number;
978
- value?: bigint;
979
- }): Promise<void>;
980
- /**
981
- * Simulate setDefaultValidator
982
- * Returns gas estimate and result without sending transaction
983
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
984
- */
985
- setDefaultValidator(_defaultValidator: `0x${string}`, _data: `0x${string}`, options?: {
986
- accessList?: import("viem").AccessList;
987
- authorizationList?: import("viem").AuthorizationList;
988
- chain?: import("viem").Chain | null;
989
- dataSuffix?: `0x${string}`;
990
- gas?: bigint;
991
- gasPrice?: bigint;
992
- maxFeePerGas?: bigint;
993
- maxPriorityFeePerGas?: bigint;
994
- nonce?: number;
995
- value?: bigint;
996
- }): Promise<void>;
997
- /**
998
- * Simulate setExecution
999
- * Returns gas estimate and result without sending transaction
1000
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1001
- */
1002
- setExecution(_selector: `0x${string}`, _executor: `0x${string}`, _validator: `0x${string}`, _validUntil: bigint, _validAfter: bigint, _enableData: `0x${string}`, options?: {
1003
- accessList?: import("viem").AccessList;
1004
- authorizationList?: import("viem").AuthorizationList;
1005
- chain?: import("viem").Chain | null;
1006
- dataSuffix?: `0x${string}`;
1007
- gas?: bigint;
1008
- gasPrice?: bigint;
1009
- maxFeePerGas?: bigint;
1010
- maxPriorityFeePerGas?: bigint;
1011
- nonce?: number;
1012
- value?: bigint;
1013
- }): Promise<void>;
1014
- /**
1015
- * Simulate upgradeTo
1016
- * Returns gas estimate and result without sending transaction
1017
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1018
- */
1019
- upgradeTo(_newImplementation: `0x${string}`, options?: {
1020
- accessList?: import("viem").AccessList;
1021
- authorizationList?: import("viem").AuthorizationList;
1022
- chain?: import("viem").Chain | null;
1023
- dataSuffix?: `0x${string}`;
1024
- gas?: bigint;
1025
- gasPrice?: bigint;
1026
- maxFeePerGas?: bigint;
1027
- maxPriorityFeePerGas?: bigint;
1028
- nonce?: number;
1029
- value?: bigint;
1030
- }): Promise<void>;
1031
- /**
1032
- * Simulate validateUserOp
1033
- * Returns gas estimate and result without sending transaction
1034
- * @param options Optional transaction parameters (value, gas, nonce, etc.)
1035
- */
1036
- validateUserOp(_userOp: UserOperation, userOpHash: `0x${string}`, missingAccountFunds: bigint, options?: {
1037
- accessList?: import("viem").AccessList;
1038
- authorizationList?: import("viem").AuthorizationList;
1039
- chain?: import("viem").Chain | null;
1040
- dataSuffix?: `0x${string}`;
1041
- gas?: bigint;
1042
- gasPrice?: bigint;
1043
- maxFeePerGas?: bigint;
1044
- maxPriorityFeePerGas?: bigint;
1045
- nonce?: number;
1046
- value?: bigint;
1047
- }): Promise<bigint>;
1048
- };
1049
- /**
1050
- * Watch contract events
1051
- *
1052
- * @example
1053
- * // Watch all Transfer events
1054
- * const unwatch = contract.watch.Transfer((event) => {
1055
- * console.log('Transfer:', event);
1056
- * });
1057
- *
1058
- * // Stop watching
1059
- * unwatch();
1060
- */
1061
- get watch(): {
1062
- /**
1063
- * Watch DefaultValidatorChanged events
1064
- * @param callback Function to call when event is emitted
1065
- * @param filter Optional filter for indexed parameters
1066
- * @returns Unwatch function to stop listening
1067
- */
1068
- DefaultValidatorChanged: (callback: (event: {
1069
- oldValidator: `0x${string}`;
1070
- newValidator: `0x${string}`;
1071
- }) => void, filter?: {
1072
- oldValidator: `0x${string}`;
1073
- newValidator: `0x${string}`;
1074
- }) => () => void;
1075
- /**
1076
- * Watch ExecutionChanged events
1077
- * @param callback Function to call when event is emitted
1078
- * @param filter Optional filter for indexed parameters
1079
- * @returns Unwatch function to stop listening
1080
- */
1081
- ExecutionChanged: (callback: (event: {
1082
- selector: `0x${string}`;
1083
- executor: `0x${string}`;
1084
- validator: `0x${string}`;
1085
- }) => void, filter?: {
1086
- selector: `0x${string}`;
1087
- executor: `0x${string}`;
1088
- validator: `0x${string}`;
1089
- }) => () => void;
1090
- /**
1091
- * Watch Received events
1092
- * @param callback Function to call when event is emitted
1093
- * @param filter Optional filter for indexed parameters
1094
- * @returns Unwatch function to stop listening
1095
- */
1096
- Received: (callback: (event: {
1097
- sender: `0x${string}`;
1098
- amount: bigint;
1099
- }) => void) => () => void;
1100
- /**
1101
- * Watch Upgraded events
1102
- * @param callback Function to call when event is emitted
1103
- * @param filter Optional filter for indexed parameters
1104
- * @returns Unwatch function to stop listening
1105
- */
1106
- Upgraded: (callback: (event: {
1107
- newImplementation: `0x${string}`;
1108
- }) => void, filter?: {
1109
- newImplementation: `0x${string}`;
1110
- }) => () => void;
1111
- };
1112
- }