@zerodev/sdk 5.2.1-alpha-5 → 5.2.1-alpha-6

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.
Files changed (50) hide show
  1. package/_cjs/accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryAbi.js +39 -0
  2. package/_cjs/accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryAbi.js.map +1 -0
  3. package/_cjs/accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryStakerAbi.js +203 -0
  4. package/_cjs/accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryStakerAbi.js.map +1 -0
  5. package/_cjs/accounts/kernel/createKernelAccount.js +35 -10
  6. package/_cjs/accounts/kernel/createKernelAccount.js.map +1 -1
  7. package/_cjs/actions/paymaster/estimateGasInERC20.js +2 -2
  8. package/_cjs/actions/paymaster/estimateGasInERC20.js.map +1 -1
  9. package/_cjs/clients/kernelAccountClient.js +3 -4
  10. package/_cjs/clients/kernelAccountClient.js.map +1 -1
  11. package/_cjs/constants.js +1 -1
  12. package/_cjs/index.js +5 -1
  13. package/_cjs/index.js.map +1 -1
  14. package/_cjs/utils.js +1 -2
  15. package/_cjs/utils.js.map +1 -1
  16. package/_esm/accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryAbi.js +36 -0
  17. package/_esm/accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryAbi.js.map +1 -0
  18. package/_esm/accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryStakerAbi.js +200 -0
  19. package/_esm/accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryStakerAbi.js.map +1 -0
  20. package/_esm/accounts/kernel/createKernelAccount.js +36 -11
  21. package/_esm/accounts/kernel/createKernelAccount.js.map +1 -1
  22. package/_esm/actions/paymaster/estimateGasInERC20.js +2 -2
  23. package/_esm/actions/paymaster/estimateGasInERC20.js.map +1 -1
  24. package/_esm/clients/kernelAccountClient.js +3 -4
  25. package/_esm/clients/kernelAccountClient.js.map +1 -1
  26. package/_esm/constants.js +1 -1
  27. package/_esm/index.js +2 -0
  28. package/_esm/index.js.map +1 -1
  29. package/_esm/utils.js +2 -3
  30. package/_esm/utils.js.map +1 -1
  31. package/_types/accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryAbi.d.ts +60 -0
  32. package/_types/accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryAbi.d.ts.map +1 -0
  33. package/_types/accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryStakerAbi.d.ts +215 -0
  34. package/_types/accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryStakerAbi.d.ts.map +1 -0
  35. package/_types/accounts/kernel/createKernelAccount.d.ts +5 -3
  36. package/_types/accounts/kernel/createKernelAccount.d.ts.map +1 -1
  37. package/_types/actions/paymaster/estimateGasInERC20.d.ts.map +1 -1
  38. package/_types/clients/kernelAccountClient.d.ts.map +1 -1
  39. package/_types/index.d.ts +2 -0
  40. package/_types/index.d.ts.map +1 -1
  41. package/_types/utils.d.ts.map +1 -1
  42. package/accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryAbi.ts +35 -0
  43. package/accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryStakerAbi.ts +199 -0
  44. package/accounts/kernel/createKernelAccount.ts +45 -12
  45. package/actions/paymaster/estimateGasInERC20.ts +2 -3
  46. package/clients/kernelAccountClient.ts +3 -4
  47. package/constants.ts +1 -1
  48. package/index.ts +2 -0
  49. package/package.json +1 -1
  50. package/utils.ts +2 -3
