@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.
@@ -66,6 +66,11 @@ export const Kernel_jsonAbi = [
66
66
  "stateMutability": "nonpayable",
67
67
  "type": "constructor"
68
68
  },
69
+ {
70
+ "inputs": [],
71
+ "name": "AlreadyInitialized",
72
+ "type": "error"
73
+ },
69
74
  {
70
75
  "inputs": [],
71
76
  "name": "EnableNotApproved",
@@ -76,6 +81,17 @@ export const Kernel_jsonAbi = [
76
81
  "name": "ExecutionReverted",
77
82
  "type": "error"
78
83
  },
84
+ {
85
+ "inputs": [
86
+ {
87
+ "internalType": "uint256",
88
+ "name": "idx",
89
+ "type": "uint256"
90
+ }
91
+ ],
92
+ "name": "InitConfigError",
93
+ "type": "error"
94
+ },
79
95
  {
80
96
  "inputs": [],
81
97
  "name": "InvalidCallType",
@@ -116,6 +132,11 @@ export const Kernel_jsonAbi = [
116
132
  "name": "InvalidSelector",
117
133
  "type": "error"
118
134
  },
135
+ {
136
+ "inputs": [],
137
+ "name": "InvalidSelectorData",
138
+ "type": "error"
139
+ },
119
140
  {
120
141
  "inputs": [],
121
142
  "name": "InvalidSignature",
@@ -432,6 +453,34 @@ export const Kernel_jsonAbi = [
432
453
  "stateMutability": "pure",
433
454
  "type": "function"
434
455
  },
456
+ {
457
+ "inputs": [
458
+ {
459
+ "internalType": "ValidationId",
460
+ "name": "_rootValidator",
461
+ "type": "bytes21"
462
+ },
463
+ {
464
+ "internalType": "contract IHook",
465
+ "name": "hook",
466
+ "type": "address"
467
+ },
468
+ {
469
+ "internalType": "bytes",
470
+ "name": "validatorData",
471
+ "type": "bytes"
472
+ },
473
+ {
474
+ "internalType": "bytes",
475
+ "name": "hookData",
476
+ "type": "bytes"
477
+ }
478
+ ],
479
+ "name": "changeRootValidator",
480
+ "outputs": [],
481
+ "stateMutability": "payable",
482
+ "type": "function"
483
+ },
435
484
  {
436
485
  "inputs": [],
437
486
  "name": "currentNonce",
@@ -634,6 +683,29 @@ export const Kernel_jsonAbi = [
634
683
  "stateMutability": "view",
635
684
  "type": "function"
636
685
  },
686
+ {
687
+ "inputs": [
688
+ {
689
+ "internalType": "ValidationId",
690
+ "name": "vId",
691
+ "type": "bytes21"
692
+ },
693
+ {
694
+ "internalType": "bytes4",
695
+ "name": "selector",
696
+ "type": "bytes4"
697
+ },
698
+ {
699
+ "internalType": "bool",
700
+ "name": "allow",
701
+ "type": "bool"
702
+ }
703
+ ],
704
+ "name": "grantAccess",
705
+ "outputs": [],
706
+ "stateMutability": "payable",
707
+ "type": "function"
708
+ },
637
709
  {
638
710
  "inputs": [
639
711
  {
@@ -655,6 +727,11 @@ export const Kernel_jsonAbi = [
655
727
  "internalType": "bytes",
656
728
  "name": "hookData",
657
729
  "type": "bytes"
730
+ },
731
+ {
732
+ "internalType": "bytes[]",
733
+ "name": "initConfig",
734
+ "type": "bytes[]"
658
735
  }
659
736
  ],
660
737
  "name": "initialize",
@@ -800,7 +877,7 @@ export const Kernel_jsonAbi = [
800
877
  },
801
878
  {
802
879
  "internalType": "bytes",
803
- "name": "signature",
880
+ "name": "data",
804
881
  "type": "bytes"
805
882
  }
806
883
  ],
@@ -815,6 +892,118 @@ export const Kernel_jsonAbi = [
815
892
  "stateMutability": "view",
816
893
  "type": "function"
817
894
  },
895
+ {
896
+ "inputs": [
897
+ {
898
+ "internalType": "address",
899
+ "name": "",
900
+ "type": "address"
901
+ },
902
+ {
903
+ "internalType": "address",
904
+ "name": "",
905
+ "type": "address"
906
+ },
907
+ {
908
+ "internalType": "uint256[]",
909
+ "name": "",
910
+ "type": "uint256[]"
911
+ },
912
+ {
913
+ "internalType": "uint256[]",
914
+ "name": "",
915
+ "type": "uint256[]"
916
+ },
917
+ {
918
+ "internalType": "bytes",
919
+ "name": "",
920
+ "type": "bytes"
921
+ }
922
+ ],
923
+ "name": "onERC1155BatchReceived",
924
+ "outputs": [
925
+ {
926
+ "internalType": "bytes4",
927
+ "name": "",
928
+ "type": "bytes4"
929
+ }
930
+ ],
931
+ "stateMutability": "pure",
932
+ "type": "function"
933
+ },
934
+ {
935
+ "inputs": [
936
+ {
937
+ "internalType": "address",
938
+ "name": "",
939
+ "type": "address"
940
+ },
941
+ {
942
+ "internalType": "address",
943
+ "name": "",
944
+ "type": "address"
945
+ },
946
+ {
947
+ "internalType": "uint256",
948
+ "name": "",
949
+ "type": "uint256"
950
+ },
951
+ {
952
+ "internalType": "uint256",
953
+ "name": "",
954
+ "type": "uint256"
955
+ },
956
+ {
957
+ "internalType": "bytes",
958
+ "name": "",
959
+ "type": "bytes"
960
+ }
961
+ ],
962
+ "name": "onERC1155Received",
963
+ "outputs": [
964
+ {
965
+ "internalType": "bytes4",
966
+ "name": "",
967
+ "type": "bytes4"
968
+ }
969
+ ],
970
+ "stateMutability": "pure",
971
+ "type": "function"
972
+ },
973
+ {
974
+ "inputs": [
975
+ {
976
+ "internalType": "address",
977
+ "name": "",
978
+ "type": "address"
979
+ },
980
+ {
981
+ "internalType": "address",
982
+ "name": "",
983
+ "type": "address"
984
+ },
985
+ {
986
+ "internalType": "uint256",
987
+ "name": "",
988
+ "type": "uint256"
989
+ },
990
+ {
991
+ "internalType": "bytes",
992
+ "name": "",
993
+ "type": "bytes"
994
+ }
995
+ ],
996
+ "name": "onERC721Received",
997
+ "outputs": [
998
+ {
999
+ "internalType": "bytes4",
1000
+ "name": "",
1001
+ "type": "bytes4"
1002
+ }
1003
+ ],
1004
+ "stateMutability": "pure",
1005
+ "type": "function"
1006
+ },
818
1007
  {
819
1008
  "inputs": [
820
1009
  {
@@ -851,6 +1040,77 @@ export const Kernel_jsonAbi = [
851
1040
  "stateMutability": "view",
852
1041
  "type": "function"
853
1042
  },
1043
+ {
1044
+ "inputs": [
1045
+ {
1046
+ "components": [
1047
+ {
1048
+ "internalType": "address",
1049
+ "name": "sender",
1050
+ "type": "address"
1051
+ },
1052
+ {
1053
+ "internalType": "uint256",
1054
+ "name": "nonce",
1055
+ "type": "uint256"
1056
+ },
1057
+ {
1058
+ "internalType": "bytes",
1059
+ "name": "initCode",
1060
+ "type": "bytes"
1061
+ },
1062
+ {
1063
+ "internalType": "bytes",
1064
+ "name": "callData",
1065
+ "type": "bytes"
1066
+ },
1067
+ {
1068
+ "internalType": "bytes32",
1069
+ "name": "accountGasLimits",
1070
+ "type": "bytes32"
1071
+ },
1072
+ {
1073
+ "internalType": "uint256",
1074
+ "name": "preVerificationGas",
1075
+ "type": "uint256"
1076
+ },
1077
+ {
1078
+ "internalType": "bytes32",
1079
+ "name": "gasFees",
1080
+ "type": "bytes32"
1081
+ },
1082
+ {
1083
+ "internalType": "bytes",
1084
+ "name": "paymasterAndData",
1085
+ "type": "bytes"
1086
+ },
1087
+ {
1088
+ "internalType": "bytes",
1089
+ "name": "signature",
1090
+ "type": "bytes"
1091
+ }
1092
+ ],
1093
+ "internalType": "struct PackedUserOperation",
1094
+ "name": "userOp",
1095
+ "type": "tuple"
1096
+ },
1097
+ {
1098
+ "internalType": "address",
1099
+ "name": "entryPoint",
1100
+ "type": "address"
1101
+ }
1102
+ ],
1103
+ "name": "replayableUserOpHash",
1104
+ "outputs": [
1105
+ {
1106
+ "internalType": "bytes32",
1107
+ "name": "",
1108
+ "type": "bytes32"
1109
+ }
1110
+ ],
1111
+ "stateMutability": "pure",
1112
+ "type": "function"
1113
+ },
854
1114
  {
855
1115
  "inputs": [],
856
1116
  "name": "rootValidator",
@@ -1265,8 +1525,32 @@ export class Kernel_json {
1265
1525
  * isValidSignature
1266
1526
  * view
1267
1527
  */
1268
- async isValidSignature(hash: `0x${string}`, signature: `0x${string}`): Promise<`0x${string}`> {
1269
- return this.contract.read.isValidSignature([hash, signature] as const) as Promise<`0x${string}`>;
1528
+ async isValidSignature(hash: `0x${string}`, data: `0x${string}`): Promise<`0x${string}`> {
1529
+ return this.contract.read.isValidSignature([hash, data] as const) as Promise<`0x${string}`>;
1530
+ }
1531
+
1532
+ /**
1533
+ * onERC1155BatchReceived
1534
+ * pure
1535
+ */
1536
+ async onERC1155BatchReceived(arg0: `0x${string}`, arg1: `0x${string}`, arg2: bigint[], arg3: bigint[], arg4: `0x${string}`): Promise<`0x${string}`> {
1537
+ return this.contract.read.onERC1155BatchReceived([arg0, arg1, arg2, arg3, arg4] as const) as Promise<`0x${string}`>;
1538
+ }
1539
+
1540
+ /**
1541
+ * onERC1155Received
1542
+ * pure
1543
+ */
1544
+ async onERC1155Received(arg0: `0x${string}`, arg1: `0x${string}`, arg2: bigint, arg3: bigint, arg4: `0x${string}`): Promise<`0x${string}`> {
1545
+ return this.contract.read.onERC1155Received([arg0, arg1, arg2, arg3, arg4] as const) as Promise<`0x${string}`>;
1546
+ }
1547
+
1548
+ /**
1549
+ * onERC721Received
1550
+ * pure
1551
+ */
1552
+ async onERC721Received(arg0: `0x${string}`, arg1: `0x${string}`, arg2: bigint, arg3: `0x${string}`): Promise<`0x${string}`> {
1553
+ return this.contract.read.onERC721Received([arg0, arg1, arg2, arg3] as const) as Promise<`0x${string}`>;
1270
1554
  }
1271
1555
 
1272
1556
  /**
@@ -1277,6 +1561,14 @@ export class Kernel_json {
1277
1561
  return this.contract.read.permissionConfig([pId] as const) as Promise<ValidationManager_PermissionConfig>;
1278
1562
  }
1279
1563
 
1564
+ /**
1565
+ * replayableUserOpHash
1566
+ * pure
1567
+ */
1568
+ async replayableUserOpHash(userOp: PackedUserOperation, entryPoint: `0x${string}`): Promise<`0x${string}`> {
1569
+ return this.contract.read.replayableUserOpHash([userOp, entryPoint] as const) as Promise<`0x${string}`>;
1570
+ }
1571
+
1280
1572
  /**
1281
1573
  * rootValidator
1282
1574
  * view
@@ -1325,6 +1617,29 @@ export class Kernel_json {
1325
1617
  return this.contract.read.validationConfig([vId] as const) as Promise<ValidationManager_ValidationConfig>;
1326
1618
  }
1327
1619
 
1620
+ /**
1621
+ * changeRootValidator
1622
+ * payable
1623
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1624
+ */
1625
+ async changeRootValidator(_rootValidator: `0x${string}`, hook: `0x${string}`, validatorData: `0x${string}`, hookData: `0x${string}`, options?: {
1626
+ accessList?: import('viem').AccessList;
1627
+ authorizationList?: import('viem').AuthorizationList;
1628
+ chain?: import('viem').Chain | null;
1629
+ dataSuffix?: `0x${string}`;
1630
+ gas?: bigint;
1631
+ gasPrice?: bigint;
1632
+ maxFeePerGas?: bigint;
1633
+ maxPriorityFeePerGas?: bigint;
1634
+ nonce?: number;
1635
+ value?: bigint;
1636
+ }): Promise<`0x${string}`> {
1637
+ if (!this.contract.write) {
1638
+ throw new Error('Wallet client is required for write operations');
1639
+ }
1640
+ return this.contract.write.changeRootValidator([_rootValidator, hook, validatorData, hookData] as const, options) as Promise<`0x${string}`>;
1641
+ }
1642
+
1328
1643
  /**
1329
1644
  * execute
1330
1645
  * payable
@@ -1394,12 +1709,35 @@ export class Kernel_json {
1394
1709
  return this.contract.write.executeUserOp([userOp, userOpHash] as const, options) as Promise<`0x${string}`>;
1395
1710
  }
1396
1711
 
1712
+ /**
1713
+ * grantAccess
1714
+ * payable
1715
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1716
+ */
1717
+ async grantAccess(vId: `0x${string}`, selector: `0x${string}`, allow: boolean, options?: {
1718
+ accessList?: import('viem').AccessList;
1719
+ authorizationList?: import('viem').AuthorizationList;
1720
+ chain?: import('viem').Chain | null;
1721
+ dataSuffix?: `0x${string}`;
1722
+ gas?: bigint;
1723
+ gasPrice?: bigint;
1724
+ maxFeePerGas?: bigint;
1725
+ maxPriorityFeePerGas?: bigint;
1726
+ nonce?: number;
1727
+ value?: bigint;
1728
+ }): Promise<`0x${string}`> {
1729
+ if (!this.contract.write) {
1730
+ throw new Error('Wallet client is required for write operations');
1731
+ }
1732
+ return this.contract.write.grantAccess([vId, selector, allow] as const, options) as Promise<`0x${string}`>;
1733
+ }
1734
+
1397
1735
  /**
1398
1736
  * initialize
1399
1737
  * nonpayable
1400
1738
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1401
1739
  */
1402
- async initialize(_rootValidator: `0x${string}`, hook: `0x${string}`, validatorData: `0x${string}`, hookData: `0x${string}`, options?: {
1740
+ async initialize(_rootValidator: `0x${string}`, hook: `0x${string}`, validatorData: `0x${string}`, hookData: `0x${string}`, initConfig: `0x${string}`[], options?: {
1403
1741
  accessList?: import('viem').AccessList;
1404
1742
  authorizationList?: import('viem').AuthorizationList;
1405
1743
  chain?: import('viem').Chain | null;
@@ -1414,7 +1752,7 @@ export class Kernel_json {
1414
1752
  if (!this.contract.write) {
1415
1753
  throw new Error('Wallet client is required for write operations');
1416
1754
  }
1417
- return this.contract.write.initialize([_rootValidator, hook, validatorData, hookData] as const, options) as Promise<`0x${string}`>;
1755
+ return this.contract.write.initialize([_rootValidator, hook, validatorData, hookData, initConfig] as const, options) as Promise<`0x${string}`>;
1418
1756
  }
1419
1757
 
1420
1758
  /**
@@ -1594,6 +1932,25 @@ export class Kernel_json {
1594
1932
  throw new Error('Public client is required for simulation');
1595
1933
  }
1596
1934
  return {
1935
+ /**
1936
+ * Simulate changeRootValidator
1937
+ * Returns gas estimate and result without sending transaction
1938
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
1939
+ */
1940
+ async changeRootValidator(_rootValidator: `0x${string}`, hook: `0x${string}`, validatorData: `0x${string}`, hookData: `0x${string}`, options?: {
1941
+ accessList?: import('viem').AccessList;
1942
+ authorizationList?: import('viem').AuthorizationList;
1943
+ chain?: import('viem').Chain | null;
1944
+ dataSuffix?: `0x${string}`;
1945
+ gas?: bigint;
1946
+ gasPrice?: bigint;
1947
+ maxFeePerGas?: bigint;
1948
+ maxPriorityFeePerGas?: bigint;
1949
+ nonce?: number;
1950
+ value?: bigint;
1951
+ }): Promise<void> {
1952
+ return contract.simulate.changeRootValidator([_rootValidator, hook, validatorData, hookData] as const, options) as Promise<void>;
1953
+ },
1597
1954
  /**
1598
1955
  * Simulate execute
1599
1956
  * Returns gas estimate and result without sending transaction
@@ -1651,12 +2008,31 @@ export class Kernel_json {
1651
2008
  }): Promise<void> {
1652
2009
  return contract.simulate.executeUserOp([userOp, userOpHash] as const, options) as Promise<void>;
1653
2010
  },
2011
+ /**
2012
+ * Simulate grantAccess
2013
+ * Returns gas estimate and result without sending transaction
2014
+ * @param options Optional transaction parameters (value, gas, nonce, etc.)
2015
+ */
2016
+ async grantAccess(vId: `0x${string}`, selector: `0x${string}`, allow: boolean, options?: {
2017
+ accessList?: import('viem').AccessList;
2018
+ authorizationList?: import('viem').AuthorizationList;
2019
+ chain?: import('viem').Chain | null;
2020
+ dataSuffix?: `0x${string}`;
2021
+ gas?: bigint;
2022
+ gasPrice?: bigint;
2023
+ maxFeePerGas?: bigint;
2024
+ maxPriorityFeePerGas?: bigint;
2025
+ nonce?: number;
2026
+ value?: bigint;
2027
+ }): Promise<void> {
2028
+ return contract.simulate.grantAccess([vId, selector, allow] as const, options) as Promise<void>;
2029
+ },
1654
2030
  /**
1655
2031
  * Simulate initialize
1656
2032
  * Returns gas estimate and result without sending transaction
1657
2033
  * @param options Optional transaction parameters (value, gas, nonce, etc.)
1658
2034
  */
1659
- async initialize(_rootValidator: `0x${string}`, hook: `0x${string}`, validatorData: `0x${string}`, hookData: `0x${string}`, options?: {
2035
+ async initialize(_rootValidator: `0x${string}`, hook: `0x${string}`, validatorData: `0x${string}`, hookData: `0x${string}`, initConfig: `0x${string}`[], options?: {
1660
2036
  accessList?: import('viem').AccessList;
1661
2037
  authorizationList?: import('viem').AuthorizationList;
1662
2038
  chain?: import('viem').Chain | null;
@@ -1668,7 +2044,7 @@ export class Kernel_json {
1668
2044
  nonce?: number;
1669
2045
  value?: bigint;
1670
2046
  }): Promise<void> {
1671
- return contract.simulate.initialize([_rootValidator, hook, validatorData, hookData] as const, options) as Promise<void>;
2047
+ return contract.simulate.initialize([_rootValidator, hook, validatorData, hookData, initConfig] as const, options) as Promise<void>;
1672
2048
  },
1673
2049
  /**
1674
2050
  * Simulate installModule
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@gitmyabi/kernel",
3
- "version": "1.0.5",
4
- "description": "Auto-generated TypeScript type bindings for Kernel (build etherscan-kernel-77fcb69c-1788116493709, commit 9534345, branch etherscan)",
3
+ "version": "1.0.9",
4
+ "description": "Auto-generated TypeScript type bindings for Kernel (build etherscan-kernel-f072997f-1789555719236, commit 78ef4ef, branch etherscan)",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
7
7
  "exports": {
@@ -39,5 +39,5 @@
39
39
  "url": "https://github.com/etherscan/kernel"
40
40
  },
41
41
  "branch": "etherscan",
42
- "shortHash": "9534345"
42
+ "shortHash": "78ef4ef"
43
43
  }