@zerodev/sdk 5.2.1-alpha-1 → 5.2.1-alpha-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.
- package/_cjs/accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.js +99 -54
- package/_cjs/accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.js.map +1 -1
- package/_cjs/accounts/kernel/createKernelAccount.js +1 -1
- package/_cjs/accounts/kernel/utils/account/ep0_7/getKernelV3Nonce.js +1 -1
- package/_cjs/accounts/kernel/utils/plugins/ep0_7/getEncodedPluginsData.js +3 -1
- package/_cjs/accounts/kernel/utils/plugins/ep0_7/getEncodedPluginsData.js.map +1 -1
- package/_cjs/accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.js +1 -4
- package/_cjs/accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.js.map +1 -1
- package/_cjs/accounts/utils/toKernelPluginManager.js +20 -6
- package/_cjs/accounts/utils/toKernelPluginManager.js.map +1 -1
- package/_cjs/actions/paymaster/sponsorUserOperation.js +1 -2
- package/_cjs/actions/paymaster/sponsorUserOperation.js.map +1 -1
- package/_cjs/constants.js +1 -1
- package/_esm/accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.js +99 -54
- package/_esm/accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.js.map +1 -1
- package/_esm/accounts/kernel/createKernelAccount.js +1 -1
- package/_esm/accounts/kernel/utils/account/ep0_7/getKernelV3Nonce.js +1 -1
- package/_esm/accounts/kernel/utils/plugins/ep0_7/getEncodedPluginsData.js +4 -1
- package/_esm/accounts/kernel/utils/plugins/ep0_7/getEncodedPluginsData.js.map +1 -1
- package/_esm/accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.js +3 -1
- package/_esm/accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.js.map +1 -1
- package/_esm/accounts/utils/toKernelPluginManager.js +20 -6
- package/_esm/accounts/utils/toKernelPluginManager.js.map +1 -1
- package/_esm/actions/paymaster/sponsorUserOperation.js +1 -2
- package/_esm/actions/paymaster/sponsorUserOperation.js.map +1 -1
- package/_esm/constants.js +1 -1
- package/_types/accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.d.ts +92 -16
- package/_types/accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/plugins/ep0_7/getEncodedPluginsData.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.d.ts.map +1 -1
- package/_types/accounts/utils/toKernelPluginManager.d.ts.map +1 -1
- package/_types/actions/paymaster/sponsorUserOperation.d.ts.map +1 -1
- package/accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.ts +99 -54
- package/accounts/kernel/createKernelAccount.ts +1 -1
- package/accounts/kernel/utils/account/ep0_7/getKernelV3Nonce.ts +1 -1
- package/accounts/kernel/utils/plugins/ep0_7/getEncodedPluginsData.ts +4 -1
- package/accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.ts +3 -1
- package/accounts/utils/toKernelPluginManager.ts +20 -6
- package/actions/paymaster/sponsorUserOperation.ts +1 -3
- package/constants.ts +1 -1
- package/package.json +1 -1
|
@@ -285,20 +285,6 @@ export declare const KernelV3AccountAbi: readonly [{
|
|
|
285
285
|
}];
|
|
286
286
|
}];
|
|
287
287
|
readonly stateMutability: "view";
|
|
288
|
-
}, {
|
|
289
|
-
readonly type: "function";
|
|
290
|
-
readonly name: "fallbackConfig";
|
|
291
|
-
readonly inputs: readonly [];
|
|
292
|
-
readonly outputs: readonly [{
|
|
293
|
-
readonly name: "";
|
|
294
|
-
readonly type: "address";
|
|
295
|
-
readonly internalType: "contract IFallback";
|
|
296
|
-
}, {
|
|
297
|
-
readonly name: "";
|
|
298
|
-
readonly type: "address";
|
|
299
|
-
readonly internalType: "contract IHook";
|
|
300
|
-
}];
|
|
301
|
-
readonly stateMutability: "view";
|
|
302
288
|
}, {
|
|
303
289
|
readonly type: "function";
|
|
304
290
|
readonly name: "initialize";
|
|
@@ -339,6 +325,37 @@ export declare const KernelV3AccountAbi: readonly [{
|
|
|
339
325
|
}];
|
|
340
326
|
readonly outputs: readonly [];
|
|
341
327
|
readonly stateMutability: "payable";
|
|
328
|
+
}, {
|
|
329
|
+
readonly type: "function";
|
|
330
|
+
readonly name: "installValidations";
|
|
331
|
+
readonly inputs: readonly [{
|
|
332
|
+
readonly name: "vIds";
|
|
333
|
+
readonly type: "bytes21[]";
|
|
334
|
+
readonly internalType: "ValidationId[]";
|
|
335
|
+
}, {
|
|
336
|
+
readonly name: "configs";
|
|
337
|
+
readonly type: "tuple[]";
|
|
338
|
+
readonly internalType: "struct ValidationManager.ValidationConfig[]";
|
|
339
|
+
readonly components: readonly [{
|
|
340
|
+
readonly name: "nonce";
|
|
341
|
+
readonly type: "uint32";
|
|
342
|
+
readonly internalType: "uint32";
|
|
343
|
+
}, {
|
|
344
|
+
readonly name: "hook";
|
|
345
|
+
readonly type: "address";
|
|
346
|
+
readonly internalType: "contract IHook";
|
|
347
|
+
}];
|
|
348
|
+
}, {
|
|
349
|
+
readonly name: "validationData";
|
|
350
|
+
readonly type: "bytes[]";
|
|
351
|
+
readonly internalType: "bytes[]";
|
|
352
|
+
}, {
|
|
353
|
+
readonly name: "hookData";
|
|
354
|
+
readonly type: "bytes[]";
|
|
355
|
+
readonly internalType: "bytes[]";
|
|
356
|
+
}];
|
|
357
|
+
readonly outputs: readonly [];
|
|
358
|
+
readonly stateMutability: "nonpayable";
|
|
342
359
|
}, {
|
|
343
360
|
readonly type: "function";
|
|
344
361
|
readonly name: "invalidateNonce";
|
|
@@ -464,6 +481,10 @@ export declare const KernelV3AccountAbi: readonly [{
|
|
|
464
481
|
readonly name: "target";
|
|
465
482
|
readonly type: "address";
|
|
466
483
|
readonly internalType: "address";
|
|
484
|
+
}, {
|
|
485
|
+
readonly name: "callType";
|
|
486
|
+
readonly type: "bytes1";
|
|
487
|
+
readonly internalType: "CallType";
|
|
467
488
|
}];
|
|
468
489
|
}];
|
|
469
490
|
readonly stateMutability: "view";
|
|
@@ -499,7 +520,7 @@ export declare const KernelV3AccountAbi: readonly [{
|
|
|
499
520
|
readonly type: "function";
|
|
500
521
|
readonly name: "uninstallModule";
|
|
501
522
|
readonly inputs: readonly [{
|
|
502
|
-
readonly name: "";
|
|
523
|
+
readonly name: "moduleType";
|
|
503
524
|
readonly type: "uint256";
|
|
504
525
|
readonly internalType: "uint256";
|
|
505
526
|
}, {
|
|
@@ -524,6 +545,20 @@ export declare const KernelV3AccountAbi: readonly [{
|
|
|
524
545
|
readonly name: "deinitData";
|
|
525
546
|
readonly type: "bytes";
|
|
526
547
|
readonly internalType: "bytes";
|
|
548
|
+
}, {
|
|
549
|
+
readonly name: "hookDeinitData";
|
|
550
|
+
readonly type: "bytes";
|
|
551
|
+
readonly internalType: "bytes";
|
|
552
|
+
}];
|
|
553
|
+
readonly outputs: readonly [];
|
|
554
|
+
readonly stateMutability: "payable";
|
|
555
|
+
}, {
|
|
556
|
+
readonly type: "function";
|
|
557
|
+
readonly name: "upgradeTo";
|
|
558
|
+
readonly inputs: readonly [{
|
|
559
|
+
readonly name: "_newImplementation";
|
|
560
|
+
readonly type: "address";
|
|
561
|
+
readonly internalType: "address";
|
|
527
562
|
}];
|
|
528
563
|
readonly outputs: readonly [];
|
|
529
564
|
readonly stateMutability: "payable";
|
|
@@ -598,7 +633,7 @@ export declare const KernelV3AccountAbi: readonly [{
|
|
|
598
633
|
readonly stateMutability: "payable";
|
|
599
634
|
}, {
|
|
600
635
|
readonly type: "function";
|
|
601
|
-
readonly name: "
|
|
636
|
+
readonly name: "validationConfig";
|
|
602
637
|
readonly inputs: readonly [{
|
|
603
638
|
readonly name: "vId";
|
|
604
639
|
readonly type: "bytes21";
|
|
@@ -634,6 +669,21 @@ export declare const KernelV3AccountAbi: readonly [{
|
|
|
634
669
|
readonly internalType: "address";
|
|
635
670
|
}];
|
|
636
671
|
readonly anonymous: false;
|
|
672
|
+
}, {
|
|
673
|
+
readonly type: "event";
|
|
674
|
+
readonly name: "ModuleUninstallResult";
|
|
675
|
+
readonly inputs: readonly [{
|
|
676
|
+
readonly name: "module";
|
|
677
|
+
readonly type: "address";
|
|
678
|
+
readonly indexed: false;
|
|
679
|
+
readonly internalType: "address";
|
|
680
|
+
}, {
|
|
681
|
+
readonly name: "result";
|
|
682
|
+
readonly type: "bool";
|
|
683
|
+
readonly indexed: false;
|
|
684
|
+
readonly internalType: "bool";
|
|
685
|
+
}];
|
|
686
|
+
readonly anonymous: false;
|
|
637
687
|
}, {
|
|
638
688
|
readonly type: "event";
|
|
639
689
|
readonly name: "ModuleUninstalled";
|
|
@@ -734,6 +784,16 @@ export declare const KernelV3AccountAbi: readonly [{
|
|
|
734
784
|
readonly internalType: "bytes";
|
|
735
785
|
}];
|
|
736
786
|
readonly anonymous: false;
|
|
787
|
+
}, {
|
|
788
|
+
readonly type: "event";
|
|
789
|
+
readonly name: "Upgraded";
|
|
790
|
+
readonly inputs: readonly [{
|
|
791
|
+
readonly name: "implementation";
|
|
792
|
+
readonly type: "address";
|
|
793
|
+
readonly indexed: true;
|
|
794
|
+
readonly internalType: "address";
|
|
795
|
+
}];
|
|
796
|
+
readonly anonymous: false;
|
|
737
797
|
}, {
|
|
738
798
|
readonly type: "event";
|
|
739
799
|
readonly name: "ValidatorInstalled";
|
|
@@ -795,6 +855,10 @@ export declare const KernelV3AccountAbi: readonly [{
|
|
|
795
855
|
readonly type: "error";
|
|
796
856
|
readonly name: "InvalidNonce";
|
|
797
857
|
readonly inputs: readonly [];
|
|
858
|
+
}, {
|
|
859
|
+
readonly type: "error";
|
|
860
|
+
readonly name: "InvalidSelector";
|
|
861
|
+
readonly inputs: readonly [];
|
|
798
862
|
}, {
|
|
799
863
|
readonly type: "error";
|
|
800
864
|
readonly name: "InvalidSignature";
|
|
@@ -807,10 +871,22 @@ export declare const KernelV3AccountAbi: readonly [{
|
|
|
807
871
|
readonly type: "error";
|
|
808
872
|
readonly name: "InvalidValidator";
|
|
809
873
|
readonly inputs: readonly [];
|
|
874
|
+
}, {
|
|
875
|
+
readonly type: "error";
|
|
876
|
+
readonly name: "NonceInvalidationError";
|
|
877
|
+
readonly inputs: readonly [];
|
|
878
|
+
}, {
|
|
879
|
+
readonly type: "error";
|
|
880
|
+
readonly name: "NotSupportedCallType";
|
|
881
|
+
readonly inputs: readonly [];
|
|
810
882
|
}, {
|
|
811
883
|
readonly type: "error";
|
|
812
884
|
readonly name: "OnlyExecuteUserOp";
|
|
813
885
|
readonly inputs: readonly [];
|
|
886
|
+
}, {
|
|
887
|
+
readonly type: "error";
|
|
888
|
+
readonly name: "PermissionDataLengthMismatch";
|
|
889
|
+
readonly inputs: readonly [];
|
|
814
890
|
}, {
|
|
815
891
|
readonly type: "error";
|
|
816
892
|
readonly name: "PermissionNotAlllowedForSignature";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KernelAccountAbi.d.ts","sourceRoot":"","sources":["../../../../../accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;EAiBlB,CAAA;AAEV,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"KernelAccountAbi.d.ts","sourceRoot":"","sources":["../../../../../accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;EAiBlB,CAAA;AAEV,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoErB,CAAA;AAEV,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmrBrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getEncodedPluginsData.d.ts","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/plugins/ep0_7/getEncodedPluginsData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,UAAU,EACb,MAAM,iCAAiC,CAAA;AACxC,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,GAAG,EAKX,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAE9E,eAAO,MAAM,qBAAqB;oBASd,OAAO;qBACN,GAAG;qBACH,GAAG;
|
|
1
|
+
{"version":3,"file":"getEncodedPluginsData.d.ts","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/plugins/ep0_7/getEncodedPluginsData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,UAAU,EACb,MAAM,iCAAiC,CAAA;AACxC,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,GAAG,EAKX,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAE9E,eAAO,MAAM,qBAAqB;oBASd,OAAO;qBACN,GAAG;qBACH,GAAG;4DAqBvB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPluginsEnableTypedData.d.ts","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,UAAU,EACb,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,YAAY,EAA4B,MAAM,MAAM,CAAA;AAEhF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAE9E,eAAO,MAAM,yBAAyB;oBAUlB,OAAO;aACd,MAAM;mBACA,MAAM;oBACL,MAAM;sCACU,QAChC,WAAW,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"getPluginsEnableTypedData.d.ts","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/plugins/ep0_7/getPluginsEnableTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,UAAU,EACb,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,YAAY,EAA4B,MAAM,MAAM,CAAA;AAEhF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAA;AAE9E,eAAO,MAAM,yBAAyB;oBAUlB,OAAO;aACd,MAAM;mBACA,MAAM;oBACL,MAAM;sCACU,QAChC,WAAW,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAuC/C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toKernelPluginManager.d.ts","sourceRoot":"","sources":["../../../accounts/utils/toKernelPluginManager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,EAEH,KAAK,KAAK,EACV,KAAK,MAAM,EAEX,KAAK,SAAS,EAMjB,MAAM,MAAM,CAAA;AAGb,OAAO,EACH,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAEjC,MAAM,uBAAuB,CAAA;AAU9B,wBAAgB,qBAAqB,CAAC,UAAU,SAAS,UAAU,EAE/D,MAAM,EAAE,GAAG,GACZ,MAAM,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAE3C;AAED,wBAAsB,qBAAqB,CACvC,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,IAAI,EACJ,OAAO,EACP,qBAAqB,EACrB,iBAAiB,EACjB,
|
|
1
|
+
{"version":3,"file":"toKernelPluginManager.d.ts","sourceRoot":"","sources":["../../../accounts/utils/toKernelPluginManager.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,EAEH,KAAK,KAAK,EACV,KAAK,MAAM,EAEX,KAAK,SAAS,EAMjB,MAAM,MAAM,CAAA;AAGb,OAAO,EACH,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAEjC,MAAM,uBAAuB,CAAA;AAU9B,wBAAgB,qBAAqB,CAAC,UAAU,SAAS,UAAU,EAE/D,MAAM,EAAE,GAAG,GACZ,MAAM,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAE3C;AAED,wBAAsB,qBAAqB,CACvC,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,IAAI,EACJ,OAAO,EACP,qBAAqB,EACrB,iBAAiB,EACjB,MAAM,EACN,UAAc,EACd,UAAc,EACd,UAAU,EAAE,iBAAiB,EAC7B,aAAa,EAChB,EAAE,yBAAyB,CAAC,UAAU,CAAC,GACzC,OAAO,CAAC,mBAAmB,CAAC,UAAU,CAAC,CAAC,CAyP1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sponsorUserOperation.d.ts","sourceRoot":"","sources":["../../../actions/paymaster/sponsorUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,2BAA2B,EAC3B,UAAU,EAEb,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EACR,aAAa,EAEhB,MAAM,uCAAuC,CAAA;AAE9C,OAAO,KAAK,EAAW,GAAG,EAAE,MAAM,MAAM,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;
|
|
1
|
+
{"version":3,"file":"sponsorUserOperation.d.ts","sourceRoot":"","sources":["../../../actions/paymaster/sponsorUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,2BAA2B,EAC3B,UAAU,EAEb,MAAM,iCAAiC,CAAA;AACxC,OAAO,KAAK,EACR,aAAa,EAEhB,MAAM,uCAAuC,CAAA;AAE9C,OAAO,KAAK,EAAW,GAAG,EAAE,MAAM,MAAM,CAAA;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAA;AAE9E,MAAM,MAAM,8BAA8B,CAAC,UAAU,SAAS,UAAU,IAAI;IACxE,aAAa,EAAE,UAAU,SAAS,2BAA2B,GACvD,SAAS,CACL,aAAa,CAAC,MAAM,CAAC,EACrB,cAAc,GAAG,oBAAoB,GAAG,sBAAsB,CACjE,GACD,SAAS,CACL,aAAa,CAAC,MAAM,CAAC,EACnB,cAAc,GACd,oBAAoB,GACpB,sBAAsB,GACtB,+BAA+B,GAC/B,yBAAyB,CAC9B,CAAA;IACP,UAAU,EAAE,UAAU,CAAA;IACtB,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAA;CAC1B,CAAA;AAED,MAAM,MAAM,8BAA8B,CAAC,UAAU,SAAS,UAAU,IACpE,UAAU,SAAS,2BAA2B,GACxC,IAAI,CACA,aAAa,CAAC,MAAM,CAAC,EACnB,cAAc,GACd,sBAAsB,GACtB,oBAAoB,GACpB,kBAAkB,CACvB,GACD,IAAI,CACA,aAAa,CAAC,MAAM,CAAC,EACnB,cAAc,GACd,sBAAsB,GACtB,oBAAoB,GACpB,WAAW,GACX,+BAA+B,GAC/B,yBAAyB,GACzB,eAAe,CACpB,CAAA;AAEX;;GAEG;AACH,eAAO,MAAM,oBAAoB,sLAmFhC,CAAA"}
|
|
@@ -23,11 +23,7 @@ export const KernelV3ExecuteAbi = [
|
|
|
23
23
|
name: "execute",
|
|
24
24
|
inputs: [
|
|
25
25
|
{ name: "execMode", type: "bytes32", internalType: "ExecMode" },
|
|
26
|
-
{
|
|
27
|
-
name: "executionCalldata",
|
|
28
|
-
type: "bytes",
|
|
29
|
-
internalType: "bytes"
|
|
30
|
-
}
|
|
26
|
+
{ name: "executionCalldata", type: "bytes", internalType: "bytes" }
|
|
31
27
|
],
|
|
32
28
|
outputs: [],
|
|
33
29
|
stateMutability: "payable"
|
|
@@ -37,11 +33,7 @@ export const KernelV3ExecuteAbi = [
|
|
|
37
33
|
name: "executeFromExecutor",
|
|
38
34
|
inputs: [
|
|
39
35
|
{ name: "execMode", type: "bytes32", internalType: "ExecMode" },
|
|
40
|
-
{
|
|
41
|
-
name: "executionCalldata",
|
|
42
|
-
type: "bytes",
|
|
43
|
-
internalType: "bytes"
|
|
44
|
-
}
|
|
36
|
+
{ name: "executionCalldata", type: "bytes", internalType: "bytes" }
|
|
45
37
|
],
|
|
46
38
|
outputs: [
|
|
47
39
|
{ name: "returnData", type: "bytes[]", internalType: "bytes[]" }
|
|
@@ -144,11 +136,7 @@ export const KernelV3AccountAbi = [
|
|
|
144
136
|
internalType: "address"
|
|
145
137
|
},
|
|
146
138
|
{ name: "salt", type: "bytes32", internalType: "bytes32" },
|
|
147
|
-
{
|
|
148
|
-
name: "extensions",
|
|
149
|
-
type: "uint256[]",
|
|
150
|
-
internalType: "uint256[]"
|
|
151
|
-
}
|
|
139
|
+
{ name: "extensions", type: "uint256[]", internalType: "uint256[]" }
|
|
152
140
|
],
|
|
153
141
|
stateMutability: "view"
|
|
154
142
|
},
|
|
@@ -157,11 +145,7 @@ export const KernelV3AccountAbi = [
|
|
|
157
145
|
name: "entrypoint",
|
|
158
146
|
inputs: [],
|
|
159
147
|
outputs: [
|
|
160
|
-
{
|
|
161
|
-
name: "",
|
|
162
|
-
type: "address",
|
|
163
|
-
internalType: "contract IEntryPoint"
|
|
164
|
-
}
|
|
148
|
+
{ name: "", type: "address", internalType: "contract IEntryPoint" }
|
|
165
149
|
],
|
|
166
150
|
stateMutability: "view"
|
|
167
151
|
},
|
|
@@ -170,11 +154,7 @@ export const KernelV3AccountAbi = [
|
|
|
170
154
|
name: "execute",
|
|
171
155
|
inputs: [
|
|
172
156
|
{ name: "execMode", type: "bytes32", internalType: "ExecMode" },
|
|
173
|
-
{
|
|
174
|
-
name: "executionCalldata",
|
|
175
|
-
type: "bytes",
|
|
176
|
-
internalType: "bytes"
|
|
177
|
-
}
|
|
157
|
+
{ name: "executionCalldata", type: "bytes", internalType: "bytes" }
|
|
178
158
|
],
|
|
179
159
|
outputs: [],
|
|
180
160
|
stateMutability: "payable"
|
|
@@ -184,11 +164,7 @@ export const KernelV3AccountAbi = [
|
|
|
184
164
|
name: "executeFromExecutor",
|
|
185
165
|
inputs: [
|
|
186
166
|
{ name: "execMode", type: "bytes32", internalType: "ExecMode" },
|
|
187
|
-
{
|
|
188
|
-
name: "executionCalldata",
|
|
189
|
-
type: "bytes",
|
|
190
|
-
internalType: "bytes"
|
|
191
|
-
}
|
|
167
|
+
{ name: "executionCalldata", type: "bytes", internalType: "bytes" }
|
|
192
168
|
],
|
|
193
169
|
outputs: [
|
|
194
170
|
{ name: "returnData", type: "bytes[]", internalType: "bytes[]" }
|
|
@@ -266,16 +242,6 @@ export const KernelV3AccountAbi = [
|
|
|
266
242
|
],
|
|
267
243
|
stateMutability: "view"
|
|
268
244
|
},
|
|
269
|
-
{
|
|
270
|
-
type: "function",
|
|
271
|
-
name: "fallbackConfig",
|
|
272
|
-
inputs: [],
|
|
273
|
-
outputs: [
|
|
274
|
-
{ name: "", type: "address", internalType: "contract IFallback" },
|
|
275
|
-
{ name: "", type: "address", internalType: "contract IHook" }
|
|
276
|
-
],
|
|
277
|
-
stateMutability: "view"
|
|
278
|
-
},
|
|
279
245
|
{
|
|
280
246
|
type: "function",
|
|
281
247
|
name: "initialize",
|
|
@@ -303,6 +269,34 @@ export const KernelV3AccountAbi = [
|
|
|
303
269
|
outputs: [],
|
|
304
270
|
stateMutability: "payable"
|
|
305
271
|
},
|
|
272
|
+
{
|
|
273
|
+
type: "function",
|
|
274
|
+
name: "installValidations",
|
|
275
|
+
inputs: [
|
|
276
|
+
{ name: "vIds", type: "bytes21[]", internalType: "ValidationId[]" },
|
|
277
|
+
{
|
|
278
|
+
name: "configs",
|
|
279
|
+
type: "tuple[]",
|
|
280
|
+
internalType: "struct ValidationManager.ValidationConfig[]",
|
|
281
|
+
components: [
|
|
282
|
+
{ name: "nonce", type: "uint32", internalType: "uint32" },
|
|
283
|
+
{
|
|
284
|
+
name: "hook",
|
|
285
|
+
type: "address",
|
|
286
|
+
internalType: "contract IHook"
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
name: "validationData",
|
|
292
|
+
type: "bytes[]",
|
|
293
|
+
internalType: "bytes[]"
|
|
294
|
+
},
|
|
295
|
+
{ name: "hookData", type: "bytes[]", internalType: "bytes[]" }
|
|
296
|
+
],
|
|
297
|
+
outputs: [],
|
|
298
|
+
stateMutability: "nonpayable"
|
|
299
|
+
},
|
|
306
300
|
{
|
|
307
301
|
type: "function",
|
|
308
302
|
name: "invalidateNonce",
|
|
@@ -326,11 +320,7 @@ export const KernelV3AccountAbi = [
|
|
|
326
320
|
inputs: [
|
|
327
321
|
{ name: "moduleType", type: "uint256", internalType: "uint256" },
|
|
328
322
|
{ name: "module", type: "address", internalType: "address" },
|
|
329
|
-
{
|
|
330
|
-
name: "additionalContext",
|
|
331
|
-
type: "bytes",
|
|
332
|
-
internalType: "bytes"
|
|
333
|
-
}
|
|
323
|
+
{ name: "additionalContext", type: "bytes", internalType: "bytes" }
|
|
334
324
|
],
|
|
335
325
|
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
336
326
|
stateMutability: "view"
|
|
@@ -399,7 +389,16 @@ export const KernelV3AccountAbi = [
|
|
|
399
389
|
type: "address",
|
|
400
390
|
internalType: "contract IHook"
|
|
401
391
|
},
|
|
402
|
-
{
|
|
392
|
+
{
|
|
393
|
+
name: "target",
|
|
394
|
+
type: "address",
|
|
395
|
+
internalType: "address"
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
name: "callType",
|
|
399
|
+
type: "bytes1",
|
|
400
|
+
internalType: "CallType"
|
|
401
|
+
}
|
|
403
402
|
]
|
|
404
403
|
}
|
|
405
404
|
],
|
|
@@ -425,7 +424,7 @@ export const KernelV3AccountAbi = [
|
|
|
425
424
|
type: "function",
|
|
426
425
|
name: "uninstallModule",
|
|
427
426
|
inputs: [
|
|
428
|
-
{ name: "", type: "uint256", internalType: "uint256" },
|
|
427
|
+
{ name: "moduleType", type: "uint256", internalType: "uint256" },
|
|
429
428
|
{ name: "module", type: "address", internalType: "address" },
|
|
430
429
|
{ name: "deInitData", type: "bytes", internalType: "bytes" }
|
|
431
430
|
],
|
|
@@ -437,7 +436,21 @@ export const KernelV3AccountAbi = [
|
|
|
437
436
|
name: "uninstallValidation",
|
|
438
437
|
inputs: [
|
|
439
438
|
{ name: "vId", type: "bytes21", internalType: "ValidationId" },
|
|
440
|
-
{ name: "deinitData", type: "bytes", internalType: "bytes" }
|
|
439
|
+
{ name: "deinitData", type: "bytes", internalType: "bytes" },
|
|
440
|
+
{ name: "hookDeinitData", type: "bytes", internalType: "bytes" }
|
|
441
|
+
],
|
|
442
|
+
outputs: [],
|
|
443
|
+
stateMutability: "payable"
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
type: "function",
|
|
447
|
+
name: "upgradeTo",
|
|
448
|
+
inputs: [
|
|
449
|
+
{
|
|
450
|
+
name: "_newImplementation",
|
|
451
|
+
type: "address",
|
|
452
|
+
internalType: "address"
|
|
453
|
+
}
|
|
441
454
|
],
|
|
442
455
|
outputs: [],
|
|
443
456
|
stateMutability: "payable"
|
|
@@ -507,7 +520,7 @@ export const KernelV3AccountAbi = [
|
|
|
507
520
|
},
|
|
508
521
|
{
|
|
509
522
|
type: "function",
|
|
510
|
-
name: "
|
|
523
|
+
name: "validationConfig",
|
|
511
524
|
inputs: [
|
|
512
525
|
{ name: "vId", type: "bytes21", internalType: "ValidationId" }
|
|
513
526
|
],
|
|
@@ -547,6 +560,25 @@ export const KernelV3AccountAbi = [
|
|
|
547
560
|
],
|
|
548
561
|
anonymous: false
|
|
549
562
|
},
|
|
563
|
+
{
|
|
564
|
+
type: "event",
|
|
565
|
+
name: "ModuleUninstallResult",
|
|
566
|
+
inputs: [
|
|
567
|
+
{
|
|
568
|
+
name: "module",
|
|
569
|
+
type: "address",
|
|
570
|
+
indexed: false,
|
|
571
|
+
internalType: "address"
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
name: "result",
|
|
575
|
+
type: "bool",
|
|
576
|
+
indexed: false,
|
|
577
|
+
internalType: "bool"
|
|
578
|
+
}
|
|
579
|
+
],
|
|
580
|
+
anonymous: false
|
|
581
|
+
},
|
|
550
582
|
{
|
|
551
583
|
type: "event",
|
|
552
584
|
name: "ModuleUninstalled",
|
|
@@ -674,6 +706,19 @@ export const KernelV3AccountAbi = [
|
|
|
674
706
|
],
|
|
675
707
|
anonymous: false
|
|
676
708
|
},
|
|
709
|
+
{
|
|
710
|
+
type: "event",
|
|
711
|
+
name: "Upgraded",
|
|
712
|
+
inputs: [
|
|
713
|
+
{
|
|
714
|
+
name: "implementation",
|
|
715
|
+
type: "address",
|
|
716
|
+
indexed: true,
|
|
717
|
+
internalType: "address"
|
|
718
|
+
}
|
|
719
|
+
],
|
|
720
|
+
anonymous: false
|
|
721
|
+
},
|
|
677
722
|
{
|
|
678
723
|
type: "event",
|
|
679
724
|
name: "ValidatorInstalled",
|
|
@@ -715,15 +760,15 @@ export const KernelV3AccountAbi = [
|
|
|
715
760
|
{ type: "error", name: "InvalidMode", inputs: [] },
|
|
716
761
|
{ type: "error", name: "InvalidModuleType", inputs: [] },
|
|
717
762
|
{ type: "error", name: "InvalidNonce", inputs: [] },
|
|
763
|
+
{ type: "error", name: "InvalidSelector", inputs: [] },
|
|
718
764
|
{ type: "error", name: "InvalidSignature", inputs: [] },
|
|
719
765
|
{ type: "error", name: "InvalidValidationType", inputs: [] },
|
|
720
766
|
{ type: "error", name: "InvalidValidator", inputs: [] },
|
|
767
|
+
{ type: "error", name: "NonceInvalidationError", inputs: [] },
|
|
768
|
+
{ type: "error", name: "NotSupportedCallType", inputs: [] },
|
|
721
769
|
{ type: "error", name: "OnlyExecuteUserOp", inputs: [] },
|
|
722
|
-
{
|
|
723
|
-
|
|
724
|
-
name: "PermissionNotAlllowedForSignature",
|
|
725
|
-
inputs: []
|
|
726
|
-
},
|
|
770
|
+
{ type: "error", name: "PermissionDataLengthMismatch", inputs: [] },
|
|
771
|
+
{ type: "error", name: "PermissionNotAlllowedForSignature", inputs: [] },
|
|
727
772
|
{ type: "error", name: "PermissionNotAlllowedForUserOp", inputs: [] },
|
|
728
773
|
{ type: "error", name: "PolicyDataTooLarge", inputs: [] },
|
|
729
774
|
{
|
|
@@ -116,7 +116,7 @@ export const KERNEL_ADDRESSES: {
|
|
|
116
116
|
ENTRYPOINT_V0_6: Address
|
|
117
117
|
} = {
|
|
118
118
|
ACCOUNT_LOGIC_V0_6: "0xd3082872F8B06073A021b4602e022d5A070d7cfC",
|
|
119
|
-
ACCOUNT_LOGIC_V0_7: "
|
|
119
|
+
ACCOUNT_LOGIC_V0_7: "0x541E811D24A54745619a5B9f0c1d4B08D5740144",
|
|
120
120
|
FACTORY_ADDRESS: "0x5de4839a76cf55d0c90e2061ef4386d962E15ae3",
|
|
121
121
|
ENTRYPOINT_V0_6: "0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
|
|
122
122
|
}
|
|
@@ -35,7 +35,10 @@ export const getEncodedPluginsData = async <
|
|
|
35
35
|
[
|
|
36
36
|
enableData,
|
|
37
37
|
"0x",
|
|
38
|
-
|
|
38
|
+
// [TODO]: Integrate custom target contract and hook
|
|
39
|
+
concat([
|
|
40
|
+
action.selector /*, action.address, zeroAddress, "0x"*/
|
|
41
|
+
]),
|
|
39
42
|
enableSignature,
|
|
40
43
|
userOpSignature
|
|
41
44
|
]
|
|
@@ -50,10 +50,12 @@ export const getPluginsEnableTypedData = async <
|
|
|
50
50
|
validatorData: await validator.getEnableData(accountAddress),
|
|
51
51
|
hookData: "0x",
|
|
52
52
|
selectorData: concat([
|
|
53
|
-
action.selector
|
|
53
|
+
action.selector
|
|
54
|
+
/*
|
|
54
55
|
action.address,
|
|
55
56
|
zeroAddress,
|
|
56
57
|
"0x"
|
|
58
|
+
*/
|
|
57
59
|
])
|
|
58
60
|
},
|
|
59
61
|
primaryType: "Enable"
|
|
@@ -46,10 +46,7 @@ export async function toKernelPluginManager<
|
|
|
46
46
|
regular,
|
|
47
47
|
pluginEnableSignature,
|
|
48
48
|
validatorInitData,
|
|
49
|
-
action
|
|
50
|
-
selector: getActionSelector("v0.6"),
|
|
51
|
-
address: zeroAddress
|
|
52
|
-
},
|
|
49
|
+
action,
|
|
53
50
|
validAfter = 0,
|
|
54
51
|
validUntil = 0,
|
|
55
52
|
entryPoint: entryPointAddress,
|
|
@@ -67,7 +64,7 @@ export async function toKernelPluginManager<
|
|
|
67
64
|
address: action?.address ?? zeroAddress
|
|
68
65
|
}
|
|
69
66
|
if (!action) {
|
|
70
|
-
throw new Error("
|
|
67
|
+
throw new Error("Action data must be set")
|
|
71
68
|
}
|
|
72
69
|
|
|
73
70
|
const getSignatureData = async (
|
|
@@ -75,6 +72,9 @@ export async function toKernelPluginManager<
|
|
|
75
72
|
selector: Hex,
|
|
76
73
|
userOpSignature: Hex = "0x"
|
|
77
74
|
): Promise<Hex> => {
|
|
75
|
+
if (!action) {
|
|
76
|
+
throw new Error("Action data must be set")
|
|
77
|
+
}
|
|
78
78
|
if (entryPointVersion === "v0.6") {
|
|
79
79
|
if (regular) {
|
|
80
80
|
if (await isPluginEnabled(accountAddress, selector)) {
|
|
@@ -123,6 +123,9 @@ export async function toKernelPluginManager<
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
const isPluginEnabled = async (accountAddress: Address, selector: Hex) => {
|
|
126
|
+
if (!action) {
|
|
127
|
+
throw new Error("Action data must be set")
|
|
128
|
+
}
|
|
126
129
|
if (!regular) throw new Error("regular validator not set")
|
|
127
130
|
if (entryPointVersion === "v0.6") {
|
|
128
131
|
return regular.isEnabled(accountAddress, selector)
|
|
@@ -134,6 +137,9 @@ export async function toKernelPluginManager<
|
|
|
134
137
|
}
|
|
135
138
|
|
|
136
139
|
const getPluginEnableSignature = async (accountAddress: Address) => {
|
|
140
|
+
if (!action) {
|
|
141
|
+
throw new Error("Action data must be set")
|
|
142
|
+
}
|
|
137
143
|
if (pluginEnableSignature) return pluginEnableSignature
|
|
138
144
|
if (!sudo)
|
|
139
145
|
throw new Error(
|
|
@@ -203,7 +209,12 @@ export async function toKernelPluginManager<
|
|
|
203
209
|
userOpSig
|
|
204
210
|
)
|
|
205
211
|
},
|
|
206
|
-
getAction: () =>
|
|
212
|
+
getAction: () => {
|
|
213
|
+
if (!action) {
|
|
214
|
+
throw new Error("Action data must be set")
|
|
215
|
+
}
|
|
216
|
+
return action
|
|
217
|
+
},
|
|
207
218
|
getValidityData: () => ({
|
|
208
219
|
validAfter,
|
|
209
220
|
validUntil
|
|
@@ -230,6 +241,9 @@ export async function toKernelPluginManager<
|
|
|
230
241
|
accountAddress = zeroAddress,
|
|
231
242
|
customNonceKey = 0n
|
|
232
243
|
) => {
|
|
244
|
+
if (!action) {
|
|
245
|
+
throw new Error("Action data must be set")
|
|
246
|
+
}
|
|
233
247
|
if (entryPointVersion === "v0.6")
|
|
234
248
|
return await activeValidator.getNonceKey(
|
|
235
249
|
accountAddress,
|
|
@@ -10,7 +10,6 @@ import type {
|
|
|
10
10
|
import { ENTRYPOINT_ADDRESS_V06, deepHexlify } from "permissionless/utils"
|
|
11
11
|
import type { Address, Hex } from "viem"
|
|
12
12
|
import type { PartialBy } from "viem/types/utils"
|
|
13
|
-
import { KERNEL_ADDRESSES } from "../../accounts/index.js"
|
|
14
13
|
import type { ZeroDevPaymasterClient } from "../../clients/paymasterClient.js"
|
|
15
14
|
|
|
16
15
|
export type SponsorUserOperationParameters<entryPoint extends EntryPoint> = {
|
|
@@ -70,8 +69,7 @@ export const sponsorUserOperation = async <entryPoint extends EntryPoint>(
|
|
|
70
69
|
) as UserOperationWithBigIntAsHex<
|
|
71
70
|
GetEntryPointVersion<entryPoint>
|
|
72
71
|
>,
|
|
73
|
-
entryPointAddress:
|
|
74
|
-
args.entryPoint ?? KERNEL_ADDRESSES.ENTRYPOINT_V0_6,
|
|
72
|
+
entryPointAddress: args.entryPoint,
|
|
75
73
|
gasTokenData: args.gasToken && {
|
|
76
74
|
tokenAddress: args.gasToken
|
|
77
75
|
},
|
package/constants.ts
CHANGED
|
@@ -10,7 +10,7 @@ export const KernelImplToVersionMap: { [key: Address]: string } = {
|
|
|
10
10
|
"0xD3F582F6B4814E989Ee8E96bc3175320B5A540ab": "0.2.3",
|
|
11
11
|
"0x5FC0236D6c88a65beD32EECDC5D60a5CAb377717": "0.2.3",
|
|
12
12
|
"0xd3082872F8B06073A021b4602e022d5A070d7cfC": "0.2.4",
|
|
13
|
-
"
|
|
13
|
+
"0x541E811D24A54745619a5B9f0c1d4B08D5740144": "0.3.0-beta"
|
|
14
14
|
}
|
|
15
15
|
export const TOKEN_ACTION = "0x2087C7FfD0d0DAE80a00EE74325aBF3449e0eaf1"
|
|
16
16
|
export const KERNEL_NAME = "Kernel"
|