@@ -0,0 +1,215 @@
1
+ export declare const KernelFactoryStakerAbi: readonly [{
2
+ readonly type: "constructor";
3
+ readonly inputs: readonly [{
4
+ readonly name: "_owner";
5
+ readonly type: "address";
6
+ readonly internalType: "address";
7
+ }];
8
+ readonly stateMutability: "nonpayable";
9
+ }, {
10
+ readonly type: "function";
11
+ readonly name: "approveFactory";
12
+ readonly inputs: readonly [{
13
+ readonly name: "factory";
14
+ readonly type: "address";
15
+ readonly internalType: "contract KernelFactory";
16
+ }, {
17
+ readonly name: "approval";
18
+ readonly type: "bool";
19
+ readonly internalType: "bool";
20
+ }];
21
+ readonly outputs: readonly [];
22
+ readonly stateMutability: "payable";
23
+ }, {
24
+ readonly type: "function";
25
+ readonly name: "approved";
26
+ readonly inputs: readonly [{
27
+ readonly name: "";
28
+ readonly type: "address";
29
+ readonly internalType: "contract KernelFactory";
30
+ }];
31
+ readonly outputs: readonly [{
32
+ readonly name: "";
33
+ readonly type: "bool";
34
+ readonly internalType: "bool";
35
+ }];
36
+ readonly stateMutability: "view";
37
+ }, {
38
+ readonly type: "function";
39
+ readonly name: "cancelOwnershipHandover";
40
+ readonly inputs: readonly [];
41
+ readonly outputs: readonly [];
42
+ readonly stateMutability: "payable";
43
+ }, {
44
+ readonly type: "function";
45
+ readonly name: "completeOwnershipHandover";
46
+ readonly inputs: readonly [{
47
+ readonly name: "pendingOwner";
48
+ readonly type: "address";
49
+ readonly internalType: "address";
50
+ }];
51
+ readonly outputs: readonly [];
52
+ readonly stateMutability: "payable";
53
+ }, {
54
+ readonly type: "function";
55
+ readonly name: "deployWithFactory";
56
+ readonly inputs: readonly [{
57
+ readonly name: "factory";
58
+ readonly type: "address";
59
+ readonly internalType: "contract KernelFactory";
60
+ }, {
61
+ readonly name: "createData";
62
+ readonly type: "bytes";
63
+ readonly internalType: "bytes";
64
+ }, {
65
+ readonly name: "salt";
66
+ readonly type: "bytes32";
67
+ readonly internalType: "bytes32";
68
+ }];
69
+ readonly outputs: readonly [{
70
+ readonly name: "";
71
+ readonly type: "address";
72
+ readonly internalType: "address";
73
+ }];
74
+ readonly stateMutability: "payable";
75
+ }, {
76
+ readonly type: "function";
77
+ readonly name: "owner";
78
+ readonly inputs: readonly [];
79
+ readonly outputs: readonly [{
80
+ readonly name: "result";
81
+ readonly type: "address";
82
+ readonly internalType: "address";
83
+ }];
84
+ readonly stateMutability: "view";
85
+ }, {
86
+ readonly type: "function";
87
+ readonly name: "ownershipHandoverExpiresAt";
88
+ readonly inputs: readonly [{
89
+ readonly name: "pendingOwner";
90
+ readonly type: "address";
91
+ readonly internalType: "address";
92
+ }];
93
+ readonly outputs: readonly [{
94
+ readonly name: "result";
95
+ readonly type: "uint256";
96
+ readonly internalType: "uint256";
97
+ }];
98
+ readonly stateMutability: "view";
99
+ }, {
100
+ readonly type: "function";
101
+ readonly name: "renounceOwnership";
102
+ readonly inputs: readonly [];
103
+ readonly outputs: readonly [];
104
+ readonly stateMutability: "payable";
105
+ }, {
106
+ readonly type: "function";
107
+ readonly name: "requestOwnershipHandover";
108
+ readonly inputs: readonly [];
109
+ readonly outputs: readonly [];
110
+ readonly stateMutability: "payable";
111
+ }, {
112
+ readonly type: "function";
113
+ readonly name: "stake";
114
+ readonly inputs: readonly [{
115
+ readonly name: "entryPoint";
116
+ readonly type: "address";
117
+ readonly internalType: "contract IEntryPoint";
118
+ }, {
119
+ readonly name: "unstakeDelay";
120
+ readonly type: "uint32";
121
+ readonly internalType: "uint32";
122
+ }];
123
+ readonly outputs: readonly [];
124
+ readonly stateMutability: "payable";
125
+ }, {
126
+ readonly type: "function";
127
+ readonly name: "transferOwnership";
128
+ readonly inputs: readonly [{
129
+ readonly name: "newOwner";
130
+ readonly type: "address";
131
+ readonly internalType: "address";
132
+ }];
133
+ readonly outputs: readonly [];
134
+ readonly stateMutability: "payable";
135
+ }, {
136
+ readonly type: "function";
137
+ readonly name: "unlockStake";
138
+ readonly inputs: readonly [{
139
+ readonly name: "entryPoint";
140
+ readonly type: "address";
141
+ readonly internalType: "contract IEntryPoint";
142
+ }];
143
+ readonly outputs: readonly [];
144
+ readonly stateMutability: "payable";
145
+ }, {
146
+ readonly type: "function";
147
+ readonly name: "withdrawStake";
148
+ readonly inputs: readonly [{
149
+ readonly name: "entryPoint";
150
+ readonly type: "address";
151
+ readonly internalType: "contract IEntryPoint";
152
+ }, {
153
+ readonly name: "recipient";
154
+ readonly type: "address";
155
+ readonly internalType: "address payable";
156
+ }];
157
+ readonly outputs: readonly [];
158
+ readonly stateMutability: "payable";
159
+ }, {
160
+ readonly type: "event";
161
+ readonly name: "OwnershipHandoverCanceled";
162
+ readonly inputs: readonly [{
163
+ readonly name: "pendingOwner";
164
+ readonly type: "address";
165
+ readonly indexed: true;
166
+ readonly internalType: "address";
167
+ }];
168
+ readonly anonymous: false;
169
+ }, {
170
+ readonly type: "event";
171
+ readonly name: "OwnershipHandoverRequested";
172
+ readonly inputs: readonly [{
173
+ readonly name: "pendingOwner";
174
+ readonly type: "address";
175
+ readonly indexed: true;
176
+ readonly internalType: "address";
177
+ }];
178
+ readonly anonymous: false;
179
+ }, {
180
+ readonly type: "event";
181
+ readonly name: "OwnershipTransferred";
182
+ readonly inputs: readonly [{
183
+ readonly name: "oldOwner";
184
+ readonly type: "address";
185
+ readonly indexed: true;
186
+ readonly internalType: "address";
187
+ }, {
188
+ readonly name: "newOwner";
189
+ readonly type: "address";
190
+ readonly indexed: true;
191
+ readonly internalType: "address";
192
+ }];
193
+ readonly anonymous: false;
194
+ }, {
195
+ readonly type: "error";
196
+ readonly name: "AlreadyInitialized";
197
+ readonly inputs: readonly [];
198
+ }, {
199
+ readonly type: "error";
200
+ readonly name: "NewOwnerIsZeroAddress";
201
+ readonly inputs: readonly [];
202
+ }, {
203
+ readonly type: "error";
204
+ readonly name: "NoHandoverRequest";
205
+ readonly inputs: readonly [];
206
+ }, {
207
+ readonly type: "error";
208
+ readonly name: "NotApprovedFactory";
209
+ readonly inputs: readonly [];
210
+ }, {
211
+ readonly type: "error";
212
+ readonly name: "Unauthorized";
213
+ readonly inputs: readonly [];
214
+ }];
215
+ //# sourceMappingURL=KernelFactoryStakerAbi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KernelFactoryStakerAbi.d.ts","sourceRoot":"","sources":["../../../../../accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryStakerAbi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsMzB,CAAA"}
@@ -14,6 +14,7 @@ export type CreateKernelAccountParameters<entryPoint extends EntryPoint> = {
14
14
  index?: bigint;
15
15
  factoryAddress?: Address;
16
16
  accountLogicAddress?: Address;
17
+ factoryStakerAddress?: Address;
17
18
  deployedAccountAddress?: Address;
18
19
  };
