@gitmyabi/kernel 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,1913 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Kernel_json = exports.Kernel_jsonAbi = void 0;
4
+ const viem_1 = require("viem");
5
+ /**
6
+ * Kernel_json ABI
7
+ *
8
+ * This ABI is typed using viem's type system for full type safety.
9
+ */
10
+ exports.Kernel_jsonAbi = [
11
+ {
12
+ "inputs": [
13
+ {
14
+ "internalType": "contract IEntryPoint",
15
+ "name": "_entrypoint",
16
+ "type": "address"
17
+ }
18
+ ],
19
+ "stateMutability": "nonpayable",
20
+ "type": "constructor"
21
+ },
22
+ {
23
+ "inputs": [],
24
+ "name": "EnableNotApproved",
25
+ "type": "error"
26
+ },
27
+ {
28
+ "inputs": [],
29
+ "name": "ExecutionReverted",
30
+ "type": "error"
31
+ },
32
+ {
33
+ "inputs": [
34
+ {
35
+ "internalType": "uint256",
36
+ "name": "idx",
37
+ "type": "uint256"
38
+ }
39
+ ],
40
+ "name": "InitConfigError",
41
+ "type": "error"
42
+ },
43
+ {
44
+ "inputs": [],
45
+ "name": "InvalidCallType",
46
+ "type": "error"
47
+ },
48
+ {
49
+ "inputs": [],
50
+ "name": "InvalidCaller",
51
+ "type": "error"
52
+ },
53
+ {
54
+ "inputs": [],
55
+ "name": "InvalidExecutor",
56
+ "type": "error"
57
+ },
58
+ {
59
+ "inputs": [],
60
+ "name": "InvalidFallback",
61
+ "type": "error"
62
+ },
63
+ {
64
+ "inputs": [],
65
+ "name": "InvalidMode",
66
+ "type": "error"
67
+ },
68
+ {
69
+ "inputs": [],
70
+ "name": "InvalidModuleType",
71
+ "type": "error"
72
+ },
73
+ {
74
+ "inputs": [],
75
+ "name": "InvalidNonce",
76
+ "type": "error"
77
+ },
78
+ {
79
+ "inputs": [],
80
+ "name": "InvalidSelector",
81
+ "type": "error"
82
+ },
83
+ {
84
+ "inputs": [],
85
+ "name": "InvalidSignature",
86
+ "type": "error"
87
+ },
88
+ {
89
+ "inputs": [],
90
+ "name": "InvalidValidationType",
91
+ "type": "error"
92
+ },
93
+ {
94
+ "inputs": [],
95
+ "name": "InvalidValidator",
96
+ "type": "error"
97
+ },
98
+ {
99
+ "inputs": [],
100
+ "name": "NonceInvalidationError",
101
+ "type": "error"
102
+ },
103
+ {
104
+ "inputs": [],
105
+ "name": "NotSupportedCallType",
106
+ "type": "error"
107
+ },
108
+ {
109
+ "inputs": [],
110
+ "name": "OnlyExecuteUserOp",
111
+ "type": "error"
112
+ },
113
+ {
114
+ "inputs": [],
115
+ "name": "PermissionDataLengthMismatch",
116
+ "type": "error"
117
+ },
118
+ {
119
+ "inputs": [],
120
+ "name": "PermissionNotAlllowedForSignature",
121
+ "type": "error"
122
+ },
123
+ {
124
+ "inputs": [],
125
+ "name": "PermissionNotAlllowedForUserOp",
126
+ "type": "error"
127
+ },
128
+ {
129
+ "inputs": [],
130
+ "name": "PolicyDataTooLarge",
131
+ "type": "error"
132
+ },
133
+ {
134
+ "inputs": [
135
+ {
136
+ "internalType": "uint256",
137
+ "name": "i",
138
+ "type": "uint256"
139
+ }
140
+ ],
141
+ "name": "PolicyFailed",
142
+ "type": "error"
143
+ },
144
+ {
145
+ "inputs": [],
146
+ "name": "PolicySignatureOrderError",
147
+ "type": "error"
148
+ },
149
+ {
150
+ "inputs": [],
151
+ "name": "RootValidatorCannotBeRemoved",
152
+ "type": "error"
153
+ },
154
+ {
155
+ "inputs": [],
156
+ "name": "SignerPrefixNotPresent",
157
+ "type": "error"
158
+ },
159
+ {
160
+ "anonymous": false,
161
+ "inputs": [
162
+ {
163
+ "indexed": false,
164
+ "internalType": "uint256",
165
+ "name": "moduleTypeId",
166
+ "type": "uint256"
167
+ },
168
+ {
169
+ "indexed": false,
170
+ "internalType": "address",
171
+ "name": "module",
172
+ "type": "address"
173
+ }
174
+ ],
175
+ "name": "ModuleInstalled",
176
+ "type": "event"
177
+ },
178
+ {
179
+ "anonymous": false,
180
+ "inputs": [
181
+ {
182
+ "indexed": false,
183
+ "internalType": "address",
184
+ "name": "module",
185
+ "type": "address"
186
+ },
187
+ {
188
+ "indexed": false,
189
+ "internalType": "bool",
190
+ "name": "result",
191
+ "type": "bool"
192
+ }
193
+ ],
194
+ "name": "ModuleUninstallResult",
195
+ "type": "event"
196
+ },
197
+ {
198
+ "anonymous": false,
199
+ "inputs": [
200
+ {
201
+ "indexed": false,
202
+ "internalType": "uint256",
203
+ "name": "moduleTypeId",
204
+ "type": "uint256"
205
+ },
206
+ {
207
+ "indexed": false,
208
+ "internalType": "address",
209
+ "name": "module",
210
+ "type": "address"
211
+ }
212
+ ],
213
+ "name": "ModuleUninstalled",
214
+ "type": "event"
215
+ },
216
+ {
217
+ "anonymous": false,
218
+ "inputs": [
219
+ {
220
+ "indexed": false,
221
+ "internalType": "uint32",
222
+ "name": "nonce",
223
+ "type": "uint32"
224
+ }
225
+ ],
226
+ "name": "NonceInvalidated",
227
+ "type": "event"
228
+ },
229
+ {
230
+ "anonymous": false,
231
+ "inputs": [
232
+ {
233
+ "indexed": false,
234
+ "internalType": "PermissionId",
235
+ "name": "permission",
236
+ "type": "bytes4"
237
+ },
238
+ {
239
+ "indexed": false,
240
+ "internalType": "uint32",
241
+ "name": "nonce",
242
+ "type": "uint32"
243
+ }
244
+ ],
245
+ "name": "PermissionInstalled",
246
+ "type": "event"
247
+ },
248
+ {
249
+ "anonymous": false,
250
+ "inputs": [
251
+ {
252
+ "indexed": false,
253
+ "internalType": "PermissionId",
254
+ "name": "permission",
255
+ "type": "bytes4"
256
+ }
257
+ ],
258
+ "name": "PermissionUninstalled",
259
+ "type": "event"
260
+ },
261
+ {
262
+ "anonymous": false,
263
+ "inputs": [
264
+ {
265
+ "indexed": false,
266
+ "internalType": "address",
267
+ "name": "sender",
268
+ "type": "address"
269
+ },
270
+ {
271
+ "indexed": false,
272
+ "internalType": "uint256",
273
+ "name": "amount",
274
+ "type": "uint256"
275
+ }
276
+ ],
277
+ "name": "Received",
278
+ "type": "event"
279
+ },
280
+ {
281
+ "anonymous": false,
282
+ "inputs": [
283
+ {
284
+ "indexed": false,
285
+ "internalType": "ValidationId",
286
+ "name": "rootValidator",
287
+ "type": "bytes21"
288
+ }
289
+ ],
290
+ "name": "RootValidatorUpdated",
291
+ "type": "event"
292
+ },
293
+ {
294
+ "anonymous": false,
295
+ "inputs": [
296
+ {
297
+ "indexed": false,
298
+ "internalType": "bytes4",
299
+ "name": "selector",
300
+ "type": "bytes4"
301
+ },
302
+ {
303
+ "indexed": false,
304
+ "internalType": "ValidationId",
305
+ "name": "vId",
306
+ "type": "bytes21"
307
+ },
308
+ {
309
+ "indexed": false,
310
+ "internalType": "bool",
311
+ "name": "allowed",
312
+ "type": "bool"
313
+ }
314
+ ],
315
+ "name": "SelectorSet",
316
+ "type": "event"
317
+ },
318
+ {
319
+ "anonymous": false,
320
+ "inputs": [
321
+ {
322
+ "indexed": false,
323
+ "internalType": "uint256",
324
+ "name": "batchExecutionindex",
325
+ "type": "uint256"
326
+ },
327
+ {
328
+ "indexed": false,
329
+ "internalType": "bytes",
330
+ "name": "result",
331
+ "type": "bytes"
332
+ }
333
+ ],
334
+ "name": "TryExecuteUnsuccessful",
335
+ "type": "event"
336
+ },
337
+ {
338
+ "anonymous": false,
339
+ "inputs": [
340
+ {
341
+ "indexed": true,
342
+ "internalType": "address",
343
+ "name": "implementation",
344
+ "type": "address"
345
+ }
346
+ ],
347
+ "name": "Upgraded",
348
+ "type": "event"
349
+ },
350
+ {
351
+ "anonymous": false,
352
+ "inputs": [
353
+ {
354
+ "indexed": false,
355
+ "internalType": "contract IValidator",
356
+ "name": "validator",
357
+ "type": "address"
358
+ },
359
+ {
360
+ "indexed": false,
361
+ "internalType": "uint32",
362
+ "name": "nonce",
363
+ "type": "uint32"
364
+ }
365
+ ],
366
+ "name": "ValidatorInstalled",
367
+ "type": "event"
368
+ },
369
+ {
370
+ "anonymous": false,
371
+ "inputs": [
372
+ {
373
+ "indexed": false,
374
+ "internalType": "contract IValidator",
375
+ "name": "validator",
376
+ "type": "address"
377
+ }
378
+ ],
379
+ "name": "ValidatorUninstalled",
380
+ "type": "event"
381
+ },
382
+ {
383
+ "stateMutability": "payable",
384
+ "type": "fallback"
385
+ },
386
+ {
387
+ "inputs": [],
388
+ "name": "accountId",
389
+ "outputs": [
390
+ {
391
+ "internalType": "string",
392
+ "name": "accountImplementationId",
393
+ "type": "string"
394
+ }
395
+ ],
396
+ "stateMutability": "pure",
397
+ "type": "function"
398
+ },
399
+ {
400
+ "inputs": [
401
+ {
402
+ "internalType": "ValidationId",
403
+ "name": "_rootValidator",
404
+ "type": "bytes21"
405
+ },
406
+ {
407
+ "internalType": "contract IHook",
408
+ "name": "hook",
409
+ "type": "address"
410
+ },
411
+ {
412
+ "internalType": "bytes",
413
+ "name": "validatorData",
414
+ "type": "bytes"
415
+ },
416
+ {
417
+ "internalType": "bytes",
418
+ "name": "hookData",
419
+ "type": "bytes"
420
+ }
421
+ ],
422
+ "name": "changeRootValidator",
423
+ "outputs": [],
424
+ "stateMutability": "payable",
425
+ "type": "function"
426
+ },
427
+ {
428
+ "inputs": [],
429
+ "name": "currentNonce",
430
+ "outputs": [
431
+ {
432
+ "internalType": "uint32",
433
+ "name": "",
434
+ "type": "uint32"
435
+ }
436
+ ],
437
+ "stateMutability": "view",
438
+ "type": "function"
439
+ },
440
+ {
441
+ "inputs": [],
442
+ "name": "eip712Domain",
443
+ "outputs": [
444
+ {
445
+ "internalType": "bytes1",
446
+ "name": "fields",
447
+ "type": "bytes1"
448
+ },
449
+ {
450
+ "internalType": "string",
451
+ "name": "name",
452
+ "type": "string"
453
+ },
454
+ {
455
+ "internalType": "string",
456
+ "name": "version",
457
+ "type": "string"
458
+ },
459
+ {
460
+ "internalType": "uint256",
461
+ "name": "chainId",
462
+ "type": "uint256"
463
+ },
464
+ {
465
+ "internalType": "address",
466
+ "name": "verifyingContract",
467
+ "type": "address"
468
+ },
469
+ {
470
+ "internalType": "bytes32",
471
+ "name": "salt",
472
+ "type": "bytes32"
473
+ },
474
+ {
475
+ "internalType": "uint256[]",
476
+ "name": "extensions",
477
+ "type": "uint256[]"
478
+ }
479
+ ],
480
+ "stateMutability": "view",
481
+ "type": "function"
482
+ },
483
+ {
484
+ "inputs": [],
485
+ "name": "entrypoint",
486
+ "outputs": [
487
+ {
488
+ "internalType": "contract IEntryPoint",
489
+ "name": "",
490
+ "type": "address"
491
+ }
492
+ ],
493
+ "stateMutability": "view",
494
+ "type": "function"
495
+ },
496
+ {
497
+ "inputs": [
498
+ {
499
+ "internalType": "ExecMode",
500
+ "name": "execMode",
501
+ "type": "bytes32"
502
+ },
503
+ {
504
+ "internalType": "bytes",
505
+ "name": "executionCalldata",
506
+ "type": "bytes"
507
+ }
508
+ ],
509
+ "name": "execute",
510
+ "outputs": [],
511
+ "stateMutability": "payable",
512
+ "type": "function"
513
+ },
514
+ {
515
+ "inputs": [
516
+ {
517
+ "internalType": "ExecMode",
518
+ "name": "execMode",
519
+ "type": "bytes32"
520
+ },
521
+ {
522
+ "internalType": "bytes",
523
+ "name": "executionCalldata",
524
+ "type": "bytes"
525
+ }
526
+ ],
527
+ "name": "executeFromExecutor",
528
+ "outputs": [
529
+ {
530
+ "internalType": "bytes[]",
531
+ "name": "returnData",
532
+ "type": "bytes[]"
533
+ }
534
+ ],
535
+ "stateMutability": "payable",
536
+ "type": "function"
537
+ },
538
+ {
539
+ "inputs": [
540
+ {
541
+ "components": [
542
+ {
543
+ "internalType": "address",
544
+ "name": "sender",
545
+ "type": "address"
546
+ },
547
+ {
548
+ "internalType": "uint256",
549
+ "name": "nonce",
550
+ "type": "uint256"
551
+ },
552
+ {
553
+ "internalType": "bytes",
554
+ "name": "initCode",
555
+ "type": "bytes"
556
+ },
557
+ {
558
+ "internalType": "bytes",
559
+ "name": "callData",
560
+ "type": "bytes"
561
+ },
562
+ {
563
+ "internalType": "bytes32",
564
+ "name": "accountGasLimits",
565
+ "type": "bytes32"
566
+ },
567
+ {
568
+ "internalType": "uint256",
569
+ "name": "preVerificationGas",
570
+ "type": "uint256"
571
+ },
572
+ {
573
+ "internalType": "bytes32",
574
+ "name": "gasFees",
575
+ "type": "bytes32"
576
+ },
577
+ {
578
+ "internalType": "bytes",
579
+ "name": "paymasterAndData",
580
+ "type": "bytes"
581
+ },
582
+ {
583
+ "internalType": "bytes",
584
+ "name": "signature",
585
+ "type": "bytes"
586
+ }
587
+ ],
588
+ "internalType": "struct PackedUserOperation",
589
+ "name": "userOp",
590
+ "type": "tuple"
591
+ },
592
+ {
593
+ "internalType": "bytes32",
594
+ "name": "userOpHash",
595
+ "type": "bytes32"
596
+ }
597
+ ],
598
+ "name": "executeUserOp",
599
+ "outputs": [],
600
+ "stateMutability": "payable",
601
+ "type": "function"
602
+ },
603
+ {
604
+ "inputs": [
605
+ {
606
+ "internalType": "contract IExecutor",
607
+ "name": "executor",
608
+ "type": "address"
609
+ }
610
+ ],
611
+ "name": "executorConfig",
612
+ "outputs": [
613
+ {
614
+ "components": [
615
+ {
616
+ "internalType": "contract IHook",
617
+ "name": "hook",
618
+ "type": "address"
619
+ }
620
+ ],
621
+ "internalType": "struct ExecutorManager.ExecutorConfig",
622
+ "name": "",
623
+ "type": "tuple"
624
+ }
625
+ ],
626
+ "stateMutability": "view",
627
+ "type": "function"
628
+ },
629
+ {
630
+ "inputs": [
631
+ {
632
+ "internalType": "ValidationId",
633
+ "name": "_rootValidator",
634
+ "type": "bytes21"
635
+ },
636
+ {
637
+ "internalType": "contract IHook",
638
+ "name": "hook",
639
+ "type": "address"
640
+ },
641
+ {
642
+ "internalType": "bytes",
643
+ "name": "validatorData",
644
+ "type": "bytes"
645
+ },
646
+ {
647
+ "internalType": "bytes",
648
+ "name": "hookData",
649
+ "type": "bytes"
650
+ },
651
+ {
652
+ "internalType": "bytes[]",
653
+ "name": "initConfig",
654
+ "type": "bytes[]"
655
+ }
656
+ ],
657
+ "name": "initialize",
658
+ "outputs": [],
659
+ "stateMutability": "nonpayable",
660
+ "type": "function"
661
+ },
662
+ {
663
+ "inputs": [
664
+ {
665
+ "internalType": "uint256",
666
+ "name": "moduleType",
667
+ "type": "uint256"
668
+ },
669
+ {
670
+ "internalType": "address",
671
+ "name": "module",
672
+ "type": "address"
673
+ },
674
+ {
675
+ "internalType": "bytes",
676
+ "name": "initData",
677
+ "type": "bytes"
678
+ }
679
+ ],
680
+ "name": "installModule",
681
+ "outputs": [],
682
+ "stateMutability": "payable",
683
+ "type": "function"
684
+ },
685
+ {
686
+ "inputs": [
687
+ {
688
+ "internalType": "ValidationId[]",
689
+ "name": "vIds",
690
+ "type": "bytes21[]"
691
+ },
692
+ {
693
+ "components": [
694
+ {
695
+ "internalType": "uint32",
696
+ "name": "nonce",
697
+ "type": "uint32"
698
+ },
699
+ {
700
+ "internalType": "contract IHook",
701
+ "name": "hook",
702
+ "type": "address"
703
+ }
704
+ ],
705
+ "internalType": "struct ValidationManager.ValidationConfig[]",
706
+ "name": "configs",
707
+ "type": "tuple[]"
708
+ },
709
+ {
710
+ "internalType": "bytes[]",
711
+ "name": "validationData",
712
+ "type": "bytes[]"
713
+ },
714
+ {
715
+ "internalType": "bytes[]",
716
+ "name": "hookData",
717
+ "type": "bytes[]"
718
+ }
719
+ ],
720
+ "name": "installValidations",
721
+ "outputs": [],
722
+ "stateMutability": "payable",
723
+ "type": "function"
724
+ },
725
+ {
726
+ "inputs": [
727
+ {
728
+ "internalType": "uint32",
729
+ "name": "nonce",
730
+ "type": "uint32"
731
+ }
732
+ ],
733
+ "name": "invalidateNonce",
734
+ "outputs": [],
735
+ "stateMutability": "payable",
736
+ "type": "function"
737
+ },
738
+ {
739
+ "inputs": [
740
+ {
741
+ "internalType": "ValidationId",
742
+ "name": "vId",
743
+ "type": "bytes21"
744
+ },
745
+ {
746
+ "internalType": "bytes4",
747
+ "name": "selector",
748
+ "type": "bytes4"
749
+ }
750
+ ],
751
+ "name": "isAllowedSelector",
752
+ "outputs": [
753
+ {
754
+ "internalType": "bool",
755
+ "name": "",
756
+ "type": "bool"
757
+ }
758
+ ],
759
+ "stateMutability": "view",
760
+ "type": "function"
761
+ },
762
+ {
763
+ "inputs": [
764
+ {
765
+ "internalType": "uint256",
766
+ "name": "moduleType",
767
+ "type": "uint256"
768
+ },
769
+ {
770
+ "internalType": "address",
771
+ "name": "module",
772
+ "type": "address"
773
+ },
774
+ {
775
+ "internalType": "bytes",
776
+ "name": "additionalContext",
777
+ "type": "bytes"
778
+ }
779
+ ],
780
+ "name": "isModuleInstalled",
781
+ "outputs": [
782
+ {
783
+ "internalType": "bool",
784
+ "name": "",
785
+ "type": "bool"
786
+ }
787
+ ],
788
+ "stateMutability": "view",
789
+ "type": "function"
790
+ },
791
+ {
792
+ "inputs": [
793
+ {
794
+ "internalType": "bytes32",
795
+ "name": "hash",
796
+ "type": "bytes32"
797
+ },
798
+ {
799
+ "internalType": "bytes",
800
+ "name": "signature",
801
+ "type": "bytes"
802
+ }
803
+ ],
804
+ "name": "isValidSignature",
805
+ "outputs": [
806
+ {
807
+ "internalType": "bytes4",
808
+ "name": "",
809
+ "type": "bytes4"
810
+ }
811
+ ],
812
+ "stateMutability": "view",
813
+ "type": "function"
814
+ },
815
+ {
816
+ "inputs": [
817
+ {
818
+ "internalType": "address",
819
+ "name": "",
820
+ "type": "address"
821
+ },
822
+ {
823
+ "internalType": "address",
824
+ "name": "",
825
+ "type": "address"
826
+ },
827
+ {
828
+ "internalType": "uint256[]",
829
+ "name": "",
830
+ "type": "uint256[]"
831
+ },
832
+ {
833
+ "internalType": "uint256[]",
834
+ "name": "",
835
+ "type": "uint256[]"
836
+ },
837
+ {
838
+ "internalType": "bytes",
839
+ "name": "",
840
+ "type": "bytes"
841
+ }
842
+ ],
843
+ "name": "onERC1155BatchReceived",
844
+ "outputs": [
845
+ {
846
+ "internalType": "bytes4",
847
+ "name": "",
848
+ "type": "bytes4"
849
+ }
850
+ ],
851
+ "stateMutability": "pure",
852
+ "type": "function"
853
+ },
854
+ {
855
+ "inputs": [
856
+ {
857
+ "internalType": "address",
858
+ "name": "",
859
+ "type": "address"
860
+ },
861
+ {
862
+ "internalType": "address",
863
+ "name": "",
864
+ "type": "address"
865
+ },
866
+ {
867
+ "internalType": "uint256",
868
+ "name": "",
869
+ "type": "uint256"
870
+ },
871
+ {
872
+ "internalType": "uint256",
873
+ "name": "",
874
+ "type": "uint256"
875
+ },
876
+ {
877
+ "internalType": "bytes",
878
+ "name": "",
879
+ "type": "bytes"
880
+ }
881
+ ],
882
+ "name": "onERC1155Received",
883
+ "outputs": [
884
+ {
885
+ "internalType": "bytes4",
886
+ "name": "",
887
+ "type": "bytes4"
888
+ }
889
+ ],
890
+ "stateMutability": "pure",
891
+ "type": "function"
892
+ },
893
+ {
894
+ "inputs": [
895
+ {
896
+ "internalType": "address",
897
+ "name": "",
898
+ "type": "address"
899
+ },
900
+ {
901
+ "internalType": "address",
902
+ "name": "",
903
+ "type": "address"
904
+ },
905
+ {
906
+ "internalType": "uint256",
907
+ "name": "",
908
+ "type": "uint256"
909
+ },
910
+ {
911
+ "internalType": "bytes",
912
+ "name": "",
913
+ "type": "bytes"
914
+ }
915
+ ],
916
+ "name": "onERC721Received",
917
+ "outputs": [
918
+ {
919
+ "internalType": "bytes4",
920
+ "name": "",
921
+ "type": "bytes4"
922
+ }
923
+ ],
924
+ "stateMutability": "pure",
925
+ "type": "function"
926
+ },
927
+ {
928
+ "inputs": [
929
+ {
930
+ "internalType": "PermissionId",
931
+ "name": "pId",
932
+ "type": "bytes4"
933
+ }
934
+ ],
935
+ "name": "permissionConfig",
936
+ "outputs": [
937
+ {
938
+ "components": [
939
+ {
940
+ "internalType": "PassFlag",
941
+ "name": "permissionFlag",
942
+ "type": "bytes2"
943
+ },
944
+ {
945
+ "internalType": "contract ISigner",
946
+ "name": "signer",
947
+ "type": "address"
948
+ },
949
+ {
950
+ "internalType": "PolicyData[]",
951
+ "name": "policyData",
952
+ "type": "bytes22[]"
953
+ }
954
+ ],
955
+ "internalType": "struct ValidationManager.PermissionConfig",
956
+ "name": "",
957
+ "type": "tuple"
958
+ }
959
+ ],
960
+ "stateMutability": "view",
961
+ "type": "function"
962
+ },
963
+ {
964
+ "inputs": [],
965
+ "name": "rootValidator",
966
+ "outputs": [
967
+ {
968
+ "internalType": "ValidationId",
969
+ "name": "",
970
+ "type": "bytes21"
971
+ }
972
+ ],
973
+ "stateMutability": "view",
974
+ "type": "function"
975
+ },
976
+ {
977
+ "inputs": [
978
+ {
979
+ "internalType": "bytes4",
980
+ "name": "selector",
981
+ "type": "bytes4"
982
+ }
983
+ ],
984
+ "name": "selectorConfig",
985
+ "outputs": [
986
+ {
987
+ "components": [
988
+ {
989
+ "internalType": "contract IHook",
990
+ "name": "hook",
991
+ "type": "address"
992
+ },
993
+ {
994
+ "internalType": "address",
995
+ "name": "target",
996
+ "type": "address"
997
+ },
998
+ {
999
+ "internalType": "CallType",
1000
+ "name": "callType",
1001
+ "type": "bytes1"
1002
+ }
1003
+ ],
1004
+ "internalType": "struct SelectorManager.SelectorConfig",
1005
+ "name": "",
1006
+ "type": "tuple"
1007
+ }
1008
+ ],
1009
+ "stateMutability": "view",
1010
+ "type": "function"
1011
+ },
1012
+ {
1013
+ "inputs": [
1014
+ {
1015
+ "internalType": "ExecMode",
1016
+ "name": "mode",
1017
+ "type": "bytes32"
1018
+ }
1019
+ ],
1020
+ "name": "supportsExecutionMode",
1021
+ "outputs": [
1022
+ {
1023
+ "internalType": "bool",
1024
+ "name": "",
1025
+ "type": "bool"
1026
+ }
1027
+ ],
1028
+ "stateMutability": "pure",
1029
+ "type": "function"
1030
+ },
1031
+ {
1032
+ "inputs": [
1033
+ {
1034
+ "internalType": "uint256",
1035
+ "name": "moduleTypeId",
1036
+ "type": "uint256"
1037
+ }
1038
+ ],
1039
+ "name": "supportsModule",
1040
+ "outputs": [
1041
+ {
1042
+ "internalType": "bool",
1043
+ "name": "",
1044
+ "type": "bool"
1045
+ }
1046
+ ],
1047
+ "stateMutability": "pure",
1048
+ "type": "function"
1049
+ },
1050
+ {
1051
+ "inputs": [
1052
+ {
1053
+ "internalType": "uint256",
1054
+ "name": "moduleType",
1055
+ "type": "uint256"
1056
+ },
1057
+ {
1058
+ "internalType": "address",
1059
+ "name": "module",
1060
+ "type": "address"
1061
+ },
1062
+ {
1063
+ "internalType": "bytes",
1064
+ "name": "deInitData",
1065
+ "type": "bytes"
1066
+ }
1067
+ ],
1068
+ "name": "uninstallModule",
1069
+ "outputs": [],
1070
+ "stateMutability": "payable",
1071
+ "type": "function"
1072
+ },
1073
+ {
1074
+ "inputs": [
1075
+ {
1076
+ "internalType": "ValidationId",
1077
+ "name": "vId",
1078
+ "type": "bytes21"
1079
+ },
1080
+ {
1081
+ "internalType": "bytes",
1082
+ "name": "deinitData",
1083
+ "type": "bytes"
1084
+ },
1085
+ {
1086
+ "internalType": "bytes",
1087
+ "name": "hookDeinitData",
1088
+ "type": "bytes"
1089
+ }
1090
+ ],
1091
+ "name": "uninstallValidation",
1092
+ "outputs": [],
1093
+ "stateMutability": "payable",
1094
+ "type": "function"
1095
+ },
1096
+ {
1097
+ "inputs": [
1098
+ {
1099
+ "internalType": "address",
1100
+ "name": "_newImplementation",
1101
+ "type": "address"
1102
+ }
1103
+ ],
1104
+ "name": "upgradeTo",
1105
+ "outputs": [],
1106
+ "stateMutability": "payable",
1107
+ "type": "function"
1108
+ },
1109
+ {
1110
+ "inputs": [],
1111
+ "name": "validNonceFrom",
1112
+ "outputs": [
1113
+ {
1114
+ "internalType": "uint32",
1115
+ "name": "",
1116
+ "type": "uint32"
1117
+ }
1118
+ ],
1119
+ "stateMutability": "view",
1120
+ "type": "function"
1121
+ },
1122
+ {
1123
+ "inputs": [
1124
+ {
1125
+ "components": [
1126
+ {
1127
+ "internalType": "address",
1128
+ "name": "sender",
1129
+ "type": "address"
1130
+ },
1131
+ {
1132
+ "internalType": "uint256",
1133
+ "name": "nonce",
1134
+ "type": "uint256"
1135
+ },
1136
+ {
1137
+ "internalType": "bytes",
1138
+ "name": "initCode",
1139
+ "type": "bytes"
1140
+ },
1141
+ {
1142
+ "internalType": "bytes",
1143
+ "name": "callData",
1144
+ "type": "bytes"
1145
+ },
1146
+ {
1147
+ "internalType": "bytes32",
1148
+ "name": "accountGasLimits",
1149
+ "type": "bytes32"
1150
+ },
1151
+ {
1152
+ "internalType": "uint256",
1153
+ "name": "preVerificationGas",
1154
+ "type": "uint256"
1155
+ },
1156
+ {
1157
+ "internalType": "bytes32",
1158
+ "name": "gasFees",
1159
+ "type": "bytes32"
1160
+ },
1161
+ {
1162
+ "internalType": "bytes",
1163
+ "name": "paymasterAndData",
1164
+ "type": "bytes"
1165
+ },
1166
+ {
1167
+ "internalType": "bytes",
1168
+ "name": "signature",
1169
+ "type": "bytes"
1170
+ }
1171
+ ],
1172
+ "internalType": "struct PackedUserOperation",
1173
+ "name": "userOp",
1174
+ "type": "tuple"
1175
+ },
1176
+ {
1177
+ "internalType": "bytes32",
1178
+ "name": "userOpHash",
1179
+ "type": "bytes32"
1180
+ },
1181
+ {
1182
+ "internalType": "uint256",
1183
+ "name": "missingAccountFunds",
1184
+ "type": "uint256"
1185
+ }
1186
+ ],
1187
+ "name": "validateUserOp",
1188
+ "outputs": [
1189
+ {
1190
+ "internalType": "ValidationData",
1191
+ "name": "validationData",
1192
+ "type": "uint256"
1193
+ }
1194
+ ],
1195
+ "stateMutability": "payable",
1196
+ "type": "function"
1197
+ },
1198
+ {
1199
+ "inputs": [
1200
+ {
1201
+ "internalType": "ValidationId",
1202
+ "name": "vId",
1203
+ "type": "bytes21"
1204
+ }
1205
+ ],
1206
+ "name": "validationConfig",
1207
+ "outputs": [
1208
+ {
1209
+ "components": [
1210
+ {
1211
+ "internalType": "uint32",
1212
+ "name": "nonce",
1213
+ "type": "uint32"
1214
+ },
1215
+ {
1216
+ "internalType": "contract IHook",
1217
+ "name": "hook",
1218
+ "type": "address"
1219
+ }
1220
+ ],
1221
+ "internalType": "struct ValidationManager.ValidationConfig",
1222
+ "name": "",
1223
+ "type": "tuple"
1224
+ }
1225
+ ],
1226
+ "stateMutability": "view",
1227
+ "type": "function"
1228
+ },
1229
+ {
1230
+ "stateMutability": "payable",
1231
+ "type": "receive"
1232
+ }
1233
+ ];
1234
+ /**
1235
+ * Kernel_json Contract Class
1236
+ *
1237
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
1238
+ *
1239
+ * @example
1240
+ * ```typescript
1241
+ * import { createPublicClient, createWalletClient, http } from 'viem';
1242
+ * import { mainnet } from 'viem/chains';
1243
+ * import { Kernel_json } from 'Kernel_json';
1244
+ *
1245
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
1246
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
1247
+ *
1248
+ * const contract = new Kernel_json('0x...', { publicClient, walletClient });
1249
+ *
1250
+ * // Read functions
1251
+ * const result = await contract.balanceOf('0x...');
1252
+ *
1253
+ * // Write functions
1254
+ * const hash = await contract.transfer('0x...', 1000n);
1255
+ *
1256
+ * // Simulate transactions (dry-run)
1257
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
1258
+ * console.log('Gas estimate:', simulation.request.gas);
1259
+ *
1260
+ * // Watch events
1261
+ * const unwatch = contract.watch.Transfer((event) => {
1262
+ * console.log('Transfer event:', event);
1263
+ * });
1264
+ * ```
1265
+ */
1266
+ class Kernel_json {
1267
+ constructor(address, clients) {
1268
+ this.contractAddress = address;
1269
+ this.publicClient = clients.publicClient;
1270
+ this.contract = (0, viem_1.getContract)({
1271
+ address,
1272
+ abi: exports.Kernel_jsonAbi,
1273
+ client: {
1274
+ public: clients.publicClient,
1275
+ wallet: clients.walletClient,
1276
+ },
1277
+ });
1278
+ }
1279
+ /**
1280
+ * Get the contract address
1281
+ */
1282
+ get address() {
1283
+ return this.contractAddress;
1284
+ }
1285
+ /**
1286
+ * Get the underlying viem contract instance
1287
+ */
1288
+ getContract() {
1289
+ return this.contract;
1290
+ }
1291
+ /**
1292
+ * accountId
1293
+ * pure
1294
+ */
1295
+ async accountId() {
1296
+ return this.contract.read.accountId();
1297
+ }
1298
+ /**
1299
+ * currentNonce
1300
+ * view
1301
+ */
1302
+ async currentNonce() {
1303
+ return this.contract.read.currentNonce();
1304
+ }
1305
+ /**
1306
+ * eip712Domain
1307
+ * view
1308
+ */
1309
+ async eip712Domain() {
1310
+ return this.contract.read.eip712Domain();
1311
+ }
1312
+ /**
1313
+ * entrypoint
1314
+ * view
1315
+ */
1316
+ async entrypoint() {
1317
+ return this.contract.read.entrypoint();
1318
+ }
1319
+ /**
1320
+ * executorConfig
1321
+ * view
1322
+ */
1323
+ async executorConfig(executor) {
1324
+ return this.contract.read.executorConfig([executor]);
1325
+ }
1326
+ /**
1327
+ * isAllowedSelector
1328
+ * view
1329
+ */
1330
+ async isAllowedSelector(vId, selector) {
1331
+ return this.contract.read.isAllowedSelector([vId, selector]);
1332
+ }
1333
+ /**
1334
+ * isModuleInstalled
1335
+ * view
1336
+ */
1337
+ async isModuleInstalled(moduleType, module, additionalContext) {
1338
+ return this.contract.read.isModuleInstalled([moduleType, module, additionalContext]);
1339
+ }
1340
+ /**
1341
+ * isValidSignature
1342
+ * view
1343
+ */
1344
+ async isValidSignature(hash, signature) {
1345
+ return this.contract.read.isValidSignature([hash, signature]);
1346
+ }
1347
+ /**
1348
+ * onERC1155BatchReceived
1349
+ * pure
1350
+ */
1351
+ async onERC1155BatchReceived(arg0, arg1, arg2, arg3, arg4) {
1352
+ return this.contract.read.onERC1155BatchReceived([arg0, arg1, arg2, arg3, arg4]);
1353
+ }
1354
+ /**
1355
+ * onERC1155Received
1356
+ * pure
1357
+ */
1358
+ async onERC1155Received(arg0, arg1, arg2, arg3, arg4) {
1359
+ return this.contract.read.onERC1155Received([arg0, arg1, arg2, arg3, arg4]);
1360
+ }
1361
+ /**
1362
+ * onERC721Received
1363
+ * pure
1364
+ */
1365
+ async onERC721Received(arg0, arg1, arg2, arg3) {
1366
+ return this.contract.read.onERC721Received([arg0, arg1, arg2, arg3]);
1367
+ }
1368
+ /**
1369
+ * permissionConfig
1370
+ * view
1371
+ */
1372
+ async permissionConfig(pId) {
1373
+ return this.contract.read.permissionConfig([pId]);
1374
+ }
1375
+ /**
1376
+ * rootValidator
1377
+ * view
1378
+ */
1379
+ async rootValidator() {
1380
+ return this.contract.read.rootValidator();
1381
+ }
1382
+ /**
1383
+ * selectorConfig
1384
+ * view
1385
+ */
1386
+ async selectorConfig(selector) {
1387
+ return this.contract.read.selectorConfig([selector]);
1388
+ }
1389
+ /**
1390
+ * supportsExecutionMode
1391
+ * pure
1392
+ */
1393
+ async supportsExecutionMode(mode) {
1394
+ return this.contract.read.supportsExecutionMode([mode]);
1395
+ }
1396
+ /**
1397
+ * supportsModule
1398
+ * pure
1399
+ */
1400
+ async supportsModule(moduleTypeId) {
1401
+ return this.contract.read.supportsModule([moduleTypeId]);
1402
+ }
1403
+ /**
1404
+ * validNonceFrom
1405
+ * view
1406
+ */
1407
+ async validNonceFrom() {
1408
+ return this.contract.read.validNonceFrom();
1409
+ }
1410
+ /**
1411
+ * validationConfig
1412
+ * view
1413
+ */
1414
+ async validationConfig(vId) {
1415
+ return this.contract.read.validationConfig([vId]);
1416
+ }
1417
+ /**
1418
+ * changeRootValidator
1419
+ * payable
1420
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1421
+ */
1422
+ async changeRootValidator(_rootValidator, hook, validatorData, hookData, options) {
1423
+ if (!this.contract.write) {
1424
+ throw new Error('Wallet client is required for write operations');
1425
+ }
1426
+ return this.contract.write.changeRootValidator([_rootValidator, hook, validatorData, hookData], options);
1427
+ }
1428
+ /**
1429
+ * execute
1430
+ * payable
1431
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1432
+ */
1433
+ async execute(execMode, executionCalldata, options) {
1434
+ if (!this.contract.write) {
1435
+ throw new Error('Wallet client is required for write operations');
1436
+ }
1437
+ return this.contract.write.execute([execMode, executionCalldata], options);
1438
+ }
1439
+ /**
1440
+ * executeFromExecutor
1441
+ * payable
1442
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1443
+ */
1444
+ async executeFromExecutor(execMode, executionCalldata, options) {
1445
+ if (!this.contract.write) {
1446
+ throw new Error('Wallet client is required for write operations');
1447
+ }
1448
+ return this.contract.write.executeFromExecutor([execMode, executionCalldata], options);
1449
+ }
1450
+ /**
1451
+ * executeUserOp
1452
+ * payable
1453
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1454
+ */
1455
+ async executeUserOp(userOp, userOpHash, options) {
1456
+ if (!this.contract.write) {
1457
+ throw new Error('Wallet client is required for write operations');
1458
+ }
1459
+ return this.contract.write.executeUserOp([userOp, userOpHash], options);
1460
+ }
1461
+ /**
1462
+ * initialize
1463
+ * nonpayable
1464
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1465
+ */
1466
+ async initialize(_rootValidator, hook, validatorData, hookData, initConfig, options) {
1467
+ if (!this.contract.write) {
1468
+ throw new Error('Wallet client is required for write operations');
1469
+ }
1470
+ return this.contract.write.initialize([_rootValidator, hook, validatorData, hookData, initConfig], options);
1471
+ }
1472
+ /**
1473
+ * installModule
1474
+ * payable
1475
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1476
+ */
1477
+ async installModule(moduleType, module, initData, options) {
1478
+ if (!this.contract.write) {
1479
+ throw new Error('Wallet client is required for write operations');
1480
+ }
1481
+ return this.contract.write.installModule([moduleType, module, initData], options);
1482
+ }
1483
+ /**
1484
+ * installValidations
1485
+ * payable
1486
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1487
+ */
1488
+ async installValidations(vIds, configs, validationData, hookData, options) {
1489
+ if (!this.contract.write) {
1490
+ throw new Error('Wallet client is required for write operations');
1491
+ }
1492
+ return this.contract.write.installValidations([vIds, configs, validationData, hookData], options);
1493
+ }
1494
+ /**
1495
+ * invalidateNonce
1496
+ * payable
1497
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1498
+ */
1499
+ async invalidateNonce(nonce, options) {
1500
+ if (!this.contract.write) {
1501
+ throw new Error('Wallet client is required for write operations');
1502
+ }
1503
+ return this.contract.write.invalidateNonce([nonce], options);
1504
+ }
1505
+ /**
1506
+ * uninstallModule
1507
+ * payable
1508
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1509
+ */
1510
+ async uninstallModule(moduleType, module, deInitData, options) {
1511
+ if (!this.contract.write) {
1512
+ throw new Error('Wallet client is required for write operations');
1513
+ }
1514
+ return this.contract.write.uninstallModule([moduleType, module, deInitData], options);
1515
+ }
1516
+ /**
1517
+ * uninstallValidation
1518
+ * payable
1519
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1520
+ */
1521
+ async uninstallValidation(vId, deinitData, hookDeinitData, options) {
1522
+ if (!this.contract.write) {
1523
+ throw new Error('Wallet client is required for write operations');
1524
+ }
1525
+ return this.contract.write.uninstallValidation([vId, deinitData, hookDeinitData], options);
1526
+ }
1527
+ /**
1528
+ * upgradeTo
1529
+ * payable
1530
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1531
+ */
1532
+ async upgradeTo(_newImplementation, options) {
1533
+ if (!this.contract.write) {
1534
+ throw new Error('Wallet client is required for write operations');
1535
+ }
1536
+ return this.contract.write.upgradeTo([_newImplementation], options);
1537
+ }
1538
+ /**
1539
+ * validateUserOp
1540
+ * payable
1541
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1542
+ */
1543
+ async validateUserOp(userOp, userOpHash, missingAccountFunds, options) {
1544
+ if (!this.contract.write) {
1545
+ throw new Error('Wallet client is required for write operations');
1546
+ }
1547
+ return this.contract.write.validateUserOp([userOp, userOpHash, missingAccountFunds], options);
1548
+ }
1549
+ /**
1550
+ * Simulate contract write operations (dry-run without sending transaction)
1551
+ *
1552
+ * @example
1553
+ * const result = await contract.simulate.transfer('0x...', 1000n);
1554
+ * console.log('Gas estimate:', result.request.gas);
1555
+ * console.log('Would succeed:', result.result);
1556
+ */
1557
+ get simulate() {
1558
+ const contract = this.contract;
1559
+ if (!contract.simulate) {
1560
+ throw new Error('Public client is required for simulation');
1561
+ }
1562
+ return {
1563
+ /**
1564
+ * Simulate changeRootValidator
1565
+ * Returns gas estimate and result without sending transaction
1566
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1567
+ */
1568
+ async changeRootValidator(_rootValidator, hook, validatorData, hookData, options) {
1569
+ return contract.simulate.changeRootValidator([_rootValidator, hook, validatorData, hookData], options);
1570
+ },
1571
+ /**
1572
+ * Simulate execute
1573
+ * Returns gas estimate and result without sending transaction
1574
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1575
+ */
1576
+ async execute(execMode, executionCalldata, options) {
1577
+ return contract.simulate.execute([execMode, executionCalldata], options);
1578
+ },
1579
+ /**
1580
+ * Simulate executeFromExecutor
1581
+ * Returns gas estimate and result without sending transaction
1582
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1583
+ */
1584
+ async executeFromExecutor(execMode, executionCalldata, options) {
1585
+ return contract.simulate.executeFromExecutor([execMode, executionCalldata], options);
1586
+ },
1587
+ /**
1588
+ * Simulate executeUserOp
1589
+ * Returns gas estimate and result without sending transaction
1590
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1591
+ */
1592
+ async executeUserOp(userOp, userOpHash, options) {
1593
+ return contract.simulate.executeUserOp([userOp, userOpHash], options);
1594
+ },
1595
+ /**
1596
+ * Simulate initialize
1597
+ * Returns gas estimate and result without sending transaction
1598
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1599
+ */
1600
+ async initialize(_rootValidator, hook, validatorData, hookData, initConfig, options) {
1601
+ return contract.simulate.initialize([_rootValidator, hook, validatorData, hookData, initConfig], options);
1602
+ },
1603
+ /**
1604
+ * Simulate installModule
1605
+ * Returns gas estimate and result without sending transaction
1606
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1607
+ */
1608
+ async installModule(moduleType, module, initData, options) {
1609
+ return contract.simulate.installModule([moduleType, module, initData], options);
1610
+ },
1611
+ /**
1612
+ * Simulate installValidations
1613
+ * Returns gas estimate and result without sending transaction
1614
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1615
+ */
1616
+ async installValidations(vIds, configs, validationData, hookData, options) {
1617
+ return contract.simulate.installValidations([vIds, configs, validationData, hookData], options);
1618
+ },
1619
+ /**
1620
+ * Simulate invalidateNonce
1621
+ * Returns gas estimate and result without sending transaction
1622
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1623
+ */
1624
+ async invalidateNonce(nonce, options) {
1625
+ return contract.simulate.invalidateNonce([nonce], options);
1626
+ },
1627
+ /**
1628
+ * Simulate uninstallModule
1629
+ * Returns gas estimate and result without sending transaction
1630
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1631
+ */
1632
+ async uninstallModule(moduleType, module, deInitData, options) {
1633
+ return contract.simulate.uninstallModule([moduleType, module, deInitData], options);
1634
+ },
1635
+ /**
1636
+ * Simulate uninstallValidation
1637
+ * Returns gas estimate and result without sending transaction
1638
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1639
+ */
1640
+ async uninstallValidation(vId, deinitData, hookDeinitData, options) {
1641
+ return contract.simulate.uninstallValidation([vId, deinitData, hookDeinitData], options);
1642
+ },
1643
+ /**
1644
+ * Simulate upgradeTo
1645
+ * Returns gas estimate and result without sending transaction
1646
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1647
+ */
1648
+ async upgradeTo(_newImplementation, options) {
1649
+ return contract.simulate.upgradeTo([_newImplementation], options);
1650
+ },
1651
+ /**
1652
+ * Simulate validateUserOp
1653
+ * Returns gas estimate and result without sending transaction
1654
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1655
+ */
1656
+ async validateUserOp(userOp, userOpHash, missingAccountFunds, options) {
1657
+ return contract.simulate.validateUserOp([userOp, userOpHash, missingAccountFunds], options);
1658
+ }
1659
+ };
1660
+ }
1661
+ /**
1662
+ * Watch contract events
1663
+ *
1664
+ * @example
1665
+ * // Watch all Transfer events
1666
+ * const unwatch = contract.watch.Transfer((event) => {
1667
+ * console.log('Transfer:', event);
1668
+ * });
1669
+ *
1670
+ * // Stop watching
1671
+ * unwatch();
1672
+ */
1673
+ get watch() {
1674
+ return {
1675
+ /**
1676
+ * Watch ModuleInstalled events
1677
+ * @param callback Function to call when event is emitted
1678
+ * @param filter Optional filter for indexed parameters
1679
+ * @returns Unwatch function to stop listening
1680
+ */
1681
+ ModuleInstalled: (callback) => {
1682
+ return this.publicClient.watchContractEvent({
1683
+ address: this.contractAddress,
1684
+ abi: exports.Kernel_jsonAbi,
1685
+ eventName: 'ModuleInstalled',
1686
+ onLogs: (logs) => {
1687
+ logs.forEach((log) => {
1688
+ callback(log.args);
1689
+ });
1690
+ },
1691
+ });
1692
+ },
1693
+ /**
1694
+ * Watch ModuleUninstallResult events
1695
+ * @param callback Function to call when event is emitted
1696
+ * @param filter Optional filter for indexed parameters
1697
+ * @returns Unwatch function to stop listening
1698
+ */
1699
+ ModuleUninstallResult: (callback) => {
1700
+ return this.publicClient.watchContractEvent({
1701
+ address: this.contractAddress,
1702
+ abi: exports.Kernel_jsonAbi,
1703
+ eventName: 'ModuleUninstallResult',
1704
+ onLogs: (logs) => {
1705
+ logs.forEach((log) => {
1706
+ callback(log.args);
1707
+ });
1708
+ },
1709
+ });
1710
+ },
1711
+ /**
1712
+ * Watch ModuleUninstalled events
1713
+ * @param callback Function to call when event is emitted
1714
+ * @param filter Optional filter for indexed parameters
1715
+ * @returns Unwatch function to stop listening
1716
+ */
1717
+ ModuleUninstalled: (callback) => {
1718
+ return this.publicClient.watchContractEvent({
1719
+ address: this.contractAddress,
1720
+ abi: exports.Kernel_jsonAbi,
1721
+ eventName: 'ModuleUninstalled',
1722
+ onLogs: (logs) => {
1723
+ logs.forEach((log) => {
1724
+ callback(log.args);
1725
+ });
1726
+ },
1727
+ });
1728
+ },
1729
+ /**
1730
+ * Watch NonceInvalidated events
1731
+ * @param callback Function to call when event is emitted
1732
+ * @param filter Optional filter for indexed parameters
1733
+ * @returns Unwatch function to stop listening
1734
+ */
1735
+ NonceInvalidated: (callback) => {
1736
+ return this.publicClient.watchContractEvent({
1737
+ address: this.contractAddress,
1738
+ abi: exports.Kernel_jsonAbi,
1739
+ eventName: 'NonceInvalidated',
1740
+ onLogs: (logs) => {
1741
+ logs.forEach((log) => {
1742
+ callback(log.args);
1743
+ });
1744
+ },
1745
+ });
1746
+ },
1747
+ /**
1748
+ * Watch PermissionInstalled events
1749
+ * @param callback Function to call when event is emitted
1750
+ * @param filter Optional filter for indexed parameters
1751
+ * @returns Unwatch function to stop listening
1752
+ */
1753
+ PermissionInstalled: (callback) => {
1754
+ return this.publicClient.watchContractEvent({
1755
+ address: this.contractAddress,
1756
+ abi: exports.Kernel_jsonAbi,
1757
+ eventName: 'PermissionInstalled',
1758
+ onLogs: (logs) => {
1759
+ logs.forEach((log) => {
1760
+ callback(log.args);
1761
+ });
1762
+ },
1763
+ });
1764
+ },
1765
+ /**
1766
+ * Watch PermissionUninstalled events
1767
+ * @param callback Function to call when event is emitted
1768
+ * @param filter Optional filter for indexed parameters
1769
+ * @returns Unwatch function to stop listening
1770
+ */
1771
+ PermissionUninstalled: (callback) => {
1772
+ return this.publicClient.watchContractEvent({
1773
+ address: this.contractAddress,
1774
+ abi: exports.Kernel_jsonAbi,
1775
+ eventName: 'PermissionUninstalled',
1776
+ onLogs: (logs) => {
1777
+ logs.forEach((log) => {
1778
+ callback(log.args);
1779
+ });
1780
+ },
1781
+ });
1782
+ },
1783
+ /**
1784
+ * Watch Received events
1785
+ * @param callback Function to call when event is emitted
1786
+ * @param filter Optional filter for indexed parameters
1787
+ * @returns Unwatch function to stop listening
1788
+ */
1789
+ Received: (callback) => {
1790
+ return this.publicClient.watchContractEvent({
1791
+ address: this.contractAddress,
1792
+ abi: exports.Kernel_jsonAbi,
1793
+ eventName: 'Received',
1794
+ onLogs: (logs) => {
1795
+ logs.forEach((log) => {
1796
+ callback(log.args);
1797
+ });
1798
+ },
1799
+ });
1800
+ },
1801
+ /**
1802
+ * Watch RootValidatorUpdated events
1803
+ * @param callback Function to call when event is emitted
1804
+ * @param filter Optional filter for indexed parameters
1805
+ * @returns Unwatch function to stop listening
1806
+ */
1807
+ RootValidatorUpdated: (callback) => {
1808
+ return this.publicClient.watchContractEvent({
1809
+ address: this.contractAddress,
1810
+ abi: exports.Kernel_jsonAbi,
1811
+ eventName: 'RootValidatorUpdated',
1812
+ onLogs: (logs) => {
1813
+ logs.forEach((log) => {
1814
+ callback(log.args);
1815
+ });
1816
+ },
1817
+ });
1818
+ },
1819
+ /**
1820
+ * Watch SelectorSet events
1821
+ * @param callback Function to call when event is emitted
1822
+ * @param filter Optional filter for indexed parameters
1823
+ * @returns Unwatch function to stop listening
1824
+ */
1825
+ SelectorSet: (callback) => {
1826
+ return this.publicClient.watchContractEvent({
1827
+ address: this.contractAddress,
1828
+ abi: exports.Kernel_jsonAbi,
1829
+ eventName: 'SelectorSet',
1830
+ onLogs: (logs) => {
1831
+ logs.forEach((log) => {
1832
+ callback(log.args);
1833
+ });
1834
+ },
1835
+ });
1836
+ },
1837
+ /**
1838
+ * Watch TryExecuteUnsuccessful events
1839
+ * @param callback Function to call when event is emitted
1840
+ * @param filter Optional filter for indexed parameters
1841
+ * @returns Unwatch function to stop listening
1842
+ */
1843
+ TryExecuteUnsuccessful: (callback) => {
1844
+ return this.publicClient.watchContractEvent({
1845
+ address: this.contractAddress,
1846
+ abi: exports.Kernel_jsonAbi,
1847
+ eventName: 'TryExecuteUnsuccessful',
1848
+ onLogs: (logs) => {
1849
+ logs.forEach((log) => {
1850
+ callback(log.args);
1851
+ });
1852
+ },
1853
+ });
1854
+ },
1855
+ /**
1856
+ * Watch Upgraded events
1857
+ * @param callback Function to call when event is emitted
1858
+ * @param filter Optional filter for indexed parameters
1859
+ * @returns Unwatch function to stop listening
1860
+ */
1861
+ Upgraded: (callback, filter) => {
1862
+ return this.publicClient.watchContractEvent({
1863
+ address: this.contractAddress,
1864
+ abi: exports.Kernel_jsonAbi,
1865
+ eventName: 'Upgraded',
1866
+ args: filter,
1867
+ onLogs: (logs) => {
1868
+ logs.forEach((log) => {
1869
+ callback(log.args);
1870
+ });
1871
+ },
1872
+ });
1873
+ },
1874
+ /**
1875
+ * Watch ValidatorInstalled events
1876
+ * @param callback Function to call when event is emitted
1877
+ * @param filter Optional filter for indexed parameters
1878
+ * @returns Unwatch function to stop listening
1879
+ */
1880
+ ValidatorInstalled: (callback) => {
1881
+ return this.publicClient.watchContractEvent({
1882
+ address: this.contractAddress,
1883
+ abi: exports.Kernel_jsonAbi,
1884
+ eventName: 'ValidatorInstalled',
1885
+ onLogs: (logs) => {
1886
+ logs.forEach((log) => {
1887
+ callback(log.args);
1888
+ });
1889
+ },
1890
+ });
1891
+ },
1892
+ /**
1893
+ * Watch ValidatorUninstalled events
1894
+ * @param callback Function to call when event is emitted
1895
+ * @param filter Optional filter for indexed parameters
1896
+ * @returns Unwatch function to stop listening
1897
+ */
1898
+ ValidatorUninstalled: (callback) => {
1899
+ return this.publicClient.watchContractEvent({
1900
+ address: this.contractAddress,
1901
+ abi: exports.Kernel_jsonAbi,
1902
+ eventName: 'ValidatorUninstalled',
1903
+ onLogs: (logs) => {
1904
+ logs.forEach((log) => {
1905
+ callback(log.args);
1906
+ });
1907
+ },
1908
+ });
1909
+ }
1910
+ };
1911
+ }
1912
+ }
1913
+ exports.Kernel_json = Kernel_json;