@zerodev/sdk 5.2.1-alpha-9 → 5.2.1
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 +17 -5
- package/_cjs/accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.js.map +1 -1
- package/_cjs/accounts/kernel/createKernelAccount.js +14 -7
- package/_cjs/accounts/kernel/createKernelAccount.js.map +1 -1
- package/_cjs/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.js +27 -0
- package/_cjs/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.js.map +1 -0
- package/_cjs/accounts/kernel/utils/account/ep0_7/getKernelV3Nonce.js +2 -2
- package/_cjs/accounts/kernel/utils/account/ep0_7/getKernelV3Nonce.js.map +1 -1
- package/_cjs/accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.js.map +1 -1
- package/_cjs/accounts/kernel/utils/plugins/ep0_7/isPluginInitialized.js +2 -2
- package/_cjs/accounts/kernel/utils/plugins/ep0_7/isPluginInitialized.js.map +1 -1
- package/_cjs/accounts/kernel/v1/createKernelV1Account.js +3 -0
- package/_cjs/accounts/kernel/v1/createKernelV1Account.js.map +1 -1
- package/_cjs/accounts/kernel/v2/createKernelV2Account.js +3 -0
- package/_cjs/accounts/kernel/v2/createKernelV2Account.js.map +1 -1
- package/_cjs/accounts/utils/6492.js +2 -2
- package/_cjs/accounts/utils/6492.js.map +1 -1
- package/_cjs/accounts/utils/toKernelPluginManager.js +20 -0
- package/_cjs/accounts/utils/toKernelPluginManager.js.map +1 -1
- package/_cjs/actions/account-client/signUserOperation.js +2 -1
- package/_cjs/actions/account-client/signUserOperation.js.map +1 -1
- package/_cjs/types/kernel.js.map +1 -1
- package/_cjs/utils.js +1 -1
- package/_cjs/utils.js.map +1 -1
- package/_esm/accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.js +17 -5
- package/_esm/accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.js.map +1 -1
- package/_esm/accounts/kernel/createKernelAccount.js +14 -7
- package/_esm/accounts/kernel/createKernelAccount.js.map +1 -1
- package/_esm/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.js +23 -0
- package/_esm/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.js.map +1 -0
- package/_esm/accounts/kernel/utils/account/ep0_7/getKernelV3Nonce.js +2 -2
- package/_esm/accounts/kernel/utils/account/ep0_7/getKernelV3Nonce.js.map +1 -1
- package/_esm/accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.js.map +1 -1
- package/_esm/accounts/kernel/utils/plugins/ep0_7/isPluginInitialized.js +2 -2
- package/_esm/accounts/kernel/utils/plugins/ep0_7/isPluginInitialized.js.map +1 -1
- package/_esm/accounts/kernel/v1/createKernelV1Account.js +3 -0
- package/_esm/accounts/kernel/v1/createKernelV1Account.js.map +1 -1
- package/_esm/accounts/kernel/v2/createKernelV2Account.js +4 -0
- package/_esm/accounts/kernel/v2/createKernelV2Account.js.map +1 -1
- package/_esm/accounts/utils/6492.js +2 -2
- package/_esm/accounts/utils/6492.js.map +1 -1
- package/_esm/accounts/utils/toKernelPluginManager.js +20 -0
- package/_esm/accounts/utils/toKernelPluginManager.js.map +1 -1
- package/_esm/actions/account-client/signUserOperation.js +3 -2
- package/_esm/actions/account-client/signUserOperation.js.map +1 -1
- package/_esm/types/kernel.js.map +1 -1
- package/_esm/utils.js +2 -1
- package/_esm/utils.js.map +1 -1
- package/_types/accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.d.ts +19 -5
- package/_types/accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.d.ts.map +1 -1
- package/_types/accounts/kernel/createKernelAccount.d.ts +1 -0
- package/_types/accounts/kernel/createKernelAccount.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.d.ts +14 -0
- package/_types/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.d.ts.map +1 -0
- package/_types/accounts/kernel/utils/account/ep0_7/getKernelV3Nonce.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.d.ts.map +1 -1
- package/_types/accounts/kernel/utils/plugins/ep0_7/isPluginInitialized.d.ts.map +1 -1
- package/_types/accounts/kernel/v1/createKernelV1Account.d.ts.map +1 -1
- package/_types/accounts/kernel/v2/createKernelV2Account.d.ts +3 -9
- package/_types/accounts/kernel/v2/createKernelV2Account.d.ts.map +1 -1
- package/_types/accounts/utils/6492.d.ts.map +1 -1
- package/_types/accounts/utils/toKernelPluginManager.d.ts.map +1 -1
- package/_types/actions/account-client/signUserOperation.d.ts.map +1 -1
- package/_types/clients/kernelAccountClient.d.ts +14 -10
- package/_types/clients/kernelAccountClient.d.ts.map +1 -1
- package/_types/clients/paymasterClient.d.ts +4 -0
- package/_types/clients/paymasterClient.d.ts.map +1 -1
- package/_types/types/kernel.d.ts +10 -1
- package/_types/types/kernel.d.ts.map +1 -1
- package/_types/utils.d.ts.map +1 -1
- package/accounts/kernel/abi/kernel_v_3_0_0/KernelAccountAbi.ts +17 -5
- package/accounts/kernel/createKernelAccount.ts +16 -6
- package/accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.ts +35 -0
- package/accounts/kernel/utils/account/ep0_7/getKernelV3Nonce.ts +3 -2
- package/accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.ts +0 -1
- package/accounts/kernel/utils/plugins/ep0_7/isPluginInitialized.ts +3 -2
- package/accounts/kernel/v1/createKernelV1Account.ts +3 -0
- package/accounts/kernel/v2/createKernelV2Account.ts +7 -15
- package/accounts/utils/6492.ts +3 -2
- package/accounts/utils/toKernelPluginManager.ts +19 -0
- package/actions/account-client/signUserOperation.ts +3 -2
- package/package.json +3 -3
- package/types/kernel.ts +18 -1
- package/utils.ts +2 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ENTRYPOINT_ADDRESS_V06_TYPE } from "permissionless/types/entrypoint";
|
|
2
|
+
import { type Address, type Hex } from "viem";
|
|
3
|
+
import type { PluginInstallData } from "../../../../../types/kernel.js";
|
|
4
|
+
export declare const encodeModuleInstallCallData: ({ accountAddress, enableData, executor, selector, validAfter, validUntil, validator }: {
|
|
5
|
+
accountAddress: Address;
|
|
6
|
+
} & {
|
|
7
|
+
selector: `0x${string}`;
|
|
8
|
+
executor: `0x${string}`;
|
|
9
|
+
validator: `0x${string}`;
|
|
10
|
+
validUntil: number;
|
|
11
|
+
validAfter: number;
|
|
12
|
+
enableData: `0x${string}`;
|
|
13
|
+
}) => Promise<Hex>;
|
|
14
|
+
//# sourceMappingURL=encodeModuleInstallCallData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encodeModuleInstallCallData.d.ts","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAA;AAClF,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,GAAG,EAAsB,MAAM,MAAM,CAAA;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAIvE,eAAO,MAAM,2BAA2B;oBASpB,OAAO;;;;;;;;MAC0B,QAAQ,GAAG,CAkB/D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getKernelV3Nonce.d.ts","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/account/ep0_7/getKernelV3Nonce.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"getKernelV3Nonce.d.ts","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/account/ep0_7/getKernelV3Nonce.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAK3C,eAAO,MAAM,gBAAgB,WACjB,MAAM,kBACE,OAAO,KACxB,QAAQ,MAAM,CAgBhB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getPluginsEnableTypedData.d.ts","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,UAAU,EACb,MAAM,iCAAiC,CAAA;AACxC,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,YAAY,EAKpB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EACR,MAAM,EACN,eAAe,EACf,kBAAkB,EACrB,MAAM,+BAA+B,CAAA;AAEtC,MAAM,MAAM,iBAAiB,CAAC,UAAU,SAAS,UAAU,IAAI;IAC3D,SAAS,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACtC,MAAM,EAAE,MAAM,CAAA;CACjB,CAAA;AACD,eAAO,MAAM,yBAAyB;oBAWlB,OAAO;aACd,MAAM;mBACA,MAAM;
|
|
1
|
+
{"version":3,"file":"getPluginsEnableTypedData.d.ts","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/plugins/ep0_6/getPluginsEnableTypedData.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,UAAU,EACb,MAAM,iCAAiC,CAAA;AACxC,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,YAAY,EAKpB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EACR,MAAM,EACN,eAAe,EACf,kBAAkB,EACrB,MAAM,+BAA+B,CAAA;AAEtC,MAAM,MAAM,iBAAiB,CAAC,UAAU,SAAS,UAAU,IAAI;IAC3D,SAAS,EAAE,eAAe,CAAC,UAAU,CAAC,CAAA;IACtC,MAAM,EAAE,MAAM,CAAA;CACjB,CAAA;AACD,eAAO,MAAM,yBAAyB;oBAWlB,OAAO;aACd,MAAM;mBACA,MAAM;2DAEA,QACrB,WAAW,YAAY,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,CAoC/C,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPluginInitialized.d.ts","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/plugins/ep0_7/isPluginInitialized.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"isPluginInitialized.d.ts","sourceRoot":"","sources":["../../../../../../accounts/kernel/utils/plugins/ep0_7/isPluginInitialized.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAA;AAK3C,eAAO,MAAM,mBAAmB,WACpB,MAAM,kBACE,OAAO,iBACR,OAAO,qBAezB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createKernelV1Account.d.ts","sourceRoot":"","sources":["../../../../accounts/kernel/v1/createKernelV1Account.ts"],"names":[],"mappings":"AAQA,OAAO,EAEH,KAAK,kBAAkB,EAC1B,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAER,UAAU,EACb,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EAIX,KAAK,SAAS,EAKjB,MAAM,MAAM,CAAA;AAWb,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAEnE,MAAM,MAAM,oBAAoB,CAC5B,UAAU,SAAS,UAAU,EAC7B,SAAS,SAAS,SAAS,GAAG,SAAS,EACvC,KAAK,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,IACnD,IAAI,CACJ,kBAAkB,CAAC,UAAU,EAAE,SAAS,EAAE,KAAK,CAAC,EAChD,qBAAqB,CACxB,CAAA;AA4CD,wBAAsB,qBAAqB,CACvC,UAAU,SAAS,UAAU,EAC7B,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GA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S,MAAM,GAAG,MAAM,EAC/B,QAAQ,SAAS,OAAO,GAAG,OAAO,EAElC,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,CAAC,EAC7C,EACI,MAAM,EACN,UAAU,EAAE,iBAAiB,EAC7B,KAAU,EACb,EAAE;IACC,MAAM,EAAE,kBAAkB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;IAC7C,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB,GACF,OAAO,CAAC,oBAAoB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CA4N/D"}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
import { type SmartAccount } from "permissionless/accounts";
|
|
2
1
|
import type { EntryPoint } from "permissionless/types/entrypoint.js";
|
|
3
|
-
import { type Address, type Chain, type Client, type
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
kernelPluginManager: KernelPluginManager<entryPoint>;
|
|
7
|
-
getNonce: (customNonceKey?: bigint) => Promise<bigint>;
|
|
8
|
-
generateInitCode: () => Promise<Hex>;
|
|
9
|
-
encodeCallData: (args: KernelEncodeCallDataArgs) => Promise<Hex>;
|
|
10
|
-
};
|
|
2
|
+
import { type Address, type Chain, type Client, type Transport } from "viem";
|
|
3
|
+
import type { KernelPluginManager, KernelPluginManagerParams } from "../../../types/kernel.js";
|
|
4
|
+
import { type KernelSmartAccount } from "../createKernelAccount.js";
|
|
11
5
|
/**
|
|
12
6
|
* Default addresses for kernel smart account
|
|
13
7
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createKernelV2Account.d.ts","sourceRoot":"","sources":["../../../../accounts/kernel/v2/createKernelV2Account.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"createKernelV2Account.d.ts","sourceRoot":"","sources":["../../../../accounts/kernel/v2/createKernelV2Account.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAER,UAAU,EACb,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EAIX,KAAK,SAAS,EAUjB,MAAM,MAAM,CAAA;AAEb,OAAO,KAAK,EAER,mBAAmB,EACnB,yBAAyB,EAC5B,MAAM,0BAA0B,CAAA;AAYjC,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAanE;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE;IAC3B,eAAe,EAAE,OAAO,CAAA;IACxB,eAAe,EAAE,OAAO,CAAA;CAI3B,CAAA;AA2DD;;;;;;;;;GASG;AACH,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,OAAO,EACP,UAAU,EAAE,iBAAiB,EAC7B,KAAU,EACV,cAAiD,EACjD,sBAAsB,EACzB,EAAE;IACC,OAAO,EACD,yBAAyB,CAAC,UAAU,CAAC,GACrC,mBAAmB,CAAC,UAAU,CAAC,CAAA;IACrC,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,sBAAsB,CAAC,EAAE,OAAO,CAAA;CACnC,GACF,OAAO,CAAC,kBAAkB,CAAC,UAAU,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC,CA6P7D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"6492.d.ts","sourceRoot":"","sources":["../../../accounts/utils/6492.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"6492.d.ts","sourceRoot":"","sources":["../../../accounts/utils/6492.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,IAAI,EACT,KAAK,GAAG,EACR,KAAK,YAAY,EACjB,KAAK,SAAS,EAIjB,MAAM,MAAM,CAAA;AAIb,MAAM,MAAM,kBAAkB,GAAG;IAC7B,cAAc,EAAE,OAAO,CAAA;IACvB,eAAe,EAAE,GAAG,CAAA;IACpB,SAAS,EAAE,IAAI,CAAA;CAClB,CAAA;AAED,KAAK,4BAA4B,GAAG;IAChC,MAAM,EAAE,OAAO,CAAA;IACf,IAAI,EAAE,IAAI,CAAA;IACV,SAAS,EAAE,IAAI,CAAA;IACf,MAAM,EAAE,YAAY,CAAA;CACvB,CAAA;AAED,eAAO,MAAM,qBAAqB,mDAI/B,kBAAkB,KAAG,IAgBvB,CAAA;AAGD,eAAO,MAAM,0BAA0B,ugHACi+G,CAAA;AAExgH,eAAO,MAAM,sBAAsB,wCAKhC,4BAA4B,KAAG,QAAQ,OAAO,CAahD,CAAA;AAED,eAAO,MAAM,8BAA8B,kKAKvB,OAAO,KACxB,QAAQ,OAAO,GAAG,SAAS,CAc7B,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,EAQjB,MAAM,MAAM,CAAA;
|
|
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,EAQjB,MAAM,MAAM,CAAA;AAIb,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,CAmR1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signUserOperation.d.ts","sourceRoot":"","sources":["../../../actions/account-client/signUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EACH,KAAK,UAAU,EAElB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EACR,UAAU,EACV,mBAAmB,EAEnB,SAAS,EACT,QAAQ,EACR,aAAa,EAChB,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"signUserOperation.d.ts","sourceRoot":"","sources":["../../../actions/account-client/signUserOperation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EACH,KAAK,UAAU,EAElB,MAAM,qCAAqC,CAAA;AAC5C,OAAO,KAAK,EACR,UAAU,EACV,mBAAmB,EAEnB,SAAS,EACT,QAAQ,EACR,aAAa,EAChB,MAAM,sBAAsB,CAAA;AAK7B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAGpD,MAAM,MAAM,2BAA2B,CACnC,UAAU,SAAS,UAAU,EAC7B,QAAQ,SAAS,YAAY,CAAC,UAAU,CAAC,GAAG,SAAS,GAC/C,YAAY,CAAC,UAAU,CAAC,GACxB,SAAS,IACf;IACA,aAAa,EAAE,SAAS,CACpB,aAAa,CAAC,MAAM,CAAC,EACnB,OAAO,GACP,QAAQ,GACR,UAAU,GACV,WAAW,GACX,cAAc,GACd,cAAc,GACd,sBAAsB,GACtB,oBAAoB,GACpB,sBAAsB,GACtB,kBAAkB,CACvB,CAAA;CACJ,GAAG,mBAAmB,CAAC,UAAU,EAAE,QAAQ,CAAC,GACzC,UAAU,CAAC,UAAU,CAAC,CAAA;AAE1B,MAAM,MAAM,2BAA2B,GAAG,aAAa,CAAC,MAAM,CAAC,CAAA;AAE/D,wBAAsB,iBAAiB,CACnC,UAAU,SAAS,UAAU,EAC7B,UAAU,SAAS,SAAS,GAAG,SAAS,EACxC,MAAM,SAAS,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,EACpD,QAAQ,SAAS,YAAY,CAAC,UAAU,CAAC,GAAG,SAAS,GAC/C,YAAY,CAAC,UAAU,CAAC,GACxB,SAAS,EAEf,MAAM,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,CAAC,EAC5C,IAAI,EAAE,QAAQ,CAAC,2BAA2B,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,GAClE,OAAO,CAAC,2BAA2B,CAAC,CAiBtC"}
|
|
@@ -79,6 +79,9 @@ export declare const createKernelAccountClient: <entryPoint extends EntryPoint,
|
|
|
79
79
|
} | undefined;
|
|
80
80
|
} | undefined;
|
|
81
81
|
cacheTime: number;
|
|
82
|
+
ccipRead?: false | {
|
|
83
|
+
request?: ((parameters: import("viem").CcipRequestParameters) => Promise<`0x${string}`>) | undefined;
|
|
84
|
+
} | undefined;
|
|
82
85
|
chain: TChain;
|
|
83
86
|
key: string;
|
|
84
87
|
name: string;
|
|
@@ -99,7 +102,7 @@ export declare const createKernelAccountClient: <entryPoint extends EntryPoint,
|
|
|
99
102
|
[x: `bytes1[${string}]`]: undefined;
|
|
100
103
|
[x: `bytes5[${string}]`]: undefined;
|
|
101
104
|
[x: `bytes10[${string}]`]: undefined;
|
|
102
|
-
[x: `
|
|
105
|
+
[x: `bytes20[${string}]`]: undefined;
|
|
103
106
|
[x: `bytes2[${string}]`]: undefined;
|
|
104
107
|
[x: `bytes3[${string}]`]: undefined;
|
|
105
108
|
[x: `bytes4[${string}]`]: undefined;
|
|
@@ -112,10 +115,10 @@ export declare const createKernelAccountClient: <entryPoint extends EntryPoint,
|
|
|
112
115
|
[x: `bytes13[${string}]`]: undefined;
|
|
113
116
|
[x: `bytes14[${string}]`]: undefined;
|
|
114
117
|
[x: `bytes15[${string}]`]: undefined;
|
|
118
|
+
[x: `bytes16[${string}]`]: undefined;
|
|
115
119
|
[x: `bytes17[${string}]`]: undefined;
|
|
116
120
|
[x: `bytes18[${string}]`]: undefined;
|
|
117
121
|
[x: `bytes19[${string}]`]: undefined;
|
|
118
|
-
[x: `bytes20[${string}]`]: undefined;
|
|
119
122
|
[x: `bytes21[${string}]`]: undefined;
|
|
120
123
|
[x: `bytes22[${string}]`]: undefined;
|
|
121
124
|
[x: `bytes23[${string}]`]: undefined;
|
|
@@ -131,8 +134,8 @@ export declare const createKernelAccountClient: <entryPoint extends EntryPoint,
|
|
|
131
134
|
[x: `int[${string}]`]: undefined;
|
|
132
135
|
[x: `int56[${string}]`]: undefined;
|
|
133
136
|
[x: `int40[${string}]`]: undefined;
|
|
134
|
-
[x: `int16[${string}]`]: undefined;
|
|
135
137
|
[x: `int8[${string}]`]: undefined;
|
|
138
|
+
[x: `int16[${string}]`]: undefined;
|
|
136
139
|
[x: `int24[${string}]`]: undefined;
|
|
137
140
|
[x: `int32[${string}]`]: undefined;
|
|
138
141
|
[x: `int48[${string}]`]: undefined;
|
|
@@ -164,8 +167,8 @@ export declare const createKernelAccountClient: <entryPoint extends EntryPoint,
|
|
|
164
167
|
[x: `uint[${string}]`]: undefined;
|
|
165
168
|
[x: `uint56[${string}]`]: undefined;
|
|
166
169
|
[x: `uint40[${string}]`]: undefined;
|
|
167
|
-
[x: `uint16[${string}]`]: undefined;
|
|
168
170
|
[x: `uint8[${string}]`]: undefined;
|
|
171
|
+
[x: `uint16[${string}]`]: undefined;
|
|
169
172
|
[x: `uint24[${string}]`]: undefined;
|
|
170
173
|
[x: `uint32[${string}]`]: undefined;
|
|
171
174
|
[x: `uint48[${string}]`]: undefined;
|
|
@@ -201,7 +204,7 @@ export declare const createKernelAccountClient: <entryPoint extends EntryPoint,
|
|
|
201
204
|
bytes1?: undefined;
|
|
202
205
|
bytes5?: undefined;
|
|
203
206
|
bytes10?: undefined;
|
|
204
|
-
|
|
207
|
+
bytes20?: undefined;
|
|
205
208
|
bytes2?: undefined;
|
|
206
209
|
bytes3?: undefined;
|
|
207
210
|
bytes4?: undefined;
|
|
@@ -214,10 +217,10 @@ export declare const createKernelAccountClient: <entryPoint extends EntryPoint,
|
|
|
214
217
|
bytes13?: undefined;
|
|
215
218
|
bytes14?: undefined;
|
|
216
219
|
bytes15?: undefined;
|
|
220
|
+
bytes16?: undefined;
|
|
217
221
|
bytes17?: undefined;
|
|
218
222
|
bytes18?: undefined;
|
|
219
223
|
bytes19?: undefined;
|
|
220
|
-
bytes20?: undefined;
|
|
221
224
|
bytes21?: undefined;
|
|
222
225
|
bytes22?: undefined;
|
|
223
226
|
bytes23?: undefined;
|
|
@@ -232,8 +235,8 @@ export declare const createKernelAccountClient: <entryPoint extends EntryPoint,
|
|
|
232
235
|
bytes32?: undefined;
|
|
233
236
|
int56?: undefined;
|
|
234
237
|
int40?: undefined;
|
|
235
|
-
int16?: undefined;
|
|
236
238
|
int8?: undefined;
|
|
239
|
+
int16?: undefined;
|
|
237
240
|
int24?: undefined;
|
|
238
241
|
int32?: undefined;
|
|
239
242
|
int48?: undefined;
|
|
@@ -264,8 +267,8 @@ export declare const createKernelAccountClient: <entryPoint extends EntryPoint,
|
|
|
264
267
|
int256?: undefined;
|
|
265
268
|
uint56?: undefined;
|
|
266
269
|
uint40?: undefined;
|
|
267
|
-
uint16?: undefined;
|
|
268
270
|
uint8?: undefined;
|
|
271
|
+
uint16?: undefined;
|
|
269
272
|
uint24?: undefined;
|
|
270
273
|
uint32?: undefined;
|
|
271
274
|
uint48?: undefined;
|
|
@@ -298,7 +301,7 @@ export declare const createKernelAccountClient: <entryPoint extends EntryPoint,
|
|
|
298
301
|
[key: string]: unknown;
|
|
299
302
|
}, TPrimaryType extends string>(args: import("viem").SignTypedDataParameters<TTypedData, TPrimaryType, TSmartAccount>) => Promise<`0x${string}`>;
|
|
300
303
|
deployContract: <const TAbi extends readonly unknown[] | import("viem").Abi, TChainOverride_1 extends Chain | undefined = undefined>(args: import("viem").DeployContractParameters<TAbi, TChain, TSmartAccount, TChainOverride_1> extends infer T ? { [K in keyof T]: import("viem").DeployContractParameters<TAbi, TChain, TSmartAccount, TChainOverride_1>[K]; } : never) => Promise<`0x${string}`>;
|
|
301
|
-
writeContract: <const TAbi_1 extends readonly unknown[] | import("viem").Abi, TFunctionName extends import("viem").ContractFunctionName<TAbi_1, "
|
|
304
|
+
writeContract: <const TAbi_1 extends readonly unknown[] | import("viem").Abi, TFunctionName extends import("viem").ContractFunctionName<TAbi_1, "payable" | "nonpayable"> = import("viem").ContractFunctionName<TAbi_1, "payable" | "nonpayable">, TArgs extends import("viem").ContractFunctionArgs<TAbi_1, "payable" | "nonpayable", TFunctionName> = import("viem").ContractFunctionArgs<TAbi_1, "payable" | "nonpayable", TFunctionName>, TChainOverride_2 extends Chain | undefined = undefined>(args: import("viem").WriteContractParameters<TAbi_1, TFunctionName, TArgs, TChain, TSmartAccount, TChainOverride_2>) => Promise<`0x${string}`>;
|
|
302
305
|
prepareUserOperationRequest: <TTransport_1 extends Transport>(args: (import("permissionless/_types/actions/smartAccount.js").PrepareUserOperationRequestParameters<entryPoint, TSmartAccount> extends infer T_3 ? { [K_2 in keyof T_3]: import("permissionless/_types/actions/smartAccount.js").PrepareUserOperationRequestParameters<entryPoint, TSmartAccount>[K_2]; } : never) extends infer T_1 ? { [K_1 in keyof T_1]: (import("permissionless/_types/actions/smartAccount.js").PrepareUserOperationRequestParameters<entryPoint, TSmartAccount> extends infer T_2 ? { [K_2 in keyof T_2]: import("permissionless/_types/actions/smartAccount.js").PrepareUserOperationRequestParameters<entryPoint, TSmartAccount>[K_2]; } : never)[K_1]; } : never, stateOverrides?: import("permissionless/_types/types/bundler.js").StateOverrides | undefined) => Promise<import("permissionless").UserOperation<import("permissionless/types").GetEntryPointVersion<entryPoint>> extends infer T_4 ? { [K_3 in keyof T_4]: import("permissionless").UserOperation<import("permissionless/types").GetEntryPointVersion<entryPoint>>[K_3]; } : never>;
|
|
303
306
|
sendUserOperation: <TTransport_2 extends Transport>(args: (import("permissionless/_types/actions/smartAccount.js").SendUserOperationParameters<entryPoint, TSmartAccount> extends infer T_7 ? { [K_5 in keyof T_7]: import("permissionless/_types/actions/smartAccount.js").SendUserOperationParameters<entryPoint, TSmartAccount>[K_5]; } : never) extends infer T_5 ? { [K_4 in keyof T_5]: (import("permissionless/_types/actions/smartAccount.js").SendUserOperationParameters<entryPoint, TSmartAccount> extends infer T_6 ? { [K_5 in keyof T_6]: import("permissionless/_types/actions/smartAccount.js").SendUserOperationParameters<entryPoint, TSmartAccount>[K_5]; } : never)[K_4]; } : never) => Promise<`0x${string}`>;
|
|
304
307
|
sendTransactions: (args: import("permissionless/_types/actions/smartAccount.js").SendTransactionsWithPaymasterParameters<entryPoint, TSmartAccount> extends infer T_8 ? { [K_6 in keyof T_8]: import("permissionless/_types/actions/smartAccount.js").SendTransactionsWithPaymasterParameters<entryPoint, TSmartAccount>[K_6]; } : never) => Promise<`0x${string}`>;
|
|
@@ -330,6 +333,7 @@ export declare const createKernelAccountClient: <entryPoint extends EntryPoint,
|
|
|
330
333
|
account?: undefined;
|
|
331
334
|
batch?: undefined;
|
|
332
335
|
cacheTime?: undefined;
|
|
336
|
+
ccipRead?: undefined;
|
|
333
337
|
chain?: undefined;
|
|
334
338
|
key?: undefined;
|
|
335
339
|
name?: undefined;
|
|
@@ -338,7 +342,7 @@ export declare const createKernelAccountClient: <entryPoint extends EntryPoint,
|
|
|
338
342
|
transport?: undefined;
|
|
339
343
|
type?: undefined;
|
|
340
344
|
uid?: undefined;
|
|
341
|
-
} &
|
|
345
|
+
} & import("viem").ExactPartial<Pick<import("viem").PublicActions<TTransport, TChain, TSmartAccount>, "readContract" | "simulateContract" | "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import("viem").WalletActions<TChain, TSmartAccount>, "sendTransaction" | "writeContract">>>(fn: (client: Client<TTransport, TChain, TSmartAccount, BundlerRpcSchema<entryPoint>, KernelAccountClientActions<entryPoint, TChain, TSmartAccount>>) => client) => Client<TTransport, TChain, TSmartAccount, BundlerRpcSchema<entryPoint>, { [K_8 in keyof client]: client[K_8]; } & import("permissionless").SmartAccountActions<entryPoint, TChain, TSmartAccount> & {
|
|
342
346
|
signUserOperation: <TTransport_3 extends Transport>(args: import("../actions/index.js").SignUserOperationParameters<entryPoint, TSmartAccount> extends infer T_10 ? { [K_7 in keyof T_10]: import("../actions/index.js").SignUserOperationParameters<entryPoint, TSmartAccount>[K_7]; } : never) => Promise<{
|
|
343
347
|
sender: `0x${string}`;
|
|
344
348
|
nonce: bigint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"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B,CAAC,UAAU,EAAE,KAAK,EAAE,OAAO,CAAC,CACzD,CACJ,CAAA;AAED,MAAM,MAAM,wBAAwB,CAChC,UAAU,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoElC,CAAA"}
|
|
@@ -28,11 +28,15 @@ export declare const createZeroDevPaymasterClient: <entryPoint extends EntryPoin
|
|
|
28
28
|
} | undefined;
|
|
29
29
|
} | undefined;
|
|
30
30
|
cacheTime?: number | undefined;
|
|
31
|
+
ccipRead?: false | {
|
|
32
|
+
request?: ((parameters: import("viem").CcipRequestParameters) => Promise<`0x${string}`>) | undefined;
|
|
33
|
+
} | undefined;
|
|
31
34
|
chain?: Chain | chain | undefined;
|
|
32
35
|
key?: string | undefined;
|
|
33
36
|
name?: string | undefined;
|
|
34
37
|
pollingInterval?: number | undefined;
|
|
35
38
|
transport: transport;
|
|
39
|
+
rpcSchema?: undefined;
|
|
36
40
|
} & {
|
|
37
41
|
entryPoint: entryPoint;
|
|
38
42
|
}) => ZeroDevPaymasterClient<entryPoint>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paymasterClient.d.ts","sourceRoot":"","sources":["../../clients/paymasterClient.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,EAEH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,SAAS,EAEjB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,EACH,KAAK,6BAA6B,EAErC,MAAM,wBAAwB,CAAA;AAG/B,MAAM,MAAM,sBAAsB,CAAC,UAAU,SAAS,UAAU,IAAI,MAAM,CACtE,SAAS,EACT,KAAK,GAAG,SAAS,EACjB,OAAO,GAAG,SAAS,EACnB,yBAAyB,CAAC,UAAU,CAAC,EACrC,6BAA6B,CAAC,UAAU,CAAC,CAC5C,CAAA;AACD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,4BAA4B
|
|
1
|
+
{"version":3,"file":"paymasterClient.d.ts","sourceRoot":"","sources":["../../clients/paymasterClient.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAA;AACjE,OAAO,EAEH,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,SAAS,EAEjB,MAAM,MAAM,CAAA;AACb,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAA;AACnE,OAAO,EACH,KAAK,6BAA6B,EAErC,MAAM,wBAAwB,CAAA;AAG/B,MAAM,MAAM,sBAAsB,CAAC,UAAU,SAAS,UAAU,IAAI,MAAM,CACtE,SAAS,EACT,KAAK,GAAG,SAAS,EACjB,OAAO,GAAG,SAAS,EACnB,yBAAyB,CAAC,UAAU,CAAC,EACrC,6BAA6B,CAAC,UAAU,CAAC,CAC5C,CAAA;AACD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;wCAqCxC,CAAA"}
|
package/_types/types/kernel.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { EntryPoint } from "permissionless/types";
|
|
1
|
+
import type { ENTRYPOINT_ADDRESS_V06_TYPE, EntryPoint } from "permissionless/types";
|
|
2
2
|
import type { GetEntryPointVersion } from "permissionless/types/entrypoint";
|
|
3
3
|
import type { UserOperation, UserOperationWithBigIntAsHex } from "permissionless/types/userOperation";
|
|
4
4
|
import { type Address, type Hex, type LocalAccount } from "viem";
|
|
@@ -110,7 +110,16 @@ export type KernelPluginManager<entryPoint extends EntryPoint> = KernelValidator
|
|
|
110
110
|
getAction(): Action;
|
|
111
111
|
getValidityData(): PluginValidityData;
|
|
112
112
|
getIdentifier(isSudo?: boolean): Hex;
|
|
113
|
+
encodeModuleInstallCallData: (accountAddress: Address) => Promise<Hex>;
|
|
113
114
|
};
|
|
115
|
+
export type PluginInstallData<entryPoint extends EntryPoint> = entryPoint extends ENTRYPOINT_ADDRESS_V06_TYPE ? {
|
|
116
|
+
selector: Hex;
|
|
117
|
+
executor: Address;
|
|
118
|
+
validator: Address;
|
|
119
|
+
validUntil: number;
|
|
120
|
+
validAfter: number;
|
|
121
|
+
enableData: Hex;
|
|
122
|
+
} : never;
|
|
114
123
|
export type KernelPluginManagerParams<entryPoint extends EntryPoint> = {
|
|
115
124
|
sudo?: KernelValidator<entryPoint>;
|
|
116
125
|
regular?: KernelValidator<entryPoint>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kernel.d.ts","sourceRoot":"","sources":["../../types/kernel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"kernel.d.ts","sourceRoot":"","sources":["../../types/kernel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,2BAA2B,EAC3B,UAAU,EACb,MAAM,sBAAsB,CAAA;AAC7B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,KAAK,EACR,aAAa,EACb,4BAA4B,EAC/B,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EAAE,KAAK,OAAO,EAAE,KAAK,GAAG,EAAE,KAAK,YAAY,EAAE,MAAM,MAAM,CAAA;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAChD,MAAM,MAAM,yBAAyB,CAAC,UAAU,SAAS,UAAU,IAAI;IACnE;QACI,MAAM,EAAE,yBAAyB,CAAA;QACjC,UAAU,EAAE;YACR;gBACI,OAAO,EAAE,MAAM,CAAA;gBACf,MAAM,EAAE,oBAAoB,CAAC,UAAU,CAAC,SAAS,MAAM,GACjD,SAAS,CACL,4BAA4B,CAAC,MAAM,CAAC,EAClC,cAAc,GACd,oBAAoB,GACpB,sBAAsB,CAC3B,GACD,SAAS,CACL,4BAA4B,CAAC,MAAM,CAAC,EAClC,cAAc,GACd,oBAAoB,GACpB,sBAAsB,GACtB,+BAA+B,GAC/B,yBAAyB,CAC9B,CAAA;gBACP,iBAAiB,EAAE,OAAO,CAAA;gBAC1B,YAAY,CAAC,EAAE;oBACX,YAAY,EAAE,GAAG,CAAA;iBACpB,CAA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AAC;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,GAcxC,CAAA;AAED,eAAO,MAAM,WAAW;cAIV,SAAS;cACT,SAAS;MACnB,GAQH,CAAA"}
|
|
@@ -295,7 +295,7 @@ export const KernelV3AccountAbi = [
|
|
|
295
295
|
{ name: "hookData", type: "bytes[]", internalType: "bytes[]" }
|
|
296
296
|
],
|
|
297
297
|
outputs: [],
|
|
298
|
-
stateMutability: "
|
|
298
|
+
stateMutability: "payable"
|
|
299
299
|
},
|
|
300
300
|
{
|
|
301
301
|
type: "function",
|
|
@@ -338,9 +338,7 @@ export const KernelV3AccountAbi = [
|
|
|
338
338
|
{
|
|
339
339
|
type: "function",
|
|
340
340
|
name: "permissionConfig",
|
|
341
|
-
inputs: [
|
|
342
|
-
{ name: "vId", type: "bytes21", internalType: "ValidationId" }
|
|
343
|
-
],
|
|
341
|
+
inputs: [{ name: "pId", type: "bytes4", internalType: "PermissionId" }],
|
|
344
342
|
outputs: [
|
|
345
343
|
{
|
|
346
344
|
name: "",
|
|
@@ -407,7 +405,7 @@ export const KernelV3AccountAbi = [
|
|
|
407
405
|
{
|
|
408
406
|
type: "function",
|
|
409
407
|
name: "supportsExecutionMode",
|
|
410
|
-
inputs: [{ name: "", type: "bytes32", internalType: "ExecMode" }],
|
|
408
|
+
inputs: [{ name: "mode", type: "bytes32", internalType: "ExecMode" }],
|
|
411
409
|
outputs: [{ name: "", type: "bool", internalType: "bool" }],
|
|
412
410
|
stateMutability: "pure"
|
|
413
411
|
},
|
|
@@ -662,6 +660,19 @@ export const KernelV3AccountAbi = [
|
|
|
662
660
|
],
|
|
663
661
|
anonymous: false
|
|
664
662
|
},
|
|
663
|
+
{
|
|
664
|
+
type: "event",
|
|
665
|
+
name: "RootValidatorUpdated",
|
|
666
|
+
inputs: [
|
|
667
|
+
{
|
|
668
|
+
name: "rootValidator",
|
|
669
|
+
type: "bytes21",
|
|
670
|
+
indexed: false,
|
|
671
|
+
internalType: "ValidationId"
|
|
672
|
+
}
|
|
673
|
+
],
|
|
674
|
+
anonymous: false
|
|
675
|
+
},
|
|
665
676
|
{
|
|
666
677
|
type: "event",
|
|
667
678
|
name: "SelectorSet",
|
|
@@ -777,5 +788,6 @@ export const KernelV3AccountAbi = [
|
|
|
777
788
|
inputs: [{ name: "i", type: "uint256", internalType: "uint256" }]
|
|
778
789
|
},
|
|
779
790
|
{ type: "error", name: "PolicySignatureOrderError", inputs: [] },
|
|
791
|
+
{ type: "error", name: "RootValidatorCannotBeRemoved", inputs: [] },
|
|
780
792
|
{ type: "error", name: "SignerPrefixNotPresent", inputs: [] }
|
|
781
793
|
] as const
|
|
@@ -60,6 +60,7 @@ export type KernelSmartAccount<
|
|
|
60
60
|
getNonce: (customNonceKey?: bigint) => Promise<bigint>
|
|
61
61
|
generateInitCode: () => Promise<Hex>
|
|
62
62
|
encodeCallData: (args: KernelEncodeCallDataArgs) => Promise<Hex>
|
|
63
|
+
encodeModuleInstallCallData: () => Promise<Hex>
|
|
63
64
|
}
|
|
64
65
|
|
|
65
66
|
export type CreateKernelAccountParameters<entryPoint extends EntryPoint> = {
|
|
@@ -267,21 +268,23 @@ export async function createKernelAccount<
|
|
|
267
268
|
plugins,
|
|
268
269
|
entryPoint: entryPointAddress,
|
|
269
270
|
index = 0n,
|
|
270
|
-
factoryAddress
|
|
271
|
-
accountLogicAddress
|
|
271
|
+
factoryAddress,
|
|
272
|
+
accountLogicAddress,
|
|
272
273
|
factoryStakerAddress = KERNEL_ADDRESSES.FACTORY_STAKER,
|
|
273
274
|
deployedAccountAddress
|
|
274
275
|
}: CreateKernelAccountParameters<entryPoint>
|
|
275
276
|
): Promise<KernelSmartAccount<entryPoint, TTransport, TChain>> {
|
|
276
277
|
const entryPointVersion = getEntryPointVersion(entryPointAddress)
|
|
277
278
|
accountLogicAddress =
|
|
278
|
-
|
|
279
|
+
accountLogicAddress ??
|
|
280
|
+
(entryPointVersion === "v0.6"
|
|
279
281
|
? KERNEL_ADDRESSES.ACCOUNT_LOGIC_V0_6
|
|
280
|
-
: KERNEL_ADDRESSES.ACCOUNT_LOGIC_V0_7
|
|
282
|
+
: KERNEL_ADDRESSES.ACCOUNT_LOGIC_V0_7)
|
|
281
283
|
factoryAddress =
|
|
282
|
-
|
|
284
|
+
factoryAddress ??
|
|
285
|
+
(entryPointVersion === "v0.6"
|
|
283
286
|
? KERNEL_ADDRESSES.FACTORY_ADDRESS_V0_6
|
|
284
|
-
: KERNEL_ADDRESSES.FACTORY_ADDRESS_V0_7
|
|
287
|
+
: KERNEL_ADDRESSES.FACTORY_ADDRESS_V0_7)
|
|
285
288
|
|
|
286
289
|
const kernelPluginManager = isKernelPluginManager<entryPoint>(plugins)
|
|
287
290
|
? plugins
|
|
@@ -294,6 +297,8 @@ export async function createKernelAccount<
|
|
|
294
297
|
})
|
|
295
298
|
// Helper to generate the init code for the smart account
|
|
296
299
|
const generateInitCode = async () => {
|
|
300
|
+
if (!accountLogicAddress || !factoryAddress)
|
|
301
|
+
throw new Error("Missing account logic address or factory address")
|
|
297
302
|
return getAccountInitCode<entryPoint>({
|
|
298
303
|
index,
|
|
299
304
|
factoryAddress,
|
|
@@ -323,6 +328,11 @@ export async function createKernelAccount<
|
|
|
323
328
|
return {
|
|
324
329
|
kernelPluginManager,
|
|
325
330
|
generateInitCode,
|
|
331
|
+
encodeModuleInstallCallData: async () => {
|
|
332
|
+
return await kernelPluginManager.encodeModuleInstallCallData(
|
|
333
|
+
accountAddress
|
|
334
|
+
)
|
|
335
|
+
},
|
|
326
336
|
...toSmartAccount({
|
|
327
337
|
address: accountAddress,
|
|
328
338
|
publicKey: accountAddress,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { ENTRYPOINT_ADDRESS_V06_TYPE } from "permissionless/types/entrypoint"
|
|
2
|
+
import { type Address, type Hex, encodeFunctionData } from "viem"
|
|
3
|
+
import type { PluginInstallData } from "../../../../../types/kernel.js"
|
|
4
|
+
import { KernelAccountAbi } from "../../../abi/KernelAccountAbi.js"
|
|
5
|
+
import { encodeCallData } from "./encodeCallData.js"
|
|
6
|
+
|
|
7
|
+
export const encodeModuleInstallCallData = async ({
|
|
8
|
+
accountAddress,
|
|
9
|
+
enableData,
|
|
10
|
+
executor,
|
|
11
|
+
selector,
|
|
12
|
+
validAfter,
|
|
13
|
+
validUntil,
|
|
14
|
+
validator
|
|
15
|
+
}: {
|
|
16
|
+
accountAddress: Address
|
|
17
|
+
} & PluginInstallData<ENTRYPOINT_ADDRESS_V06_TYPE>): Promise<Hex> => {
|
|
18
|
+
return encodeCallData({
|
|
19
|
+
to: accountAddress,
|
|
20
|
+
value: 0n,
|
|
21
|
+
data: encodeFunctionData({
|
|
22
|
+
abi: KernelAccountAbi,
|
|
23
|
+
functionName: "setExecution",
|
|
24
|
+
args: [
|
|
25
|
+
selector,
|
|
26
|
+
executor,
|
|
27
|
+
validator,
|
|
28
|
+
validUntil,
|
|
29
|
+
validAfter,
|
|
30
|
+
enableData
|
|
31
|
+
]
|
|
32
|
+
}),
|
|
33
|
+
callType: "call"
|
|
34
|
+
})
|
|
35
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getAction } from "permissionless"
|
|
2
1
|
import type { Address, Client } from "viem"
|
|
3
2
|
import { readContract } from "viem/actions"
|
|
3
|
+
import { getAction } from "viem/utils"
|
|
4
4
|
import { KernelV3AccountAbi } from "../../../abi/kernel_v_3_0_0/KernelAccountAbi.js"
|
|
5
5
|
|
|
6
6
|
export const getKernelV3Nonce = async (
|
|
@@ -10,7 +10,8 @@ export const getKernelV3Nonce = async (
|
|
|
10
10
|
try {
|
|
11
11
|
const nonce = await getAction(
|
|
12
12
|
client,
|
|
13
|
-
readContract
|
|
13
|
+
readContract,
|
|
14
|
+
"sendTransaction"
|
|
14
15
|
)({
|
|
15
16
|
abi: KernelV3AccountAbi,
|
|
16
17
|
address: accountAddress,
|
|
@@ -34,7 +34,6 @@ export const getPluginsEnableTypedData = async <
|
|
|
34
34
|
accountAddress: Address
|
|
35
35
|
chainId: number
|
|
36
36
|
kernelVersion: string
|
|
37
|
-
// { action, validator }: Kernel2_0_plugins
|
|
38
37
|
} & Kernel2_0_plugins<entryPoint> &
|
|
39
38
|
PluginValidityData): Promise<
|
|
40
39
|
Parameters<CustomSource["signTypedData"]>[0]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { getAction } from "permissionless"
|
|
2
1
|
import type { Address, Client } from "viem"
|
|
3
2
|
import { readContract } from "viem/actions"
|
|
3
|
+
import { getAction } from "viem/utils"
|
|
4
4
|
import { KernelModuleIsInitializedAbi } from "../../../abi/kernel_v_3_0_0/KernelModuleAbi.js"
|
|
5
5
|
|
|
6
6
|
export const isPluginInitialized = async (
|
|
@@ -11,7 +11,8 @@ export const isPluginInitialized = async (
|
|
|
11
11
|
try {
|
|
12
12
|
return await getAction(
|
|
13
13
|
client,
|
|
14
|
-
readContract
|
|
14
|
+
readContract,
|
|
15
|
+
"readContract"
|
|
15
16
|
)({
|
|
16
17
|
abi: KernelModuleIsInitializedAbi,
|
|
17
18
|
address: pluginAddress,
|
|
@@ -213,6 +213,9 @@ export async function createKernelV1Account<
|
|
|
213
213
|
return {
|
|
214
214
|
...account,
|
|
215
215
|
generateInitCode,
|
|
216
|
+
encodeModuleInstallCallData: async () => {
|
|
217
|
+
throw new Error("Not implemented")
|
|
218
|
+
},
|
|
216
219
|
client: client,
|
|
217
220
|
publicKey: accountAddress,
|
|
218
221
|
entryPoint: entryPointAddress,
|
|
@@ -4,10 +4,7 @@ import {
|
|
|
4
4
|
getSenderAddress,
|
|
5
5
|
isSmartAccountDeployed
|
|
6
6
|
} from "permissionless"
|
|
7
|
-
import {
|
|
8
|
-
SignTransactionNotSupportedBySmartAccount,
|
|
9
|
-
type SmartAccount
|
|
10
|
-
} from "permissionless/accounts"
|
|
7
|
+
import { SignTransactionNotSupportedBySmartAccount } from "permissionless/accounts"
|
|
11
8
|
import type {
|
|
12
9
|
ENTRYPOINT_ADDRESS_V06_TYPE,
|
|
13
10
|
EntryPoint
|
|
@@ -47,20 +44,10 @@ import {
|
|
|
47
44
|
isKernelPluginManager,
|
|
48
45
|
toKernelPluginManager
|
|
49
46
|
} from "../../utils/toKernelPluginManager.js"
|
|
47
|
+
import { type KernelSmartAccount } from "../createKernelAccount.js"
|
|
50
48
|
import { KernelAccountV2Abi } from "./abi/KernelAccountV2Abi.js"
|
|
51
49
|
import { KernelFactoryV2Abi } from "./abi/KernelFactoryV2Abi.js"
|
|
52
50
|
|
|
53
|
-
export type KernelSmartAccount<
|
|
54
|
-
entryPoint extends EntryPoint,
|
|
55
|
-
transport extends Transport = Transport,
|
|
56
|
-
chain extends Chain | undefined = Chain | undefined
|
|
57
|
-
> = SmartAccount<entryPoint, "kernelSmartAccount", transport, chain> & {
|
|
58
|
-
kernelPluginManager: KernelPluginManager<entryPoint>
|
|
59
|
-
getNonce: (customNonceKey?: bigint) => Promise<bigint>
|
|
60
|
-
generateInitCode: () => Promise<Hex>
|
|
61
|
-
encodeCallData: (args: KernelEncodeCallDataArgs) => Promise<Hex>
|
|
62
|
-
}
|
|
63
|
-
|
|
64
51
|
// Safe's library for create and create2: https://github.com/safe-global/safe-contracts/blob/0acdd35a203299585438f53885df630f9d486a86/contracts/libraries/CreateCall.sol
|
|
65
52
|
// Address was found here: https://github.com/safe-global/safe-deployments/blob/926ec6bbe2ebcac3aa2c2c6c0aff74aa590cbc6a/src/assets/v1.4.1/create_call.json
|
|
66
53
|
const createCallAddress = "0x9b35Af71d77eaf8d7e40252370304687390A1A52"
|
|
@@ -289,6 +276,11 @@ export async function createKernelV2Account<
|
|
|
289
276
|
source: "kernelSmartAccount",
|
|
290
277
|
kernelPluginManager,
|
|
291
278
|
generateInitCode,
|
|
279
|
+
encodeModuleInstallCallData: async () => {
|
|
280
|
+
return await kernelPluginManager.encodeModuleInstallCallData(
|
|
281
|
+
accountAddress
|
|
282
|
+
)
|
|
283
|
+
},
|
|
292
284
|
async getFactory() {
|
|
293
285
|
if (smartAccountDeployed) return undefined
|
|
294
286
|
|
package/accounts/utils/6492.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
// copied from: https://github.com/alchemyplatform/aa-sdk/blob/266c9757cd721ef0bd97d04c0b592a329f8a9da5/packages/core/src/signer/utils.ts
|
|
2
2
|
|
|
3
|
-
import { getAction } from "permissionless"
|
|
4
3
|
import {
|
|
5
4
|
type Address,
|
|
6
5
|
type Chain,
|
|
@@ -14,6 +13,7 @@ import {
|
|
|
14
13
|
parseAbiParameters
|
|
15
14
|
} from "viem"
|
|
16
15
|
import { getStorageAt } from "viem/actions"
|
|
16
|
+
import { getAction } from "viem/utils"
|
|
17
17
|
|
|
18
18
|
export type SignWith6492Params = {
|
|
19
19
|
factoryAddress: Address
|
|
@@ -85,7 +85,8 @@ export const getKernelImplementationAddress = async <
|
|
|
85
85
|
try {
|
|
86
86
|
const strgAddr = await getAction(
|
|
87
87
|
client,
|
|
88
|
-
getStorageAt
|
|
88
|
+
getStorageAt,
|
|
89
|
+
"getStorageAt"
|
|
89
90
|
)({
|
|
90
91
|
address: accountAddress,
|
|
91
92
|
slot: "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc"
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
zeroAddress
|
|
16
16
|
} from "viem"
|
|
17
17
|
import { getChainId } from "viem/actions"
|
|
18
|
+
import { encodeModuleInstallCallData as encodeModuleInstallCallDataEpV06 } from "../../accounts/kernel/utils/account/ep0_6/encodeModuleInstallCallData.js"
|
|
18
19
|
import { VALIDATOR_MODE, VALIDATOR_TYPE } from "../../constants.js"
|
|
19
20
|
import {
|
|
20
21
|
type KernelPluginManager,
|
|
@@ -193,6 +194,24 @@ export async function toKernelPluginManager<
|
|
|
193
194
|
return {
|
|
194
195
|
...activeValidator,
|
|
195
196
|
getIdentifier,
|
|
197
|
+
encodeModuleInstallCallData: async (accountAddress: Address) => {
|
|
198
|
+
if (!action) {
|
|
199
|
+
throw new Error("Action data must be set")
|
|
200
|
+
}
|
|
201
|
+
if (!regular) throw new Error("regular validator not set")
|
|
202
|
+
if (entryPointVersion === "v0.6") {
|
|
203
|
+
return await encodeModuleInstallCallDataEpV06({
|
|
204
|
+
accountAddress,
|
|
205
|
+
selector: action.selector,
|
|
206
|
+
executor: action.address,
|
|
207
|
+
validator: regular?.address,
|
|
208
|
+
validUntil,
|
|
209
|
+
validAfter,
|
|
210
|
+
enableData: await regular.getEnableData(accountAddress)
|
|
211
|
+
})
|
|
212
|
+
}
|
|
213
|
+
throw new Error("EntryPoint v0.7 not supported yet")
|
|
214
|
+
},
|
|
196
215
|
signUserOperation: async (userOperation) => {
|
|
197
216
|
const userOpSig =
|
|
198
217
|
await activeValidator.signUserOperation(userOperation)
|