19
20
  /**
@@ -22,8 +23,9 @@ export type CreateKernelAccountParameters<entryPoint extends EntryPoint> = {
22
23
  export declare const KERNEL_ADDRESSES: {
23
24
  ACCOUNT_LOGIC_V0_6: Address;
24
25
  ACCOUNT_LOGIC_V0_7: Address;
25
- FACTORY_ADDRESS: Address;
26
- ENTRYPOINT_V0_6: Address;
26
+ FACTORY_ADDRESS_V0_6: Address;
27
+ FACTORY_ADDRESS_V0_7: Address;
28
+ FACTORY_STAKER: Address;
27
29
  };
28
30
  /**
29
31
  * Build a kernel smart account from a private key, that use the ECDSA signer behind the scene
@@ -36,5 +38,5 @@ export declare const KERNEL_ADDRESSES: {
36
38
  * @param ecdsaValidatorAddress
37
39
  * @param deployedAccountAddress
38
40
  */
39
- export declare function createKernelAccount<entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain, undefined>, { plugins, entryPoint: entryPointAddress, index, factoryAddress, accountLogicAddress, deployedAccountAddress }: CreateKernelAccountParameters<entryPoint>): Promise<KernelSmartAccount<entryPoint, TTransport, TChain>>;
41
+ export declare function createKernelAccount<entryPoint extends EntryPoint, TTransport extends Transport = Transport, TChain extends Chain | undefined = Chain | undefined>(client: Client<TTransport, TChain, undefined>, { plugins, entryPoint: entryPointAddress, index, factoryAddress, accountLogicAddress, factoryStakerAddress, deployedAccountAddress }: CreateKernelAccountParameters<entryPoint>): Promise<KernelSmartAccount<entryPoint, TTransport, TChain>>;
40
42
  //# sourceMappingURL=createKernelAccount.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"createKernelAccount.d.ts","sourceRoot":"","sources":["../../../accounts/kernel/createKernelAccount.ts"],"names":[],"mappings":"AAMA,OAAO,EAEH,KAAK,YAAY,EAEpB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAGR,UAAU,EACb,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,SAAS,EASjB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EACR,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EAC5B,MAAM,uBAAuB,CAAA;AAgB9B,MAAM,MAAM,kBAAkB,CAC1B,UAAU,SAAS,UAAU,EAC7B,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IACnD,YAAY,CAAC,UAAU,EAAE,oBAAoB,EAAE,SAAS,EAAE,KAAK,CAAC,GAAG;IACnE,mBAAmB,EAAE,mBAAmB,CAAC,UAAU,CAAC,CAAA;IACpD,QAAQ,EAAE,CAAC,cAAc,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;IACtD,gBAAgB,EAAE,MAAM,OAAO,CAAC,GAAG,CAAC,CAAA;IACpC,cAAc,EAAE,CAAC,IAAI,EAAE,wBAAwB,KAAK,OAAO,CAAC,GAAG,CAAC,CAAA;CACnE,CAAA;AAED,MAAM,MAAM,6BAA6B,CAAC,UAAU,SAAS,UAAU,IAAI;IACvE,OAAO,EACD,IAAI,CAAC,yBAAyB,CAAC,UAAU,CAAC,EAAE,YAAY,CAAC,GACzD,mBAAmB,CAAC,UAAU,CAAC,CAAA;IACrC,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,sBAAsB,CAAC,EAAE,OAAO,CAAA;CACnC,CAAA;AAqCD;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE;IAC3B,kBAAkB,EAAE,OAAO,CAAA;IAC3B,kBAAkB,EAAE,OAAO,CAAA;IAC3B,eAAe,EAAE,OAAO,CAAA;IACxB,eAAe,EAAE,OAAO,CAAA;CAM3B,CAAA;AAwGD;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CACrC,UAAU,SAAS,UAAU,EAC7B,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,EAC7C,EACI,OAAO,EACP,UAAU,EAAE,iBAAiB,EAC7B,KAAU,EACV,cAAiD,EACjD,mBAAyD,EACzD,sBAAsB,EACzB,EAAE,6BAA6B,CAAC,UAAU,CAAC,GAC7C,OAAO,CAAC,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAyN7D"}
