@gitmyabi/kernel 1.0.5 → 1.0.9

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.
@@ -19,6 +19,11 @@ exports.Kernel_jsonAbi = [
19
19
  "stateMutability": "nonpayable",
20
20
  "type": "constructor"
21
21
  },
22
+ {
23
+ "inputs": [],
24
+ "name": "AlreadyInitialized",
25
+ "type": "error"
26
+ },
22
27
  {
23
28
  "inputs": [],
24
29
  "name": "EnableNotApproved",
@@ -29,6 +34,17 @@ exports.Kernel_jsonAbi = [
29
34
  "name": "ExecutionReverted",
30
35
  "type": "error"
31
36
  },
37
+ {
38
+ "inputs": [
39
+ {
40
+ "internalType": "uint256",
41
+ "name": "idx",
42
+ "type": "uint256"
43
+ }
44
+ ],
45
+ "name": "InitConfigError",
46
+ "type": "error"
47
+ },
32
48
  {
33
49
  "inputs": [],
34
50
  "name": "InvalidCallType",
@@ -69,6 +85,11 @@ exports.Kernel_jsonAbi = [
69
85
  "name": "InvalidSelector",
70
86
  "type": "error"
71
87
  },
88
+ {
89
+ "inputs": [],
90
+ "name": "InvalidSelectorData",
91
+ "type": "error"
92
+ },
72
93
  {
73
94
  "inputs": [],
74
95
  "name": "InvalidSignature",
@@ -385,6 +406,34 @@ exports.Kernel_jsonAbi = [
385
406
  "stateMutability": "pure",
386
407
  "type": "function"
387
408
  },
409
+ {
410
+ "inputs": [
411
+ {
412
+ "internalType": "ValidationId",
413
+ "name": "_rootValidator",
414
+ "type": "bytes21"
415
+ },
416
+ {
417
+ "internalType": "contract IHook",
418
+ "name": "hook",
419
+ "type": "address"
420
+ },
421
+ {
422
+ "internalType": "bytes",
423
+ "name": "validatorData",
424
+ "type": "bytes"
425
+ },
426
+ {
427
+ "internalType": "bytes",
428
+ "name": "hookData",
429
+ "type": "bytes"
430
+ }
431
+ ],
432
+ "name": "changeRootValidator",
433
+ "outputs": [],
434
+ "stateMutability": "payable",
435
+ "type": "function"
436
+ },
388
437
  {
389
438
  "inputs": [],
390
439
  "name": "currentNonce",
@@ -587,6 +636,29 @@ exports.Kernel_jsonAbi = [
587
636
  "stateMutability": "view",
588
637
  "type": "function"
589
638
  },
639
+ {
640
+ "inputs": [
641
+ {
642
+ "internalType": "ValidationId",
643
+ "name": "vId",
644
+ "type": "bytes21"
645
+ },
646
+ {
647
+ "internalType": "bytes4",
648
+ "name": "selector",
649
+ "type": "bytes4"
650
+ },
651
+ {
652
+ "internalType": "bool",
653
+ "name": "allow",
654
+ "type": "bool"
655
+ }
656
+ ],
657
+ "name": "grantAccess",
658
+ "outputs": [],
659
+ "stateMutability": "payable",
660
+ "type": "function"
661
+ },
590
662
  {
591
663
  "inputs": [
592
664
  {
@@ -608,6 +680,11 @@ exports.Kernel_jsonAbi = [
608
680
  "internalType": "bytes",
609
681
  "name": "hookData",
610
682
  "type": "bytes"
683
+ },
684
+ {
685
+ "internalType": "bytes[]",
686
+ "name": "initConfig",
687
+ "type": "bytes[]"
611
688
  }
612
689
  ],
613
690
  "name": "initialize",
@@ -753,7 +830,7 @@ exports.Kernel_jsonAbi = [
753
830
  },
754
831
  {
755
832
  "internalType": "bytes",
756
- "name": "signature",
833
+ "name": "data",
757
834
  "type": "bytes"
758
835
  }
759
836
  ],
@@ -768,6 +845,118 @@ exports.Kernel_jsonAbi = [
768
845
  "stateMutability": "view",
769
846
  "type": "function"
770
847
  },
848
+ {
849
+ "inputs": [
850
+ {
851
+ "internalType": "address",
852
+ "name": "",
853
+ "type": "address"
854
+ },
855
+ {
856
+ "internalType": "address",
857
+ "name": "",
858
+ "type": "address"
859
+ },
860
+ {
861
+ "internalType": "uint256[]",
862
+ "name": "",
863
+ "type": "uint256[]"
864
+ },
865
+ {
866
+ "internalType": "uint256[]",
867
+ "name": "",
868
+ "type": "uint256[]"
869
+ },
870
+ {
871
+ "internalType": "bytes",
872
+ "name": "",
873
+ "type": "bytes"
874
+ }
875
+ ],
876
+ "name": "onERC1155BatchReceived",
877
+ "outputs": [
878
+ {
879
+ "internalType": "bytes4",
880
+ "name": "",
881
+ "type": "bytes4"
882
+ }
883
+ ],
884
+ "stateMutability": "pure",
885
+ "type": "function"
886
+ },
887
+ {
888
+ "inputs": [
889
+ {
890
+ "internalType": "address",
891
+ "name": "",
892
+ "type": "address"
893
+ },
894
+ {
895
+ "internalType": "address",
896
+ "name": "",
897
+ "type": "address"
898
+ },
899
+ {
900
+ "internalType": "uint256",
901
+ "name": "",
902
+ "type": "uint256"
903
+ },
904
+ {
905
+ "internalType": "uint256",
906
+ "name": "",
907
+ "type": "uint256"
908
+ },
909
+ {
910
+ "internalType": "bytes",
911
+ "name": "",
912
+ "type": "bytes"
913
+ }
914
+ ],
915
+ "name": "onERC1155Received",
916
+ "outputs": [
917
+ {
918
+ "internalType": "bytes4",
919
+ "name": "",
920
+ "type": "bytes4"
921
+ }
922
+ ],
923
+ "stateMutability": "pure",
924
+ "type": "function"
925
+ },
926
+ {
927
+ "inputs": [
928
+ {
929
+ "internalType": "address",
930
+ "name": "",
931
+ "type": "address"
932
+ },
933
+ {
934
+ "internalType": "address",
935
+ "name": "",
936
+ "type": "address"
937
+ },
938
+ {
939
+ "internalType": "uint256",
940
+ "name": "",
941
+ "type": "uint256"
942
+ },
943
+ {
944
+ "internalType": "bytes",
945
+ "name": "",
946
+ "type": "bytes"
947
+ }
948
+ ],
949
+ "name": "onERC721Received",
950
+ "outputs": [
951
+ {
952
+ "internalType": "bytes4",
953
+ "name": "",
954
+ "type": "bytes4"
955
+ }
956
+ ],
957
+ "stateMutability": "pure",
958
+ "type": "function"
959
+ },
771
960
  {
772
961
  "inputs": [
773
962
  {
@@ -804,6 +993,77 @@ exports.Kernel_jsonAbi = [
804
993
  "stateMutability": "view",
805
994
  "type": "function"
806
995
  },
996
+ {
997
+ "inputs": [
998
+ {
999
+ "components": [
1000
+ {
1001
+ "internalType": "address",
1002
+ "name": "sender",
1003
+ "type": "address"
1004
+ },
1005
+ {
1006
+ "internalType": "uint256",
1007
+ "name": "nonce",
1008
+ "type": "uint256"
1009
+ },
1010
+ {
1011
+ "internalType": "bytes",
1012
+ "name": "initCode",
1013
+ "type": "bytes"
1014
+ },
1015
+ {
1016
+ "internalType": "bytes",
1017
+ "name": "callData",
1018
+ "type": "bytes"
1019
+ },
1020
+ {
1021
+ "internalType": "bytes32",
1022
+ "name": "accountGasLimits",
1023
+ "type": "bytes32"
1024
+ },
1025
+ {
1026
+ "internalType": "uint256",
1027
+ "name": "preVerificationGas",
1028
+ "type": "uint256"
1029
+ },
1030
+ {
1031
+ "internalType": "bytes32",
1032
+ "name": "gasFees",
1033
+ "type": "bytes32"
1034
+ },
1035
+ {
1036
+ "internalType": "bytes",
1037
+ "name": "paymasterAndData",
1038
+ "type": "bytes"
1039
+ },
1040
+ {
1041
+ "internalType": "bytes",
1042
+ "name": "signature",
1043
+ "type": "bytes"
1044
+ }
1045
+ ],
1046
+ "internalType": "struct PackedUserOperation",
1047
+ "name": "userOp",
1048
+ "type": "tuple"
1049
+ },
1050
+ {
1051
+ "internalType": "address",
1052
+ "name": "entryPoint",
1053
+ "type": "address"
1054
+ }
1055
+ ],
1056
+ "name": "replayableUserOpHash",
1057
+ "outputs": [
1058
+ {
1059
+ "internalType": "bytes32",
1060
+ "name": "",
1061
+ "type": "bytes32"
1062
+ }
1063
+ ],
1064
+ "stateMutability": "pure",
1065
+ "type": "function"
1066
+ },
807
1067
  {
808
1068
  "inputs": [],
809
1069
  "name": "rootValidator",
@@ -1185,8 +1445,29 @@ class Kernel_json {
1185
1445
  * isValidSignature
1186
1446
  * view
1187
1447
  */
1188
- async isValidSignature(hash, signature) {
1189
- return this.contract.read.isValidSignature([hash, signature]);
1448
+ async isValidSignature(hash, data) {
1449
+ return this.contract.read.isValidSignature([hash, data]);
1450
+ }
1451
+ /**
1452
+ * onERC1155BatchReceived
1453
+ * pure
1454
+ */
1455
+ async onERC1155BatchReceived(arg0, arg1, arg2, arg3, arg4) {
1456
+ return this.contract.read.onERC1155BatchReceived([arg0, arg1, arg2, arg3, arg4]);
1457
+ }
1458
+ /**
1459
+ * onERC1155Received
1460
+ * pure
1461
+ */
1462
+ async onERC1155Received(arg0, arg1, arg2, arg3, arg4) {
1463
+ return this.contract.read.onERC1155Received([arg0, arg1, arg2, arg3, arg4]);
1464
+ }
1465
+ /**
1466
+ * onERC721Received
1467
+ * pure
1468
+ */
1469
+ async onERC721Received(arg0, arg1, arg2, arg3) {
1470
+ return this.contract.read.onERC721Received([arg0, arg1, arg2, arg3]);
1190
1471
  }
1191
1472
  /**
1192
1473
  * permissionConfig
@@ -1195,6 +1476,13 @@ class Kernel_json {
1195
1476
  async permissionConfig(pId) {
1196
1477
  return this.contract.read.permissionConfig([pId]);
1197
1478
  }
1479
+ /**
1480
+ * replayableUserOpHash
1481
+ * pure
1482
+ */
1483
+ async replayableUserOpHash(userOp, entryPoint) {
1484
+ return this.contract.read.replayableUserOpHash([userOp, entryPoint]);
1485
+ }
1198
1486
  /**
1199
1487
  * rootValidator
1200
1488
  * view
@@ -1237,6 +1525,17 @@ class Kernel_json {
1237
1525
  async validationConfig(vId) {
1238
1526
  return this.contract.read.validationConfig([vId]);
1239
1527
  }
1528
+ /**
1529
+ * changeRootValidator
1530
+ * payable
1531
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1532
+ */
1533
+ async changeRootValidator(_rootValidator, hook, validatorData, hookData, options) {
1534
+ if (!this.contract.write) {
1535
+ throw new Error('Wallet client is required for write operations');
1536
+ }
1537
+ return this.contract.write.changeRootValidator([_rootValidator, hook, validatorData, hookData], options);
1538
+ }
1240
1539
  /**
1241
1540
  * execute
1242
1541
  * payable
@@ -1270,16 +1569,27 @@ class Kernel_json {
1270
1569
  }
1271
1570
  return this.contract.write.executeUserOp([userOp, userOpHash], options);
1272
1571
  }
1572
+ /**
1573
+ * grantAccess
1574
+ * payable
1575
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1576
+ */
1577
+ async grantAccess(vId, selector, allow, options) {
1578
+ if (!this.contract.write) {
1579
+ throw new Error('Wallet client is required for write operations');
1580
+ }
1581
+ return this.contract.write.grantAccess([vId, selector, allow], options);
1582
+ }
1273
1583
  /**
1274
1584
  * initialize
1275
1585
  * nonpayable
1276
1586
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1277
1587
  */
1278
- async initialize(_rootValidator, hook, validatorData, hookData, options) {
1588
+ async initialize(_rootValidator, hook, validatorData, hookData, initConfig, options) {
1279
1589
  if (!this.contract.write) {
1280
1590
  throw new Error('Wallet client is required for write operations');
1281
1591
  }
1282
- return this.contract.write.initialize([_rootValidator, hook, validatorData, hookData], options);
1592
+ return this.contract.write.initialize([_rootValidator, hook, validatorData, hookData, initConfig], options);
1283
1593
  }
1284
1594
  /**
1285
1595
  * installModule
@@ -1372,6 +1682,14 @@ class Kernel_json {
1372
1682
  throw new Error('Public client is required for simulation');
1373
1683
  }
1374
1684
  return {
1685
+ /**
1686
+ * Simulate changeRootValidator
1687
+ * Returns gas estimate and result without sending transaction
1688
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1689
+ */
1690
+ async changeRootValidator(_rootValidator, hook, validatorData, hookData, options) {
1691
+ return contract.simulate.changeRootValidator([_rootValidator, hook, validatorData, hookData], options);
1692
+ },
1375
1693
  /**
1376
1694
  * Simulate execute
1377
1695
  * Returns gas estimate and result without sending transaction
@@ -1396,13 +1714,21 @@ class Kernel_json {
1396
1714
  async executeUserOp(userOp, userOpHash, options) {
1397
1715
  return contract.simulate.executeUserOp([userOp, userOpHash], options);
1398
1716
  },
1717
+ /**
1718
+ * Simulate grantAccess
1719
+ * Returns gas estimate and result without sending transaction
1720
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1721
+ */
1722
+ async grantAccess(vId, selector, allow, options) {
1723
+ return contract.simulate.grantAccess([vId, selector, allow], options);
1724
+ },
1399
1725
  /**
1400
1726
  * Simulate initialize
1401
1727
  * Returns gas estimate and result without sending transaction
1402
1728
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1403
1729
  */
1404
- async initialize(_rootValidator, hook, validatorData, hookData, options) {
1405
- return contract.simulate.initialize([_rootValidator, hook, validatorData, hookData], options);
1730
+ async initialize(_rootValidator, hook, validatorData, hookData, initConfig, options) {
1731
+ return contract.simulate.initialize([_rootValidator, hook, validatorData, hookData, initConfig], options);
1406
1732
  },
1407
1733
  /**
1408
1734
  * Simulate installModule