@gitmyabi/kernel 1.0.2 → 1.0.3

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,1023 @@
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
+ "constant": true,
13
+ "inputs": [],
14
+ "name": "hasInitialized",
15
+ "outputs": [
16
+ {
17
+ "name": "",
18
+ "type": "bool"
19
+ }
20
+ ],
21
+ "payable": false,
22
+ "stateMutability": "view",
23
+ "type": "function"
24
+ },
25
+ {
26
+ "constant": true,
27
+ "inputs": [],
28
+ "name": "KERNEL_APP_ID",
29
+ "outputs": [
30
+ {
31
+ "name": "",
32
+ "type": "bytes32"
33
+ }
34
+ ],
35
+ "payable": false,
36
+ "stateMutability": "pure",
37
+ "type": "function"
38
+ },
39
+ {
40
+ "constant": true,
41
+ "inputs": [],
42
+ "name": "APP_ADDR_NAMESPACE",
43
+ "outputs": [
44
+ {
45
+ "name": "",
46
+ "type": "bytes32"
47
+ }
48
+ ],
49
+ "payable": false,
50
+ "stateMutability": "pure",
51
+ "type": "function"
52
+ },
53
+ {
54
+ "constant": true,
55
+ "inputs": [],
56
+ "name": "getRecoveryVault",
57
+ "outputs": [
58
+ {
59
+ "name": "",
60
+ "type": "address"
61
+ }
62
+ ],
63
+ "payable": false,
64
+ "stateMutability": "view",
65
+ "type": "function"
66
+ },
67
+ {
68
+ "constant": false,
69
+ "inputs": [
70
+ {
71
+ "name": "_appId",
72
+ "type": "bytes32"
73
+ },
74
+ {
75
+ "name": "_appBase",
76
+ "type": "address"
77
+ },
78
+ {
79
+ "name": "_initializePayload",
80
+ "type": "bytes"
81
+ },
82
+ {
83
+ "name": "_setDefault",
84
+ "type": "bool"
85
+ }
86
+ ],
87
+ "name": "newAppInstance",
88
+ "outputs": [
89
+ {
90
+ "name": "appProxy",
91
+ "type": "address"
92
+ }
93
+ ],
94
+ "payable": false,
95
+ "stateMutability": "nonpayable",
96
+ "type": "function"
97
+ },
98
+ {
99
+ "constant": true,
100
+ "inputs": [
101
+ {
102
+ "name": "",
103
+ "type": "bytes32"
104
+ },
105
+ {
106
+ "name": "",
107
+ "type": "bytes32"
108
+ }
109
+ ],
110
+ "name": "apps",
111
+ "outputs": [
112
+ {
113
+ "name": "",
114
+ "type": "address"
115
+ }
116
+ ],
117
+ "payable": false,
118
+ "stateMutability": "view",
119
+ "type": "function"
120
+ },
121
+ {
122
+ "constant": false,
123
+ "inputs": [
124
+ {
125
+ "name": "_baseAcl",
126
+ "type": "address"
127
+ },
128
+ {
129
+ "name": "_permissionsCreator",
130
+ "type": "address"
131
+ }
132
+ ],
133
+ "name": "initialize",
134
+ "outputs": [],
135
+ "payable": false,
136
+ "stateMutability": "nonpayable",
137
+ "type": "function"
138
+ },
139
+ {
140
+ "constant": true,
141
+ "inputs": [],
142
+ "name": "CORE_NAMESPACE",
143
+ "outputs": [
144
+ {
145
+ "name": "",
146
+ "type": "bytes32"
147
+ }
148
+ ],
149
+ "payable": false,
150
+ "stateMutability": "pure",
151
+ "type": "function"
152
+ },
153
+ {
154
+ "constant": true,
155
+ "inputs": [
156
+ {
157
+ "name": "token",
158
+ "type": "address"
159
+ }
160
+ ],
161
+ "name": "allowRecoverability",
162
+ "outputs": [
163
+ {
164
+ "name": "",
165
+ "type": "bool"
166
+ }
167
+ ],
168
+ "payable": false,
169
+ "stateMutability": "view",
170
+ "type": "function"
171
+ },
172
+ {
173
+ "constant": false,
174
+ "inputs": [
175
+ {
176
+ "name": "_appId",
177
+ "type": "bytes32"
178
+ },
179
+ {
180
+ "name": "_appBase",
181
+ "type": "address"
182
+ }
183
+ ],
184
+ "name": "newAppInstance",
185
+ "outputs": [
186
+ {
187
+ "name": "appProxy",
188
+ "type": "address"
189
+ }
190
+ ],
191
+ "payable": false,
192
+ "stateMutability": "nonpayable",
193
+ "type": "function"
194
+ },
195
+ {
196
+ "constant": true,
197
+ "inputs": [],
198
+ "name": "recoveryVaultAppId",
199
+ "outputs": [
200
+ {
201
+ "name": "",
202
+ "type": "bytes32"
203
+ }
204
+ ],
205
+ "payable": false,
206
+ "stateMutability": "view",
207
+ "type": "function"
208
+ },
209
+ {
210
+ "constant": true,
211
+ "inputs": [],
212
+ "name": "getInitializationBlock",
213
+ "outputs": [
214
+ {
215
+ "name": "",
216
+ "type": "uint256"
217
+ }
218
+ ],
219
+ "payable": false,
220
+ "stateMutability": "view",
221
+ "type": "function"
222
+ },
223
+ {
224
+ "constant": false,
225
+ "inputs": [
226
+ {
227
+ "name": "_recoveryVaultAppId",
228
+ "type": "bytes32"
229
+ }
230
+ ],
231
+ "name": "setRecoveryVaultAppId",
232
+ "outputs": [],
233
+ "payable": false,
234
+ "stateMutability": "nonpayable",
235
+ "type": "function"
236
+ },
237
+ {
238
+ "constant": true,
239
+ "inputs": [],
240
+ "name": "APP_MANAGER_ROLE",
241
+ "outputs": [
242
+ {
243
+ "name": "",
244
+ "type": "bytes32"
245
+ }
246
+ ],
247
+ "payable": false,
248
+ "stateMutability": "view",
249
+ "type": "function"
250
+ },
251
+ {
252
+ "constant": false,
253
+ "inputs": [
254
+ {
255
+ "name": "_appId",
256
+ "type": "bytes32"
257
+ },
258
+ {
259
+ "name": "_appBase",
260
+ "type": "address"
261
+ }
262
+ ],
263
+ "name": "newPinnedAppInstance",
264
+ "outputs": [
265
+ {
266
+ "name": "appProxy",
267
+ "type": "address"
268
+ }
269
+ ],
270
+ "payable": false,
271
+ "stateMutability": "nonpayable",
272
+ "type": "function"
273
+ },
274
+ {
275
+ "constant": false,
276
+ "inputs": [
277
+ {
278
+ "name": "_token",
279
+ "type": "address"
280
+ }
281
+ ],
282
+ "name": "transferToVault",
283
+ "outputs": [],
284
+ "payable": false,
285
+ "stateMutability": "nonpayable",
286
+ "type": "function"
287
+ },
288
+ {
289
+ "constant": false,
290
+ "inputs": [
291
+ {
292
+ "name": "_namespace",
293
+ "type": "bytes32"
294
+ },
295
+ {
296
+ "name": "_appId",
297
+ "type": "bytes32"
298
+ },
299
+ {
300
+ "name": "_app",
301
+ "type": "address"
302
+ }
303
+ ],
304
+ "name": "setApp",
305
+ "outputs": [],
306
+ "payable": false,
307
+ "stateMutability": "nonpayable",
308
+ "type": "function"
309
+ },
310
+ {
311
+ "constant": true,
312
+ "inputs": [
313
+ {
314
+ "name": "_namespace",
315
+ "type": "bytes32"
316
+ },
317
+ {
318
+ "name": "_appId",
319
+ "type": "bytes32"
320
+ }
321
+ ],
322
+ "name": "getApp",
323
+ "outputs": [
324
+ {
325
+ "name": "",
326
+ "type": "address"
327
+ }
328
+ ],
329
+ "payable": false,
330
+ "stateMutability": "view",
331
+ "type": "function"
332
+ },
333
+ {
334
+ "constant": false,
335
+ "inputs": [
336
+ {
337
+ "name": "_appId",
338
+ "type": "bytes32"
339
+ },
340
+ {
341
+ "name": "_appBase",
342
+ "type": "address"
343
+ },
344
+ {
345
+ "name": "_initializePayload",
346
+ "type": "bytes"
347
+ },
348
+ {
349
+ "name": "_setDefault",
350
+ "type": "bool"
351
+ }
352
+ ],
353
+ "name": "newPinnedAppInstance",
354
+ "outputs": [
355
+ {
356
+ "name": "appProxy",
357
+ "type": "address"
358
+ }
359
+ ],
360
+ "payable": false,
361
+ "stateMutability": "nonpayable",
362
+ "type": "function"
363
+ },
364
+ {
365
+ "constant": false,
366
+ "inputs": [
367
+ {
368
+ "name": "_kernel",
369
+ "type": "address"
370
+ },
371
+ {
372
+ "name": "_appId",
373
+ "type": "bytes32"
374
+ },
375
+ {
376
+ "name": "_initializePayload",
377
+ "type": "bytes"
378
+ }
379
+ ],
380
+ "name": "newAppProxyPinned",
381
+ "outputs": [
382
+ {
383
+ "name": "",
384
+ "type": "address"
385
+ }
386
+ ],
387
+ "payable": false,
388
+ "stateMutability": "nonpayable",
389
+ "type": "function"
390
+ },
391
+ {
392
+ "constant": true,
393
+ "inputs": [],
394
+ "name": "APP_BASES_NAMESPACE",
395
+ "outputs": [
396
+ {
397
+ "name": "",
398
+ "type": "bytes32"
399
+ }
400
+ ],
401
+ "payable": false,
402
+ "stateMutability": "pure",
403
+ "type": "function"
404
+ },
405
+ {
406
+ "constant": true,
407
+ "inputs": [],
408
+ "name": "acl",
409
+ "outputs": [
410
+ {
411
+ "name": "",
412
+ "type": "address"
413
+ }
414
+ ],
415
+ "payable": false,
416
+ "stateMutability": "view",
417
+ "type": "function"
418
+ },
419
+ {
420
+ "constant": true,
421
+ "inputs": [],
422
+ "name": "isPetrified",
423
+ "outputs": [
424
+ {
425
+ "name": "",
426
+ "type": "bool"
427
+ }
428
+ ],
429
+ "payable": false,
430
+ "stateMutability": "view",
431
+ "type": "function"
432
+ },
433
+ {
434
+ "constant": false,
435
+ "inputs": [
436
+ {
437
+ "name": "_kernel",
438
+ "type": "address"
439
+ },
440
+ {
441
+ "name": "_appId",
442
+ "type": "bytes32"
443
+ }
444
+ ],
445
+ "name": "newAppProxy",
446
+ "outputs": [
447
+ {
448
+ "name": "",
449
+ "type": "address"
450
+ }
451
+ ],
452
+ "payable": false,
453
+ "stateMutability": "nonpayable",
454
+ "type": "function"
455
+ },
456
+ {
457
+ "constant": true,
458
+ "inputs": [],
459
+ "name": "DEFAULT_ACL_APP_ID",
460
+ "outputs": [
461
+ {
462
+ "name": "",
463
+ "type": "bytes32"
464
+ }
465
+ ],
466
+ "payable": false,
467
+ "stateMutability": "pure",
468
+ "type": "function"
469
+ },
470
+ {
471
+ "constant": false,
472
+ "inputs": [
473
+ {
474
+ "name": "_kernel",
475
+ "type": "address"
476
+ },
477
+ {
478
+ "name": "_appId",
479
+ "type": "bytes32"
480
+ },
481
+ {
482
+ "name": "_initializePayload",
483
+ "type": "bytes"
484
+ }
485
+ ],
486
+ "name": "newAppProxy",
487
+ "outputs": [
488
+ {
489
+ "name": "",
490
+ "type": "address"
491
+ }
492
+ ],
493
+ "payable": false,
494
+ "stateMutability": "nonpayable",
495
+ "type": "function"
496
+ },
497
+ {
498
+ "constant": true,
499
+ "inputs": [
500
+ {
501
+ "name": "_who",
502
+ "type": "address"
503
+ },
504
+ {
505
+ "name": "_where",
506
+ "type": "address"
507
+ },
508
+ {
509
+ "name": "_what",
510
+ "type": "bytes32"
511
+ },
512
+ {
513
+ "name": "_how",
514
+ "type": "bytes"
515
+ }
516
+ ],
517
+ "name": "hasPermission",
518
+ "outputs": [
519
+ {
520
+ "name": "",
521
+ "type": "bool"
522
+ }
523
+ ],
524
+ "payable": false,
525
+ "stateMutability": "view",
526
+ "type": "function"
527
+ },
528
+ {
529
+ "constant": false,
530
+ "inputs": [
531
+ {
532
+ "name": "_kernel",
533
+ "type": "address"
534
+ },
535
+ {
536
+ "name": "_appId",
537
+ "type": "bytes32"
538
+ }
539
+ ],
540
+ "name": "newAppProxyPinned",
541
+ "outputs": [
542
+ {
543
+ "name": "",
544
+ "type": "address"
545
+ }
546
+ ],
547
+ "payable": false,
548
+ "stateMutability": "nonpayable",
549
+ "type": "function"
550
+ },
551
+ {
552
+ "inputs": [
553
+ {
554
+ "name": "_shouldPetrify",
555
+ "type": "bool"
556
+ }
557
+ ],
558
+ "payable": false,
559
+ "stateMutability": "nonpayable",
560
+ "type": "constructor"
561
+ },
562
+ {
563
+ "anonymous": false,
564
+ "inputs": [
565
+ {
566
+ "indexed": false,
567
+ "name": "proxy",
568
+ "type": "address"
569
+ },
570
+ {
571
+ "indexed": false,
572
+ "name": "isUpgradeable",
573
+ "type": "bool"
574
+ },
575
+ {
576
+ "indexed": false,
577
+ "name": "appId",
578
+ "type": "bytes32"
579
+ }
580
+ ],
581
+ "name": "NewAppProxy",
582
+ "type": "event"
583
+ },
584
+ {
585
+ "anonymous": false,
586
+ "inputs": [
587
+ {
588
+ "indexed": true,
589
+ "name": "vault",
590
+ "type": "address"
591
+ },
592
+ {
593
+ "indexed": true,
594
+ "name": "token",
595
+ "type": "address"
596
+ },
597
+ {
598
+ "indexed": false,
599
+ "name": "amount",
600
+ "type": "uint256"
601
+ }
602
+ ],
603
+ "name": "RecoverToVault",
604
+ "type": "event"
605
+ },
606
+ {
607
+ "anonymous": false,
608
+ "inputs": [
609
+ {
610
+ "indexed": true,
611
+ "name": "namespace",
612
+ "type": "bytes32"
613
+ },
614
+ {
615
+ "indexed": true,
616
+ "name": "appId",
617
+ "type": "bytes32"
618
+ },
619
+ {
620
+ "indexed": false,
621
+ "name": "app",
622
+ "type": "address"
623
+ }
624
+ ],
625
+ "name": "SetApp",
626
+ "type": "event"
627
+ }
628
+ ];
629
+ /**
630
+ * Kernel_json Contract Class
631
+ *
632
+ * Provides a class-based API similar to TypeChain for interacting with the contract.
633
+ *
634
+ * @example
635
+ * ```typescript
636
+ * import { createPublicClient, createWalletClient, http } from 'viem';
637
+ * import { mainnet } from 'viem/chains';
638
+ * import { Kernel_json } from 'Kernel_json';
639
+ *
640
+ * const publicClient = createPublicClient({ chain: mainnet, transport: http() });
641
+ * const walletClient = createWalletClient({ chain: mainnet, transport: http() });
642
+ *
643
+ * const contract = new Kernel_json('0x...', { publicClient, walletClient });
644
+ *
645
+ * // Read functions
646
+ * const result = await contract.balanceOf('0x...');
647
+ *
648
+ * // Write functions
649
+ * const hash = await contract.transfer('0x...', 1000n);
650
+ *
651
+ * // Simulate transactions (dry-run)
652
+ * const simulation = await contract.simulate.transfer('0x...', 1000n);
653
+ * console.log('Gas estimate:', simulation.request.gas);
654
+ *
655
+ * // Watch events
656
+ * const unwatch = contract.watch.Transfer((event) => {
657
+ * console.log('Transfer event:', event);
658
+ * });
659
+ * ```
660
+ */
661
+ class Kernel_json {
662
+ constructor(address, clients) {
663
+ this.contractAddress = address;
664
+ this.publicClient = clients.publicClient;
665
+ this.contract = (0, viem_1.getContract)({
666
+ address,
667
+ abi: exports.Kernel_jsonAbi,
668
+ client: {
669
+ public: clients.publicClient,
670
+ wallet: clients.walletClient,
671
+ },
672
+ });
673
+ }
674
+ /**
675
+ * Get the contract address
676
+ */
677
+ get address() {
678
+ return this.contractAddress;
679
+ }
680
+ /**
681
+ * Get the underlying viem contract instance
682
+ */
683
+ getContract() {
684
+ return this.contract;
685
+ }
686
+ /**
687
+ * hasInitialized
688
+ * view
689
+ */
690
+ async hasInitialized() {
691
+ return this.contract.read.hasInitialized();
692
+ }
693
+ /**
694
+ * KERNEL_APP_ID
695
+ * pure
696
+ */
697
+ async KERNEL_APP_ID() {
698
+ return this.contract.read.KERNEL_APP_ID();
699
+ }
700
+ /**
701
+ * APP_ADDR_NAMESPACE
702
+ * pure
703
+ */
704
+ async APP_ADDR_NAMESPACE() {
705
+ return this.contract.read.APP_ADDR_NAMESPACE();
706
+ }
707
+ /**
708
+ * getRecoveryVault
709
+ * view
710
+ */
711
+ async getRecoveryVault() {
712
+ return this.contract.read.getRecoveryVault();
713
+ }
714
+ /**
715
+ * apps
716
+ * view
717
+ */
718
+ async apps(arg0, arg1) {
719
+ return this.contract.read.apps([arg0, arg1]);
720
+ }
721
+ /**
722
+ * CORE_NAMESPACE
723
+ * pure
724
+ */
725
+ async CORE_NAMESPACE() {
726
+ return this.contract.read.CORE_NAMESPACE();
727
+ }
728
+ /**
729
+ * allowRecoverability
730
+ * view
731
+ */
732
+ async allowRecoverability(token) {
733
+ return this.contract.read.allowRecoverability([token]);
734
+ }
735
+ /**
736
+ * recoveryVaultAppId
737
+ * view
738
+ */
739
+ async recoveryVaultAppId() {
740
+ return this.contract.read.recoveryVaultAppId();
741
+ }
742
+ /**
743
+ * getInitializationBlock
744
+ * view
745
+ */
746
+ async getInitializationBlock() {
747
+ return this.contract.read.getInitializationBlock();
748
+ }
749
+ /**
750
+ * APP_MANAGER_ROLE
751
+ * view
752
+ */
753
+ async APP_MANAGER_ROLE() {
754
+ return this.contract.read.APP_MANAGER_ROLE();
755
+ }
756
+ /**
757
+ * getApp
758
+ * view
759
+ */
760
+ async getApp(_namespace, _appId) {
761
+ return this.contract.read.getApp([_namespace, _appId]);
762
+ }
763
+ /**
764
+ * APP_BASES_NAMESPACE
765
+ * pure
766
+ */
767
+ async APP_BASES_NAMESPACE() {
768
+ return this.contract.read.APP_BASES_NAMESPACE();
769
+ }
770
+ /**
771
+ * acl
772
+ * view
773
+ */
774
+ async acl() {
775
+ return this.contract.read.acl();
776
+ }
777
+ /**
778
+ * isPetrified
779
+ * view
780
+ */
781
+ async isPetrified() {
782
+ return this.contract.read.isPetrified();
783
+ }
784
+ /**
785
+ * DEFAULT_ACL_APP_ID
786
+ * pure
787
+ */
788
+ async DEFAULT_ACL_APP_ID() {
789
+ return this.contract.read.DEFAULT_ACL_APP_ID();
790
+ }
791
+ /**
792
+ * hasPermission
793
+ * view
794
+ */
795
+ async hasPermission(_who, _where, _what, _how) {
796
+ return this.contract.read.hasPermission([_who, _where, _what, _how]);
797
+ }
798
+ async newAppInstance(...args) {
799
+ if (!this.contract.write) {
800
+ throw new Error('Wallet client is required for write operations');
801
+ }
802
+ return this.contract.write.newAppInstance(args);
803
+ }
804
+ /**
805
+ * initialize
806
+ * nonpayable
807
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
808
+ */
809
+ async initialize(_baseAcl, _permissionsCreator, options) {
810
+ if (!this.contract.write) {
811
+ throw new Error('Wallet client is required for write operations');
812
+ }
813
+ return this.contract.write.initialize([_baseAcl, _permissionsCreator], options);
814
+ }
815
+ /**
816
+ * setRecoveryVaultAppId
817
+ * nonpayable
818
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
819
+ */
820
+ async setRecoveryVaultAppId(_recoveryVaultAppId, options) {
821
+ if (!this.contract.write) {
822
+ throw new Error('Wallet client is required for write operations');
823
+ }
824
+ return this.contract.write.setRecoveryVaultAppId([_recoveryVaultAppId], options);
825
+ }
826
+ async newPinnedAppInstance(...args) {
827
+ if (!this.contract.write) {
828
+ throw new Error('Wallet client is required for write operations');
829
+ }
830
+ return this.contract.write.newPinnedAppInstance(args);
831
+ }
832
+ /**
833
+ * transferToVault
834
+ * nonpayable
835
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
836
+ */
837
+ async transferToVault(_token, options) {
838
+ if (!this.contract.write) {
839
+ throw new Error('Wallet client is required for write operations');
840
+ }
841
+ return this.contract.write.transferToVault([_token], options);
842
+ }
843
+ /**
844
+ * setApp
845
+ * nonpayable
846
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
847
+ */
848
+ async setApp(_namespace, _appId, _app, options) {
849
+ if (!this.contract.write) {
850
+ throw new Error('Wallet client is required for write operations');
851
+ }
852
+ return this.contract.write.setApp([_namespace, _appId, _app], options);
853
+ }
854
+ async newAppProxyPinned(...args) {
855
+ if (!this.contract.write) {
856
+ throw new Error('Wallet client is required for write operations');
857
+ }
858
+ return this.contract.write.newAppProxyPinned(args);
859
+ }
860
+ async newAppProxy(...args) {
861
+ if (!this.contract.write) {
862
+ throw new Error('Wallet client is required for write operations');
863
+ }
864
+ return this.contract.write.newAppProxy(args);
865
+ }
866
+ /**
867
+ * Simulate contract write operations (dry-run without sending transaction)
868
+ *
869
+ * @example
870
+ * const result = await contract.simulate.transfer('0x...', 1000n);
871
+ * console.log('Gas estimate:', result.request.gas);
872
+ * console.log('Would succeed:', result.result);
873
+ */
874
+ get simulate() {
875
+ const contract = this.contract;
876
+ if (!contract.simulate) {
877
+ throw new Error('Public client is required for simulation');
878
+ }
879
+ return {
880
+ /**
881
+ * Simulate newAppInstance
882
+ * Returns gas estimate and result without sending transaction
883
+ * Supports multiple overloads: (bytes32, address, bytes, bool), (bytes32, address)
884
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
885
+ */
886
+ async newAppInstance(...args) {
887
+ return contract.simulate.newAppInstance(args);
888
+ },
889
+ /**
890
+ * Simulate initialize
891
+ * Returns gas estimate and result without sending transaction
892
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
893
+ */
894
+ async initialize(_baseAcl, _permissionsCreator, options) {
895
+ return contract.simulate.initialize([_baseAcl, _permissionsCreator], options);
896
+ },
897
+ /**
898
+ * Simulate setRecoveryVaultAppId
899
+ * Returns gas estimate and result without sending transaction
900
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
901
+ */
902
+ async setRecoveryVaultAppId(_recoveryVaultAppId, options) {
903
+ return contract.simulate.setRecoveryVaultAppId([_recoveryVaultAppId], options);
904
+ },
905
+ /**
906
+ * Simulate newPinnedAppInstance
907
+ * Returns gas estimate and result without sending transaction
908
+ * Supports multiple overloads: (bytes32, address), (bytes32, address, bytes, bool)
909
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
910
+ */
911
+ async newPinnedAppInstance(...args) {
912
+ return contract.simulate.newPinnedAppInstance(args);
913
+ },
914
+ /**
915
+ * Simulate transferToVault
916
+ * Returns gas estimate and result without sending transaction
917
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
918
+ */
919
+ async transferToVault(_token, options) {
920
+ return contract.simulate.transferToVault([_token], options);
921
+ },
922
+ /**
923
+ * Simulate setApp
924
+ * Returns gas estimate and result without sending transaction
925
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
926
+ */
927
+ async setApp(_namespace, _appId, _app, options) {
928
+ return contract.simulate.setApp([_namespace, _appId, _app], options);
929
+ },
930
+ /**
931
+ * Simulate newAppProxyPinned
932
+ * Returns gas estimate and result without sending transaction
933
+ * Supports multiple overloads: (address, bytes32, bytes), (address, bytes32)
934
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
935
+ */
936
+ async newAppProxyPinned(...args) {
937
+ return contract.simulate.newAppProxyPinned(args);
938
+ },
939
+ /**
940
+ * Simulate newAppProxy
941
+ * Returns gas estimate and result without sending transaction
942
+ * Supports multiple overloads: (address, bytes32), (address, bytes32, bytes)
943
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
944
+ */
945
+ async newAppProxy(...args) {
946
+ return contract.simulate.newAppProxy(args);
947
+ }
948
+ };
949
+ }
950
+ /**
951
+ * Watch contract events
952
+ *
953
+ * @example
954
+ * // Watch all Transfer events
955
+ * const unwatch = contract.watch.Transfer((event) => {
956
+ * console.log('Transfer:', event);
957
+ * });
958
+ *
959
+ * // Stop watching
960
+ * unwatch();
961
+ */
962
+ get watch() {
963
+ return {
964
+ /**
965
+ * Watch NewAppProxy events
966
+ * @param callback Function to call when event is emitted
967
+ * @param filter Optional filter for indexed parameters
968
+ * @returns Unwatch function to stop listening
969
+ */
970
+ NewAppProxy: (callback) => {
971
+ return this.publicClient.watchContractEvent({
972
+ address: this.contractAddress,
973
+ abi: exports.Kernel_jsonAbi,
974
+ eventName: 'NewAppProxy',
975
+ onLogs: (logs) => {
976
+ logs.forEach((log) => {
977
+ callback(log.args);
978
+ });
979
+ },
980
+ });
981
+ },
982
+ /**
983
+ * Watch RecoverToVault events
984
+ * @param callback Function to call when event is emitted
985
+ * @param filter Optional filter for indexed parameters
986
+ * @returns Unwatch function to stop listening
987
+ */
988
+ RecoverToVault: (callback, filter) => {
989
+ return this.publicClient.watchContractEvent({
990
+ address: this.contractAddress,
991
+ abi: exports.Kernel_jsonAbi,
992
+ eventName: 'RecoverToVault',
993
+ args: filter,
994
+ onLogs: (logs) => {
995
+ logs.forEach((log) => {
996
+ callback(log.args);
997
+ });
998
+ },
999
+ });
1000
+ },
1001
+ /**
1002
+ * Watch SetApp events
1003
+ * @param callback Function to call when event is emitted
1004
+ * @param filter Optional filter for indexed parameters
1005
+ * @returns Unwatch function to stop listening
1006
+ */
1007
+ SetApp: (callback, filter) => {
1008
+ return this.publicClient.watchContractEvent({
1009
+ address: this.contractAddress,
1010
+ abi: exports.Kernel_jsonAbi,
1011
+ eventName: 'SetApp',
1012
+ args: filter,
1013
+ onLogs: (logs) => {
1014
+ logs.forEach((log) => {
1015
+ callback(log.args);
1016
+ });
1017
+ },
1018
+ });
1019
+ }
1020
+ };
1021
+ }
1022
+ }
1023
+ exports.Kernel_json = Kernel_json;