1
+ {"version":3,"file":"createKernelAccount.d.ts","sourceRoot":"","sources":["../../../accounts/kernel/createKernelAccount.ts"],"names":[],"mappings":"AAMA,OAAO,EAEH,KAAK,YAAY,EAEpB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAGR,UAAU,EACb,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,SAAS,EAUjB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EACR,wBAAwB,EACxB,mBAAmB,EACnB,yBAAyB,EAC5B,MAAM,uBA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AAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EAEpD,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,EAC7C,EACI,OAAO,EACP,UAAU,EAAE,iBAAiB,EAC7B,KAAU,EACV,cAAsD,EACtD,mBAAyD,EACzD,oBAAsD,EACtD,sBAAsB,EACzB,EAAE,6BAA6B,CAAC,UAAU,CAAC,GAC7C,OAAO,CAAC,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CAkO7D"}
@@ -1 +1 @@
1
- {"version":3,"file":"estimateGasInERC20.d.ts","sourceRoot":"","sources":["../../../actions/paymaster/estimateGasInERC20.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EACR,aAAa,EAEhB,MAAM,uCAAuC,CAAA;AAE9C,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AAExC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAA;AAE9E,MAAM,MAAM,4BAA4B,GAAG;IACvC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IACpC,eAAe,EAAE,GAAG,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IACxC,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACvC,MAAM,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,kBAAkB,oFAErB,4BAA4B,KACnC,QAAQ,4BAA4B,CAyBtC,CAAA"}
1
+ {"version":3,"file":"estimateGasInERC20.d.ts","sourceRoot":"","sources":["../../../actions/paymaster/estimateGasInERC20.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EACR,aAAa,EAEhB,MAAM,uCAAuC,CAAA;AAE9C,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAA;AACxC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAA;AAE9E,MAAM,MAAM,4BAA4B,GAAG;IACvC,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC,CAAA;IACpC,eAAe,EAAE,GAAG,CAAA;IACpB,UAAU,CAAC,EAAE,OAAO,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,6BAA6B,GAAG;IACxC,eAAe,EAAE,MAAM,CAAA;IACvB,aAAa,EAAE,MAAM,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,4BAA4B,GAAG;IACvC,MAAM,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;GAEG;AAEH,eAAO,MAAM,kBAAkB,oFAErB,4BAA4B,KACnC,QAAQ,4BAA4B,CAwBtC,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"kernelAccountClient.d.ts","sourceRoot":"","sources":["../../clients/kernelAccountClient.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAA;AACrE,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAA;AAChE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAA;AACpE,OAAO,EACH,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,YAAY,EACjB,KAAK,SAAS,EAEjB,MAAM,MAAM,CAAA;AACb,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAE9D,OAAO,EACH,KAAK,0BAA0B,EAElC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,SAAS,UAAU,EAC7B,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACnD,OAAO,SAAS,YAAY,CAAC,UAAU,CAAC,GAAG,SAAS,GAC9C,YAAY,CAAC,UAAU,CAAC,GACxB,SAAS,IACf,QAAQ,CACR,IAAI,CACA,YAAY,CAAC,SAAS,EAAE,KAAK,EAAE,OAAO,CAAC,EACvC,WAAW,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,iBAAiB,CAC7D,GAAG;IACA,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,gBAAgB,EAAE,SAAS,CAAA;CAC9B,GAAG,UAAU,CAAC,UAAU,CAAC,GAAG;IACrB,UAAU,EAAE,UAAU,CAAA;CACzB,CACR,CAAA;AAED,eAAO,MAAM,yBAAyB;;;;;;;sBANZ,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDlC,CAAA"}
package/_types/index.d.ts CHANGED
@@ -7,6 +7,8 @@ export { type KernelValidator, type ZeroDevPaymasterRpcSchema, type KernelPlugin
7
7
  export { KernelAccountAbi } from "./accounts/kernel/abi/KernelAccountAbi.js";
8
8
  export { KernelFactoryAbi } from "./accounts/kernel/abi/KernelFactoryAbi.js";
9
9
  export { KernelV3AccountAbi, KernelV3ExecuteAbi, KernelV3InitAbi } from "./accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.js";
10
+ export { KernelV3FactoryAbi } from "./accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryAbi.js";
11
+ export { KernelFactoryStakerAbi } from "./accounts/kernel/abi/kernel_v_3_0_0/KernelFactoryStakerAbi.js";
10
12
  export { TokenActionsAbi } from "./accounts/kernel/abi/TokenActionsAbi.js";
11
13
  export * as constants from "./constants.js";
12
14
  export * from "./utils.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,mBAAmB,EACnB,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,kBAAkB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,UAAU,EACb,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EACH,oBAAoB,EACpB,KAAK,8BAA8B,EACnC,KAAK,8BAA8B,EACtC,MAAM,6CAA6C,CAAA;AACpD,OAAO,EACH,uBAAuB,EACvB,KAAK,6BAA6B,EAClC,0BAA0B,EAC1B,KAAK,0BAA0B,EAClC,MAAM,gCAAgC,CAAA;AACvC,OAAO,EACH,4BAA4B,EAC5B,KAAK,sBAAsB,EAC9B,MAAM,8BAA8B,CAAA;AACrC,OAAO,EACH,yBAAyB,EACzB,KAAK,mBAAmB,EAC3B,MAAM,kCAAkC,CAAA;AACzC,OAAO,EACH,KAAK,eAAe,EACpB,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EAC3B,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAA;AAC5E,OAAO,EACH,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EAClB,MAAM,0DAA0D,CAAA;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAA;AAC1E,OAAO,KAAK,SAAS,MAAM,g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AC1E,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAA;AAC3C,cAAc,YAAY,CAAA;AAC1B,OAAO,EAAE,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAChF,OAAO,EACH,sBAAsB,EACtB,2BAA2B,EAC9B,MAAM,2BAA2B,CAAA;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAEjE,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,GAAG,EASX,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAC1E,OAAO,EACH,SAAS,EACT,SAAS,EAGZ,MAAM,gBAAgB,CAAA;AAEvB,eAAO,MAAM,gBAAgB,8EAEZ,OAAO,KACrB,MAQF,CAAA;AAED,oBAAY,eAAe;IACvB,mBAAmB,wBAAwB;IAC3C,sBAAsB,2BAA2B;IACjD,qCAAqC,0CAA0C;CAClF;AAQD,eAAO,MAAM,gBAAgB,YAChB,eAAe,WACf,MAAM,KAChB,OAMF,CAAA;AAED,eAAO,MAAM,4BAA4B,WAC7B,uBAAuB,UAAU,CAAC;cAK5B,OAAO;mBACF,MAAM;MAE1B,QAAQ;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,GAAG,CAAA;CAAE,CAmBnD,CAAA;AAED,eAAO,MAAM,aAAa,QAAS,GAAG,KAAG,GAaxC,CAAA;AAED,eAAO,MAAM,WAAW;cAIV,SAAS;cACT,SAAS;MACnB,GAQH,CAAA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AAEjE,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,GAAG,EASX,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAA;AAC1E,OAAO,EACH,SAAS,EACT,SAAS,EAGZ,MAAM,gBAAgB,CAAA;AAEvB,eAAO,MAAM,gBAAgB,8EAEZ,OAAO,KACrB,MAQF,CAAA;AAED,oBAAY,eAAe;IACvB,mBAAmB,wBAAwB;IAC3C,sBAAsB,2BAA2B;IACjD,qCAAqC,0CAA0C;CAClF;AAQD,eAAO,MAAM,gBAAgB,YAChB,eAAe,WACf,MAAM,KAChB,OAMF,CAAA;AAED,eAAO,MAAM,4BAA4B,WAC7B,uBAAuB,UAAU,CAAC;cAK5B,OAAO;mBACF,MAAM;MAE1B,QAAQ;IAAE,EAAE,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,GAAG,CAAA;CAAE,CAmBnD,CAAA;AAED,eAAO,MAAM,aAAa,QAAS,GAAG,KAAG,GAaxC,CAAA;AAED,eAAO,MAAM,WAAW;cAIV,SAAS;cACT,SAAS;MACnB,GAQH,CAAA"}
@@ -0,0 +1,35 @@
1
+ export const KernelV3FactoryAbi = [
2
+ {
3
+ type: "constructor",
4
+ inputs: [{ name: "_impl", type: "address", internalType: "address" }],
5
+ stateMutability: "nonpayable"
6
+ },
7
+ {
8
+ type: "function",
9
+ name: "createAccount",
10
+ inputs: [
11
+ { name: "data", type: "bytes", internalType: "bytes" },
12
+ { name: "salt", type: "bytes32", internalType: "bytes32" }
13
+ ],
14
+ outputs: [{ name: "", type: "address", internalType: "address" }],
15
+ stateMutability: "payable"
16
+ },
17
+ {
18
+ type: "function",
19
+ name: "getAddress",
20
+ inputs: [
21
+ { name: "data", type: "bytes", internalType: "bytes" },
22
+ { name: "salt", type: "bytes32", internalType: "bytes32" }
23
+ ],
24
+ outputs: [{ name: "", type: "address", internalType: "address" }],
25
+ stateMutability: "view"
26
+ },
27
+ {
28
+ type: "function",
29
+ name: "implementation",
30
+ inputs: [],
31
+ outputs: [{ name: "", type: "address", internalType: "address" }],
32
+ stateMutability: "view"
33
+ },
34
+ { type: "error", name: "InitializeError", inputs: [] }
35
+ ] as const
@@ -0,0 +1,199 @@
1
+ export const KernelFactoryStakerAbi = [
2
+ {
3
+ type: "constructor",
4
+ inputs: [{ name: "_owner", type: "address", internalType: "address" }],
5
+ stateMutability: "nonpayable"
6
+ },
7
+ {
8
+ type: "function",
9
+ name: "approveFactory",
10
+ inputs: [
11
+ {
12
+ name: "factory",
13
+ type: "address",
14
+ internalType: "contract KernelFactory"
15
+ },
16
+ { name: "approval", type: "bool", internalType: "bool" }
17
+ ],
18
+ outputs: [],
19
+ stateMutability: "payable"
20
+ },
21
+ {
22
+ type: "function",
23
+ name: "approved",
24
+ inputs: [
25
+ {
26
+ name: "",
27
+ type: "address",
28
+ internalType: "contract KernelFactory"
29
+ }
30
+ ],
31
+ outputs: [{ name: "", type: "bool", internalType: "bool" }],
32
+ stateMutability: "view"
33
+ },
34
+ {
35
+ type: "function",
36
+ name: "cancelOwnershipHandover",
37
+ inputs: [],
38
+ outputs: [],
39
+ stateMutability: "payable"
40
+ },
41
+ {
42
+ type: "function",
43
+ name: "completeOwnershipHandover",
44
+ inputs: [
45
+ { name: "pendingOwner", type: "address", internalType: "address" }
46
+ ],
47
+ outputs: [],
48
+ stateMutability: "payable"
49
+ },
50
+ {
51
+ type: "function",
52
+ name: "deployWithFactory",
53
+ inputs: [
54
+ {
55
+ name: "factory",
56
+ type: "address",
57
+ internalType: "contract KernelFactory"
58
+ },
59
+ { name: "createData", type: "bytes", internalType: "bytes" },
60
+ { name: "salt", type: "bytes32", internalType: "bytes32" }
61
+ ],
62
+ outputs: [{ name: "", type: "address", internalType: "address" }],
63
+ stateMutability: "payable"
64
+ },
65
+ {
66
+ type: "function",
67
+ name: "owner",
68
+ inputs: [],
69
+ outputs: [{ name: "result", type: "address", internalType: "address" }],
70
+ stateMutability: "view"
71
+ },
72
+ {
73
+ type: "function",
74
+ name: "ownershipHandoverExpiresAt",
75
+ inputs: [
76
+ { name: "pendingOwner", type: "address", internalType: "address" }
77
+ ],
78
+ outputs: [{ name: "result", type: "uint256", internalType: "uint256" }],
79
+ stateMutability: "view"
80
+ },
81
+ {
82
+ type: "function",
83
+ name: "renounceOwnership",
84
+ inputs: [],
85
+ outputs: [],
86
+ stateMutability: "payable"
87
+ },
88
+ {
89
+ type: "function",
90
+ name: "requestOwnershipHandover",
91
+ inputs: [],
92
+ outputs: [],
93
+ stateMutability: "payable"
94
+ },
95
+ {
96
+ type: "function",
97
+ name: "stake",
98
+ inputs: [
99
+ {
100
+ name: "entryPoint",
101
+ type: "address",
102
+ internalType: "contract IEntryPoint"
103
+ },
104
+ { name: "unstakeDelay", type: "uint32", internalType: "uint32" }
105
+ ],
106
+ outputs: [],
107
+ stateMutability: "payable"
108
+ },
109
+ {
110
+ type: "function",
111
+ name: "transferOwnership",
112
+ inputs: [
113
+ { name: "newOwner", type: "address", internalType: "address" }
114
+ ],
115
+ outputs: [],
116
+ stateMutability: "payable"
117
+ },
118
+ {
119
+ type: "function",
120
+ name: "unlockStake",
121
+ inputs: [
122
+ {
123
+ name: "entryPoint",
124
+ type: "address",
125
+ internalType: "contract IEntryPoint"
126
+ }
127
+ ],
128
+ outputs: [],
129
+ stateMutability: "payable"
130
+ },
131
+ {
132
+ type: "function",
133
+ name: "withdrawStake",
134
+ inputs: [
135
+ {
136
+ name: "entryPoint",
137
+ type: "address",
138
+ internalType: "contract IEntryPoint"
139
+ },
140
+ {
141
+ name: "recipient",
142
+ type: "address",
143
+ internalType: "address payable"
144
+ }
145
+ ],
146
+ outputs: [],
147
+ stateMutability: "payable"
148
+ },
149
+ {
150
+ type: "event",
151
+ name: "OwnershipHandoverCanceled",
152
+ inputs: [
153
+ {
154
+ name: "pendingOwner",
155
+ type: "address",
156
+ indexed: true,
157
+ internalType: "address"
158
+ }
159
+ ],
160
+ anonymous: false
161
+ },
162
+ {
163
+ type: "event",
164
+ name: "OwnershipHandoverRequested",
165
+ inputs: [
166
+ {
167
+ name: "pendingOwner",
168
+ type: "address",
169
+ indexed: true,
170
+ internalType: "address"
171
+ }
172
+ ],
173
+ anonymous: false
174
+ },
175
+ {
176
+ type: "event",
177
+ name: "OwnershipTransferred",
178
+ inputs: [
179
+ {
180
+ name: "oldOwner",
181
+ type: "address",
182
+ indexed: true,
183
+ internalType: "address"
184
+ },
185
+ {
186
+ name: "newOwner",
187
+ type: "address",
188
+ indexed: true,
189
+ internalType: "address"
190
+ }
191
+ ],
192
+ anonymous: false
193
+ },
194
+ { type: "error", name: "AlreadyInitialized", inputs: [] },
195
+ { type: "error", name: "NewOwnerIsZeroAddress", inputs: [] },
196
+ { type: "error", name: "NoHandoverRequest", inputs: [] },
197
+ { type: "error", name: "NotApprovedFactory", inputs: [] },
198
+ { type: "error", name: "Unauthorized", inputs: [] }
199
+ ] as const
@@ -26,6 +26,7 @@ import {
26
26
  getTypesForEIP712Domain,
27
27
  hashMessage,
28
28
  hashTypedData,
29
+ toHex,
29
30
  validateTypedData,
30
31
  zeroAddress
31
32
  } from "viem"
@@ -42,6 +43,7 @@ import {
42
43
  } from "../utils/toKernelPluginManager.js"
43
44
  import { KernelInitAbi } from "./abi/KernelAccountAbi.js"
44
45
  import { KernelV3InitAbi } from "./abi/kernel_v_3_0_0/KernelAccountAbi.js"
46
+ import { KernelFactoryStakerAbi } from "./abi/kernel_v_3_0_0/KernelFactoryStakerAbi.js"
45
47
  import { encodeCallData as encodeCallDataEpV06 } from "./utils/account/ep0_6/encodeCallData.js"
46
48
  import { encodeDeployCallData as encodeDeployCallDataV06 } from "./utils/account/ep0_6/encodeDeployCallData.js"
47
49
  import { encodeCallData as encodeCallDataEpV07 } from "./utils/account/ep0_7/encodeCallData.js"
@@ -68,6 +70,7 @@ export type CreateKernelAccountParameters<entryPoint extends EntryPoint> = {
68
70
  index?: bigint
69
71
  factoryAddress?: Address
70
72
  accountLogicAddress?: Address
73
+ factoryStakerAddress?: Address
71
74
  deployedAccountAddress?: Address
72
75
  }
73
76
 
@@ -112,13 +115,15 @@ const createAccountAbi = [
112
115
  export const KERNEL_ADDRESSES: {
113
116
  ACCOUNT_LOGIC_V0_6: Address
114
117
  ACCOUNT_LOGIC_V0_7: Address
115
- FACTORY_ADDRESS: Address
116
- ENTRYPOINT_V0_6: Address
118
+ FACTORY_ADDRESS_V0_6: Address
119
+ FACTORY_ADDRESS_V0_7: Address
120
+ FACTORY_STAKER: Address
117
121
  } = {
118
122
  ACCOUNT_LOGIC_V0_6: "0xd3082872F8B06073A021b4602e022d5A070d7cfC",
119
- ACCOUNT_LOGIC_V0_7: "0x541E811D24A54745619a5B9f0c1d4B08D5740144",
120
- FACTORY_ADDRESS: "0x5de4839a76cf55d0c90e2061ef4386d962E15ae3",
121
- ENTRYPOINT_V0_6: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
123
+ ACCOUNT_LOGIC_V0_7: "0xe59cffb45AFFB215e3823F7D1a207a71C1aa09c3",
124
+ FACTORY_ADDRESS_V0_6: "0x5de4839a76cf55d0c90e2061ef4386d962E15ae3",
125
+ FACTORY_ADDRESS_V0_7: "0x17B6697d81844518365484323e810Be08EaA3A6a",
126
+ FACTORY_STAKER: "0xd703aaE79538628d27099B8c4f621bE4CCd142d5"
122
127
  }
123
128
 
124
129
  const getKernelInitData = async <entryPoint extends EntryPoint>({
@@ -158,12 +163,14 @@ const getAccountInitCode = async <entryPoint extends EntryPoint>({
158
163
  index,
159
164
  factoryAddress,
160
165
  accountLogicAddress,
166
+ factoryStakerAddress,
161
167
  entryPoint: entryPointAddress,
162
168
  kernelPluginManager
163
169
  }: {
164
170
  index: bigint
165
171
  factoryAddress: Address
166
172
  accountLogicAddress: Address
173
+ factoryStakerAddress: Address
167
174
  entryPoint: entryPoint
168
175
  kernelPluginManager: KernelPluginManager<entryPoint>
169
176
  }): Promise<Hex> => {
@@ -172,15 +179,31 @@ const getAccountInitCode = async <entryPoint extends EntryPoint>({
172
179
  entryPoint: entryPointAddress,
173
180
  kernelPluginManager
174
181
  })
182
+ const entryPointVersion = getEntryPointVersion(entryPointAddress)
175
183
 
176
184
  // Build the account init code
185
+ if (entryPointVersion === "v0.6") {
186
+ return concatHex([
187
+ factoryAddress,
188
+ encodeFunctionData({
189
+ abi: createAccountAbi,
190
+ functionName: "createAccount",
191
+ args: [accountLogicAddress, initialisationData, index]
192
+ }) as Hex
193
+ ])
194
+ }
195
+
177
196
  return concatHex([
178
- factoryAddress,
197
+ factoryStakerAddress,
179
198
  encodeFunctionData({
180
- abi: createAccountAbi,
181
- functionName: "createAccount",
182
- args: [accountLogicAddress, initialisationData, index]
183
- }) as Hex
199
+ abi: KernelFactoryStakerAbi,
200
+ functionName: "deployWithFactory",
201
+ args: [
202
+ factoryAddress,
203
+ initialisationData,
204
+ toHex(index, { size: 32 })
205
+ ]
206
+ })
184
207
  ])
185
208
  }
186
209
 
@@ -244,8 +267,9 @@ export async function createKernelAccount<
244
267
  plugins,
245
268
  entryPoint: entryPointAddress,
246
269
  index = 0n,
247
- factoryAddress = KERNEL_ADDRESSES.FACTORY_ADDRESS,
270
+ factoryAddress = KERNEL_ADDRESSES.FACTORY_ADDRESS_V0_6,
248
271
  accountLogicAddress = KERNEL_ADDRESSES.ACCOUNT_LOGIC_V0_6,
272
+ factoryStakerAddress = KERNEL_ADDRESSES.FACTORY_STAKER,
249
273
  deployedAccountAddress
250
274
  }: CreateKernelAccountParameters<entryPoint>
251
275
  ): Promise<KernelSmartAccount<entryPoint, TTransport, TChain>> {
@@ -254,6 +278,10 @@ export async function createKernelAccount<
254
278
  entryPointVersion === "v0.6"
255
279
  ? KERNEL_ADDRESSES.ACCOUNT_LOGIC_V0_6
256
280
  : KERNEL_ADDRESSES.ACCOUNT_LOGIC_V0_7
281
+ factoryAddress =
282
+ entryPointVersion === "v0.6"
283
+ ? KERNEL_ADDRESSES.FACTORY_ADDRESS_V0_6
284
+ : KERNEL_ADDRESSES.FACTORY_ADDRESS_V0_7
257
285
 
258
286
  const kernelPluginManager = isKernelPluginManager<entryPoint>(plugins)
259
287
  ? plugins
@@ -270,6 +298,7 @@ export async function createKernelAccount<
270
298
  index,
271
299
  factoryAddress,
272
300
  accountLogicAddress,
301
+ factoryStakerAddress,
273
302
  entryPoint: entryPointAddress,
274
303
  kernelPluginManager
275
304
  })
@@ -331,7 +360,11 @@ export async function createKernelAccount<
331
360
 
332
361
  if (smartAccountDeployed) return undefined
333
362
 
334
- return factoryAddress
363
+ const entryPointVersion =
364
+ getEntryPointVersion(entryPointAddress)
365
+ return entryPointVersion === "v0.6"
366
+ ? factoryAddress
367
+ : factoryStakerAddress
335
368
  },
336
369
 
337
370
  async getFactoryData() {